Gast
#3846232
Hier habe ich einen VHDL-Code, ich glaube der Reset-Eingang ist 0-aktiv, wegen dem if reset='0' then q<='0'. Falls ich es falsch verstanden habe bitte ich gerne um Verbesserung. Nun zu meiner Frage, wie erkenne ich ob der Reset-Eingang asynchron oder synchron ist? wäre lieb wenn mir das jemand ausführlich erklären könnte, da ich ein Anfänger bin. LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.numeric_std.all; entity counter4 is port ( clk : in std_logic; reset : in std_logic; q_out : out std_logic_vector(3 downto 0) ); --Ausgänge end counter4; architecture beh of counter4 is signal q,q_ns: unsigned(3 downto 0); begin -- beh q_out <= std_logic_vector(q); -- connect internal signals to output ports process (clk,reset) -- process for register function begin if reset='0' then q <= (others => '0'); elsif clk'event and clk = '1' then -- rising clock edge q <= q_ns; end if; end process; process (q) -- process for next state decoder begin q_ns <= q + 1; end process; end beh;