R
Rick North
Guest
Hi all,
For a FPGA design, I have been told that the way to stay away from harm
is to implement the reset synchronously. In this way the reset signal
will be taken in consideration for timing analysis.
I have seen two ways of obtaining a synchron reset 1) and 2) below. The
argument for 2) is that it will take less resource than 1). The only
way I 'think' it will be true is for variables, which will result in
combatorial nets. The nets would get a reset net as well but since it
normally is placed between FF1-comb-FF2 the comb output is determined
by FF1.
Did some initial test Synth-P&R but did not see any big difference
which was as I initially thought.
What does your expertise say about 1) and 2) template? Is there a
benefit of using 2) over 1)? This might be a "should I use Altera or
Xilinx" question but I will stick my neck out anyway.
Cheers,
/Rick
-----------------------------------------------------------------------
1)
P_Foo: process (clk) is
begin -- process P_Foo
if clk'event and clk = '1' then -- rising clock edge
if reset = '1' then -- synchronous reset
(active high)
-- reset variable, signal
else
-- set signals and assign variables
end if;
end if;
end process P_Foo;
2)
P_Foo: process (clk) is
begin -- process P_Foo
if clk'event and clk = '1' then -- rising clock edge
-- set signals and assign variables
if reset = '1' then -- synchronous reset
(active high)
-- reset variable, signal
end if;
end if;
end process P_Foo;
For a FPGA design, I have been told that the way to stay away from harm
is to implement the reset synchronously. In this way the reset signal
will be taken in consideration for timing analysis.
I have seen two ways of obtaining a synchron reset 1) and 2) below. The
argument for 2) is that it will take less resource than 1). The only
way I 'think' it will be true is for variables, which will result in
combatorial nets. The nets would get a reset net as well but since it
normally is placed between FF1-comb-FF2 the comb output is determined
by FF1.
Did some initial test Synth-P&R but did not see any big difference
which was as I initially thought.
What does your expertise say about 1) and 2) template? Is there a
benefit of using 2) over 1)? This might be a "should I use Altera or
Xilinx" question but I will stick my neck out anyway.
Cheers,
/Rick
-----------------------------------------------------------------------
1)
P_Foo: process (clk) is
begin -- process P_Foo
if clk'event and clk = '1' then -- rising clock edge
if reset = '1' then -- synchronous reset
(active high)
-- reset variable, signal
else
-- set signals and assign variables
end if;
end if;
end process P_Foo;
2)
P_Foo: process (clk) is
begin -- process P_Foo
if clk'event and clk = '1' then -- rising clock edge
-- set signals and assign variables
if reset = '1' then -- synchronous reset
(active high)
-- reset variable, signal
end if;
end if;
end process P_Foo;