EmbDev.net

Forum: FPGA, VHDL & Verilog Time stamp on VHDL simulation log file


von ams56 (Guest)


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.

:
von Duke Scarring (Guest)


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

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.