S
Steve
I'm designing a simple VHDL system, which is driven by a clock. Is it bad
practice to use both clock edges in my system.
The system I'm working on needs to output data, which must be valid while
the clock is high. So I was thinking I could use the falling edge to set
everything up. It must also read data, which is also valid while the clock
is high. To do this, I could use the rising edge.
For example:
p1 : process(CLK)
begin
if rising_edge(CLK) then
blah blah blah (read data)
end if;
end process p1;
p2 : process(CLK)
begin
if falling_edge(CLK) then
blah blah blah (write data)
end if;
end process p2;
This would make my job easier, but is it a good way to do things? Most
examples I have seen tend to use one edge of a clock.
practice to use both clock edges in my system.
The system I'm working on needs to output data, which must be valid while
the clock is high. So I was thinking I could use the falling edge to set
everything up. It must also read data, which is also valid while the clock
is high. To do this, I could use the rising edge.
For example:
p1 : process(CLK)
begin
if rising_edge(CLK) then
blah blah blah (read data)
end if;
end process p1;
p2 : process(CLK)
begin
if falling_edge(CLK) then
blah blah blah (write data)
end if;
end process p2;
This would make my job easier, but is it a good way to do things? Most
examples I have seen tend to use one edge of a clock.