VHDL-Frage zu for-loops

Kann ich folgendes Konstrukt allgemein mit Hilfe einer for...loop formulieren? Oder wie macht man das elegant, ohne dass ich jede

process(clkfx) begin if rising_edge(clkfx) then case bcd1bcd0 is when x"01" => divider divider divider divider

Reply to
Mathias Weierganz
Loading thread data ...

Am 07.11.2017 um 15:06 schrieb Mathias Weierganz:

Mit einer lookup tabelle:

formatting link

Irgendwann muss schon jemand die Konstanten eintippen...

Hope it helps - Udo

Reply to
Newdo

Am 07.11.2017 um 15:29 schrieb Newdo:

Reply to
Mathias Weierganz

Am 07.11.2017 um 15:44 schrieb Mathias Weierganz:

Frage hervorging , dass es eine Formel gibt...

Mal sehen...

- Udo

Reply to
Newdo

Am 07.11.2017 um 15:44 schrieb Mathias Weierganz:

Ich denke, so etwas sollte gehen:

formatting link

Gruss Udo

Reply to
Newdo

Mit divider = ComputeDivider(bcd1bcd0) als Inhalt der for-Schleife

Reply to
Newdo

Am 07.11.2017 um 15:44 schrieb Mathias Weierganz:

Mal eben kurz geht in VHDL erstmal garnix. :-(

Ich habe auf opencores.org eine sinus/cosinus-Funktion abgelegt.

werden. Die Resultate werden dann in ROMs verpackt.

der Compiler an den PC durchreichen kann, also sin, cos, tan, log, dividieren, files lesen und so weiter.

Das meiste an den Quellen, wie die Erweiterung von 90 auf 360 Grad, das automatisierte Pipelining oder das Erzeugen von sin & cos

Was dich interessiert ist nur die Deklaration der Tabelle und die Funktion initialisiere_tabelle() oder so.

<
formatting link
>

Genauigkeit kannst du den auch als ROM erschlagen oder du musst halt mehrere Tabellen vorausberechnen.

Variables won't, and constants aren't.

Reply to
Gerhard Hoffmann

type t_div_tab is array(153 downto 0) of std_logic_vector(15 downto 0); signal div_tab : t_div_tab ; ...

div_tab_gen1: for nn in 0 to 9 generate div_tab_gen2: for n in 0 to 9 generate div_tab(nn * 16 + n)

Reply to
Mathias Weierganz

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.