Sytem date

M

Monika Talwar

Hi all,
Is there any way to extract system date during run time from VHDL simulation?
I am using Modelsim. I dont want to use PLI or any

Thanks in advance
With warm regards
Mona
 
T

Tim Hubberstey

Monika said:
Hi all,
Is there any way to extract system date during run time from VHDL simulation?
I am using Modelsim. I dont want to use PLI or any

I'm not sure exactly what you want here but I'll take a stab at it
anyway.

ModelSim's command language is Tcl and is a powerful language in its own
right. You can print the date to the transcript file using:

clock format [clock seconds]

You can also have it accessible to your testbench and/or embed it in the
..wlf file by defining a 112-bit signal in your VHDL testbench, lets call
it date_time, and executing the following from the Tcl prompt (main
window) before you start your simulation:

force date_time 16#[clock format [clock seconds] -format
"%Y%m%d%H%M%S"]

This will assign the hex value of the date/time, in yyyymmddHHMMSS
format, to the date_time vector. You can then add this vector to your
wave window or use it inside your testbench. If you want to update this
vector as simulation progresses, you need to check out the "when"
command.

Note that this method is NOT portable to other simulators.
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top