how to get wallclock time between any two events (not simulation time) in vhdl

Discussion in 'VHDL' started by kevs, May 16, 2008.

  1. kevs

    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
     
    kevs, May 16, 2008
    #1
    1. Advertising

  2. kevs

    kevs Guest

    Re: how to get wallclock time between any two events (not simulationtime ) in vhdl

    On May 16, 6:44 pm, kevs <> 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)
     
    kevs, May 16, 2008
    #2
    1. Advertising

  3. kevs

    NigelE Guest

    Re: how to get wallclock time between any two events (not simulationtime ) in vhdl

    On May 16, 2:52 pm, kevs <> wrote:
    > On May 16, 6:44 pm, kevs <> 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
     
    NigelE, May 16, 2008
    #3
  4. kevs

    kevs Guest

    Re: how to get wallclock time between any two events (not simulationtime ) in vhdl

    On May 16, 7:23 pm, NigelE <> wrote:
    > On May 16, 2:52 pm, kevs <> wrote:
    >
    >
    >
    > > On May 16, 6:44 pm, kevs <> 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
    :)
     
    kevs, May 17, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carson
    Replies:
    0
    Views:
    547
    Carson
    Oct 5, 2005
  2. jhduplessis
    Replies:
    6
    Views:
    1,138
    manasiw2
    Oct 24, 2007
  3. jasperng
    Replies:
    0
    Views:
    1,314
    jasperng
    Nov 27, 2008
  4. Replies:
    1
    Views:
    116
    Joel VanderWerf
    Mar 6, 2008
  5. Sijo Kg
    Replies:
    6
    Views:
    143
    Florian Aßmann
    Feb 15, 2009
Loading...

Share This Page