How to calculate Simulation Time

P

priya

Guest
Hi ALL,

How do i calcalute the simulation time for Verilog Code.

For example take verilog Code for DflipFlop.Here i need to calculate
how much time the simulator will take to compile and excute the
DflipFlop Verilog Code.I am using Icarus Simulator.



regds,
priya
 
Priya,
It is slightly confusing as to what exactly you refer to with this
"time" - is it simulation time - if so "how many ns my sim has run
for"?
If so use $time

OTOH, if you wanted to measure wall clock time as to how long it took
to compile and run sim, use a simple UNIX date command before and after
simulation - there are other ways too.

HTH
Ajeetha
www.noveldv.com
 
Or if you wanted to measure the CPU time rather than the wall-clock
time, you could use the UNIX 'time' command.
 
OTOH, if you wanted to measure wall clock time as to how long it took
to compile and run sim, use a simple UNIX date command before and after
simulation - there are other ways too.

Ajeetha,urs is correct

I type in command line time && vvp -v a.out&& time
I got the below result......

D:\iverilog\bin>time &&vvp -v a.out &&time
The current time is: 10:19:33.18
Enter the new time:
Compiling VVP ...
Compile cleanup...
... Linking
... Removing symbol tables
... 9 functors
0 table
0 bufif
0 resolv
5 variable
... 17 opcodes (16384 bytes)
... 10 nets
... 0 memories
... 2 scopes
Running ...
the 10 1 0
Event counts: (event pool = 682)
5 thread schedule events
2 propagation events
2 assign events
0 other events
The current time is: 10:19:33.89

IT asked some enter new time..Till now I couldnt find the time what
exactly the simulator took to compile and run the code...

I need exact time Value...






Ajeetha wrote:
Priya,
It is slightly confusing as to what exactly you refer to with this
"time" - is it simulation time - if so "how many ns my sim has run
for"?
If so use $time

OTOH, if you wanted to measure wall clock time as to how long it took
to compile and run sim, use a simple UNIX date command before and after
simulation - there are other ways too.

HTH
Ajeetha
www.noveldv.com
 

Welcome to EDABoard.com

Sponsor

Back
Top