How to show the current simulation time

B

boku0712

Dear all,
How to use "now" to display the current simulation time? Thank
you~~~

Best Regards,
 
M

Mike Treseler

Dear all,
How to use "now" to display the current simulation time? Thank

Easiest way is to use the report command.
If I say:

report " Hello World!" ;

in my testbench,
I will get this in the transcript:

# ** Note: Hello World!
# Time: 105 ns Iteration: 1 Instance: /test_mydesign

-- Mike Treseler
 
P

Paul Uiterlinden

Dear all,
How to use "now" to display the current simulation time? Thank
you~~~

USE std.textio.ALL;
....
VARIABLE l: line;
....
write(l, string'("The current simulation time is: "));
write(l, now);
writeline(output, l);

This will write to stdout: the simulator window.
 

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,021
Latest member
AkilahJaim

Latest Threads

Top