J
john
Hi,
Please advice which is the most efficient way to synchronize the
external ( hardware ) Reset signal with the clock. I am using Quatrus
II 7.2 version. The first piece of code generates a D flip flop , gets
Reset_1 as an input and generates a Reset_out output. The Reset _ 1
and the Reset_output are not directly conencted to each other like
with a wire or compiler is not shorting the input of the flip flop to
the output of the flip flop.
The second piece of code generates the D flip flop and connects input
of the flip flop to the output directly via a wire. I can see that in
the RTL viewer. that the Quatrus is shorting the input of the flip
flop to the output of the flip flop but it works fine too practically.
I am confused which is the right choice because of my lack of VHDL
experience.
ResetProc: Process (DPR_CLK, Reset_switch)
Begin
If ( Reset_switch = '1') Then
Reset_1 <='1';
Reset_2 <='1';
Reset_LED <='1';
elsif rising_edge(DPR_CLK) then
Reset_1 <='0';
Reset_2 <= Reset_1;
Reset_LED <='0';
End If;
Reset_out <= Reset_1;
End process;
OR
ResetProc: Process (DPR_CLK, Reset_switch)
Begin
If ( Reset_switch = '1') Then
Reset_1 <='1'; -- Signal
Reset_2 <='1'; -- Signal
Reset_LED <='1';
elsif rising_edge(DPR_CLK) then
Reset_1 <='0';
Reset_2 <= Reset_1;
Reset_LED <='0';
End If;
End process;
Reset_out <= Reset_2;
Regards,
John
Please advice which is the most efficient way to synchronize the
external ( hardware ) Reset signal with the clock. I am using Quatrus
II 7.2 version. The first piece of code generates a D flip flop , gets
Reset_1 as an input and generates a Reset_out output. The Reset _ 1
and the Reset_output are not directly conencted to each other like
with a wire or compiler is not shorting the input of the flip flop to
the output of the flip flop.
The second piece of code generates the D flip flop and connects input
of the flip flop to the output directly via a wire. I can see that in
the RTL viewer. that the Quatrus is shorting the input of the flip
flop to the output of the flip flop but it works fine too practically.
I am confused which is the right choice because of my lack of VHDL
experience.
ResetProc: Process (DPR_CLK, Reset_switch)
Begin
If ( Reset_switch = '1') Then
Reset_1 <='1';
Reset_2 <='1';
Reset_LED <='1';
elsif rising_edge(DPR_CLK) then
Reset_1 <='0';
Reset_2 <= Reset_1;
Reset_LED <='0';
End If;
Reset_out <= Reset_1;
End process;
OR
ResetProc: Process (DPR_CLK, Reset_switch)
Begin
If ( Reset_switch = '1') Then
Reset_1 <='1'; -- Signal
Reset_2 <='1'; -- Signal
Reset_LED <='1';
elsif rising_edge(DPR_CLK) then
Reset_1 <='0';
Reset_2 <= Reset_1;
Reset_LED <='0';
End If;
End process;
Reset_out <= Reset_2;
Regards,
John