F
fl
Guest
Hi,
I see the following in a VHDL book and some web tutorial. It is used
to detect clk rising edge.
-----------------
if clk'event and clk'value='1' and clk'last_value='0'
then ...
-- to detect setup time
------------------
I think if clk'event(true) and clk'value='1', then clk'last_value will
be '0' unconditionally. That is, "clk'last_value='0'" is redundant. Is
it?
My question is a lot of process only uses the following to write clk
rising edge:
process (clk)
begin
if clk'event and clk='1'
end process;
I am confused with the above two usage.
Could you explain it for me? Thanks a lot.
I see the following in a VHDL book and some web tutorial. It is used
to detect clk rising edge.
-----------------
if clk'event and clk'value='1' and clk'last_value='0'
then ...
-- to detect setup time
------------------
I think if clk'event(true) and clk'value='1', then clk'last_value will
be '0' unconditionally. That is, "clk'last_value='0'" is redundant. Is
it?
My question is a lot of process only uses the following to write clk
rising edge:
process (clk)
begin
if clk'event and clk='1'
end process;
I am confused with the above two usage.
Could you explain it for me? Thanks a lot.