ivlsi
Advanced Member level 3
Hi All,
What's the difference in the following codes implementation (two pieces of code)?
Let's assume that the reset (rstn) happens only once... So, is there a difference in the code implementation/behavior?
Thank you!
What's the difference in the following codes implementation (two pieces of code)?
Let's assume that the reset (rstn) happens only once... So, is there a difference in the code implementation/behavior?
Code:
----------------------------------------------------------------------
signal Q : std_logic := '0';
process (clk) is
begin
if rising_edge(clk) then
Q <= IN;
end if;
end process;
Code:
----------------------------------------------------------------------
signal Q : std_logic;
process (clk,rstn) is
begin
if falling_edge(rstn) then
Q <= '0';
elsif rising_edge(clk) then
Q <= IN;
end if;
end if;
end process;
Thank you!
Last edited by a moderator: