Documente Academic
Documente Profesional
Documente Cultură
end TB_TEST;
-- complex version
-------------Reset generation
assert now>100*PERIOD
report "End of simulation"
severity failure;
--------------Simulation termination via
assert
• The clock stimulus is the most important
one for synchronous designs. It can be
created either with a concurrent signal
assignment or within a clock generation
process. As a process requires a lot of
"overhead" when compared to the
implemented functionality, the concurrent
version is recommended.
• In the most simple form shown on top, the clock
runs forever and is symmetric. As the signal
value is inverted after half of the clock period,
the initial signal value must not be 'u', i.e. its start
value has to be explicitly declared. The more
elaborated example below shows the generation
of an asymmetric clock with 25% duty cycle via
conditional signal assignments. Please note that
the default signal value needs not to be specified
because of the unconditional else path that is
required by the conditional signal assignment.
• The complete simulation is stopped after
100 clock cycles via the ASSERT
statement. Of course, the time check can
be included in a conditional signal
assignment as well.
• Clocks with a fixed phase relationship are
modeled best with the ' delayed ' attribute similar
to the following VHDL statement:
"CLK_DELAYED <= W_CLK'delayed(5 ns);"