Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Exact simulation time in ModelSim

 
Thread Tools Search this Thread
Old 09-03-2007, 02:53 PM   #1
Default Exact simulation time in ModelSim


Hi there,

Does anybody know how to measure the exact runtime of a simulation in
ModelSim PE? Also is it possible to measure the time ModelSim takes to
compile a VHDL file?

Thanks for any help
Jaco



Jaco Naude
  Reply With Quote
Old 09-03-2007, 03:08 PM   #2
Jonathan Bromley
 
Posts: n/a
Default Re: Exact simulation time in ModelSim
On Mon, 03 Sep 2007 06:53:55 -0700, Jaco Naude <>
wrote:

>Hi there,
>
>Does anybody know how to measure the exact runtime of a simulation in
>ModelSim PE? Also is it possible to measure the time ModelSim takes to
>compile a VHDL file?
>
>Thanks for any help
>Jaco


Use the Tcl [time] command to launch your activity
from a ModelSim command prompt, in either command-line
or GUI mode:

set compiletime [time {vcom myfile.vhd}]
set runtime [time {vsim -do "run -all" my_toplevel}]

The resulting strings $compiletime and $runtime will
be of the form

286738 microseconds per iteration

The "per iteration" part is because Tcl's [time] command
allows you to run the command in question more than once,
to get a better estimate: try this at the ModelSim
command line...

time {puts hello} 5

But, for long-running activity like compile and sim,
it will be sufficient to run the command just once.

Of course you can easily massage the result string
using standard Tcl to get the values you want:

regexp {\d+} $compiletime ct_microsecs
set ct_secs [expr {$ct_microsecs / 1000000.0}]
puts [format "Compilation time was %6.4f seconds" $ct_secs]

and so on, ad nauseam.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK

http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.


Jonathan Bromley
  Reply With Quote
Old 09-03-2007, 04:42 PM   #3
Jaco Naude
 
Posts: n/a
Default Re: Exact simulation time in ModelSim
Jonathan,

That did the job, thanks alot for the help.

Jaco



Jaco Naude
  Reply With Quote
Old 09-03-2007, 07:39 PM   #4
HT-Lab
 
Posts: n/a
Default Re: Exact simulation time in ModelSim

"Jaco Naude" <> wrote in message
news: ups.com...
> Hi there,
>
> Does anybody know how to measure the exact runtime of a simulation in
> ModelSim PE? Also is it possible to measure the time ModelSim takes to
> compile a VHDL file?


Hi Jaco,

For simulation use the simstats command which gives you the real cpu time,
you can also use "vsim -printsimstats" which gives the same results. If you
are using Linux/Cygwin then you can also use "time vsim -c ..." or if you
want something more complex looking

vsim -c -do "exec ps -ef | grep vsim; run -a; exec ps -ef | grep vsim;
quit -f"

Hans.
www.ht-lab.com


>
> Thanks for any help
> Jaco
>





HT-Lab
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NetFlix TurnAround Time: Does This Look Familiar? V.S. DVD Video 19 12-24-2003 07:44 AM
Re: Is A+ certification a waste of time and money? Peter H A+ Certification 2 09-06-2003 03:27 PM
Re: Panasonic & Pioneer DVD players - time remaining display and black level settings? SloPoke DVD Video 0 08-18-2003 02:40 PM
Re: 7. The truth about our creator. .7 john smith DVD Video 2 07-25-2003 03:54 AM
Once Upon A Time In America Larry Gold DVD Video 1 06-28-2003 10:25 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46