Modelsim script to print simulation progress and a TCL question

A long time ago there was a thread on comp.arch.fpga regarding how to regularly print out some information about the simulation progress. The thread was fairly short and no real progress was made to a solution which was really satisfactory (at least not in my opinion).

I revisited this topic today while waiting for a long simulation and came up with a TCL script which will print out the following info when run in Modelsim:

*** SIMINFO: Simulator time is 272071220000 ps, real time is Thu Jul 14 11:05:57 PM CEST 2011 *** SIMINFO: Simulation speed is about 2314451469 (simulated) ps per second *** SIMINFO: Simulation has run for 13603561 clock cycles on /tb/clk *** SIMINFO: Simulation is running at about 115722 (simulated) cycles per second

This is nice when running a simulation in batch mode where it is not possible to see the current time. I guess the script will also be convenient when benchmarking a few different computers for use with Modelsim since it will print out how fast the simulator is running.

If you are interested you can download the script from my homepage:

formatting link

And if you happen to notice some bug or figure out some way to improve it, please let me know :) The script has been tested with ModelSim SE-64 6.6 but it will hopefully work with some other versions as well. (Let me know if it doesn't and I'll try to fix it for at least semi-modern versions.)

By the way, if anyone happens to know how to ask Modelsim whether a certain entity is a parameter I would be quite happy.

I know how to use the examine commands to identify inputs, outputs, inouts, and internal signals. I also know how to use the mem list command to identify a memory. At this point I can eliminate most other internal signals by using the find command, but this is quite an ugly hack and there are probably other things which the find net and find signal command will ignore besides parameters.

regards /Andreas

Reply to
Andreas Ehliar
Loading thread data ...

11:05:57 PM CEST 2011

second

If you want to use it for benchmarking I would suggest to use the simstats command to extract the time rather than the Tcl wallclock which is obviously affected by other processes running on the computer.

Apart from that nice :-)

Hans

formatting link

Reply to
HT-Lab

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.