how to get wallclock time between any two events (not simula

K

kevs

Guest
The problem is that i want to know how much real time has elapsed
between two events that have occured .
for eg;
if an assignment a<= 0 occurs at simulation time =0s and real time =
0s
and the assignment a<= 1fs occurs at simulation time = 1s and real
time = 1 day (just say the processor is very slow)

so i want to get the answer 1 day and not 1fs
one option that i thought was of writing a file at both the points and
thereby getting 2 files with different time stamp but it is very
crude method and would consume lot of space if i want to do
recursively

I am using modelsim so any such construct in model sim or any package
that is available online ?

thanks in advance
 
On May 16, 6:44 pm, kevs <kevin36...@yahoo.com> wrote:
The problem is that i want to know how much real time has elapsed
between two events that have occured .
for eg;
if an assignment a<= 0 occurs at simulation time =0s and real time =
0s
and the assignment a<= 1fs occurs at simulation time = 1s and real
time = 1 day (just say the processor is very slow)

so i want to get the answer 1 day and not 1fs
one option that i thought was of writing a file at both the points and
thereby getting 2 files with different time stamp but it is very
crude method and would consume lot of space if i want to do
recursively

I am using modelsim so any such construct in model sim or any package
that is available online ?

thanks in advance
sorry abt the line
and the assignment a<= 1fs occurs at simulation time = 1s and real
time = 1 day (just say the processor is very slow)

i actually meant
nd the assignment a<= 1 occurs at simulation time = 1fs and real
time = 1 day (just say the processor is very slow)
 
On May 16, 2:52 pm, kevs <kevin36...@yahoo.com> wrote:
On May 16, 6:44 pm, kevs <kevin36...@yahoo.com> wrote:





The problem is that i want to know how much real time has elapsed
between two events that have occured .
for eg;
if an assignment a<= 0  occurs at simulation time =0s  and real time > > 0s
and the assignment a<= 1fs occurs at simulation time = 1s and real
time = 1 day (just say the processor is very slow)

so i want to get the answer 1 day and not 1fs
one option that i thought was of writing a file at both the points and
thereby getting 2 files with different time stamp  but it is very
crude method and would consume lot of space if i want to do
recursively

I am using modelsim so any such construct in model sim or any package
that is available online ?

thanks in advance

sorry abt the line
and the assignment a<= 1fs occurs at simulation time = 1s and real
 time = 1 day (just say the processor is very slow)

i actually meant
nd the assignment a<= 1 occurs at simulation time = 1fs and real
 time = 1 day (just say the processor is very slow)- Hide quoted text -

- Show quoted text -
I expect this will be simulator specific.

In ModelSim, you can call the mti_Command() FLI command to execute a
simulator or TCL command from within your VHDL, with any results
echoed in the transcript.

The simstats command gives various info about a simulation run,
including wall clock time, so a combination of these two should get
you what you're after.

Cheers

- Nigel
 
On May 16, 7:23 pm, NigelE <nigel_ell...@mentor.com> wrote:
On May 16, 2:52 pm, kevs <kevin36...@yahoo.com> wrote:



On May 16, 6:44 pm, kevs <kevin36...@yahoo.com> wrote:

The problem is that i want to know how much real time has elapsed
between two events that have occured .
for eg;
if an assignment a<= 0 occurs at simulation time =0s and real time =
0s
and the assignment a<= 1fs occurs at simulation time = 1s and real
time = 1 day (just say the processor is very slow)

so i want to get the answer 1 day and not 1fs
one option that i thought was of writing a file at both the points and
thereby getting 2 files with different time stamp but it is very
crude method and would consume lot of space if i want to do
recursively

I am using modelsim so any such construct in model sim or any package
that is available online ?

thanks in advance

sorry abt the line
and the assignment a<= 1fs occurs at simulation time = 1s and real
time = 1 day (just say the processor is very slow)

i actually meant
nd the assignment a<= 1 occurs at simulation time = 1fs and real
time = 1 day (just say the processor is very slow)- Hide quoted text -

- Show quoted text -

I expect this will be simulator specific.

In ModelSim, you can call the mti_Command() FLI command to execute a
simulator or TCL command from within your VHDL, with any results
echoed in the transcript.

The simstats command gives various info about a simulation run,
including wall clock time, so a combination of these two should get
you what you're after.

Cheers

- Nigel
hey buddy thanks a lot i was able to get it but i wanted time in
nanoseconds
so i used date +%N of linux to get the time in nanosecods
but the good news is that i learnt FLI nd got my problem solved
:)
 

Welcome to EDABoard.com

Sponsor

Back
Top