Testbench doubt

V

VHDL User

Hi all,
Suppose I want to write a testbench for a design that simulates the
design for a suffciently long time,so that wait for <t> statements are
obv. inadequate .Will a statement
wait;
do the job?
as in causing simulation to run forever?
An y other ideas as to how a long simulation time may be met ?
 
M

Mike Treseler

VHDL User wrote
An y other ideas as to how a long simulation time may be met ?

The simulation will continue until
all processes reach a wait statement.

If one process, say the simulation clock,
never reaches a wait, the simulation
will run indefinitely.

-- Mike Treseler
 
N

Niels Bakker

Mike said:
VHDL User wrote



The simulation will continue until
all processes reach a wait statement.

If one process, say the simulation clock,
never reaches a wait, the simulation
will run indefinitely.

-- Mike Treseler

If all your processes are synchronous, and suppose your clock signal is
called 'clk' and of type std_logic.

Use a boolean signal 'simulate' as follows:

....
simulate <= true, false after 2 ms;
clk <= NOT clk after 5 ns WHEN simulate ELSE '0';
....

Your simulation will end after 2 ms, since the clock stops running and
there are no other stimuli left.

Niels Bakker
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top