using event attribute

Joined
Jan 30, 2009
Messages
42
Reaction score
0
I have the following code in a testbench

while not end_sim loop
if seconds_tp'event then
report integer'image(TO_INTEGER(unsigned(seconds_tp)));
end if;
wait for 100 ns;
end loop;
wait;

end_sim is false until the end of the simulation.

seconds_tp is a std_logic_vector that starts at 0 and increments by 1 every simulated second.

The idea is to display the value of simulated seconds elapsed while the simulation is running.

When the simulation is running no value for seconds_tp is displayed.
However, seconds_tp does display correctly on the waveform viewer when the simulation is stopped.

What am I missing here?
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top