Anon Anon wrote:
> Testbed:
>
> process exercise_the_entity(clk)
> begin
> if rising_edge(clk) then
> <set up data etc for the entity>
> Execute <= ‘1’; -- start the processing
> Else -- must be falling edge of CLK
> Execute <= ‘0’; -- clear the flag, in case it’s set
> End if;
> end process;
In a testbed (testbench) you usually write behavioral code, so there are no
restriction on constructs you can use. This includes using both edges of a
clock.
> This doesn’t feel right to me, since it means that I’m making changes on
> the falling edge of the clock – which I understand to be a bad thing.
Things are not bad "per definition". Using the falling edge of a clock in a
testbench is one of those things.
> In addition, is this likely to be synthesisable?
No, but does that matter? As I understand, this is testbench code, which
normally is not synthesized. Unless you are trying to load part of the
testbench in an emulator.
--
Paul Uiterlinden
www.aimvalley.nl
e-mail addres: remove the not.