Gast
#947811
Hallo zusammen, Bin noch anfänger,was VHDL-Programmierung angeht,aber hab das folgende Problem:Ich hab das folgende "Vorwahl-Rückwärtszähler als Frequenzteiler",muss ihn so umwandeln,dass er mir einmal einen Taktfrequenz von 50 MHz zu 19,2 KHz teilt,und einmal den 50 MHz zu 100 Hz.. Könnte mir jemand helfen? Danke im voraus.. Mao library IEEE; use IEEE.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity Vorwahl12zhl is generic ( vorwert: natural := 12); port ( Clk: in STD_LOGIC; Rst: in STD_LOGIC; ZClk: buffer std_logic ); end Vorwahl12zhl; begin Zhl: process(Clk,Rst) variable zaehl: natural range 0 to vorwert-1; begin if Rst='1' then zaehl := vorwert-1; ZClk <= '0'; elsif Clk='1' and Clk'event then if zaehl = 0 then zaehl := 11; --Fehler: nicht skalierbar! ZClk <= not ZClk; else zaehl := zaehl - 1; end if; end if; end process Zhl; end Vorwahl12zhl_arch;