Time stamp on VHDL simulation log file

Guest #2650490
Rate this post
useful
not useful
Is it possible to get the system date/time in my VHDL simulation (it is 
a test bench written in VHDL). I want to include the date/time in the 
name of the log file(that I create and write to using texio) so they 
don't over right each other. I am using ModelSim 6.6 to run it if that 
matters.
Guest #2653056
Rate this post
useful
not useful
Yes. You can use TCL to build a "time"-string and give it to your 
simulation as generic, like in this example:
1
set logfilename "logfile_"
2
append logfilename [clock format [clock seconds] -format %H_%M]
3
vsim -Glogfilename=$logfilename work.entity

Duke

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now