Home > Community > Forums > Functional Verification > time between two events

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 time between two events 

Last post Thu, Oct 11 2012 3:42 AM by StephenH. 4 replies.
Started by pravintavagad 11 Oct 2012 03:04 AM. Topic has 4 replies and 1392 views
Page 1 of 1 (5 items)
Sort Posts:
  • Thu, Oct 11 2012 3:04 AM

    • pravintavagad
    • Not Ranked
    • Joined on Tue, Jul 10 2012
    • Satara, Maharashtra
    • Posts 8
    • Points 175
    time between two events Reply

    Hi all is there any way by which i can measure time between two events (Specman e code)??

    e.g. time between two resets

    Filed under:
    • Post Points: 35
  • Thu, Oct 11 2012 3:15 AM

    • hannes
    • Top 150 Contributor
    • Joined on Fri, Nov 14 2008
    • Bracknell, Berkshire
    • Posts 43
    • Points 785
    Re: time between two events Reply

    you have sys.time and sys.realtime. You can log the time value when an event happens (using for example and on block) and next time  you can calculate the delta.

    -hannes

    • Post Points: 5
  • Thu, Oct 11 2012 3:21 AM

    • StephenH
    • Top 25 Contributor
    • Joined on Tue, Sep 2 2008
    • Bristol, Avon
    • Posts 258
    • Points 4,100
    Re: time between two events Reply

    Between two different events, or two occurences of the same event? Here's an example for the latter case, I'm sure you can figure out how to modify it for the former.

     

    extend sys {
      !last_time : time;
      event reset;
      on reset {
        var delta := last_time - sys.time;
        print delta;
        last_time = sys.time;
      };
    };
    
    Steve Hobbs / Applications Engineer / Cadence Functional Verification
    Filed under:
    • Post Points: 20
  • Thu, Oct 11 2012 3:29 AM

    • pravintavagad
    • Not Ranked
    • Joined on Tue, Jul 10 2012
    • Satara, Maharashtra
    • Posts 8
    • Points 175
    Re: time between two events Reply
    I have start and end signals in my design. Start is asserted when burst starts and end is asserted when burst ends.

    My task is to measure the time between start and end signals. I am emmiting events on start and end. so how can i measure time between thses two events?? ( i have to continuously do this in my testbench to calculate latency)
    Filed under:
    • Post Points: 20
  • Thu, Oct 11 2012 3:42 AM

    • StephenH
    • Top 25 Contributor
    • Joined on Tue, Sep 2 2008
    • Bristol, Avon
    • Posts 258
    • Points 4,100
    Re: time between two events Reply

    Well, modify my example by having two "on" blocks, one for the start event and one for the end event.

    Sample the time in the start block, and compute the delta in the end block.

     

    Steve Hobbs / Applications Engineer / Cadence Functional Verification
    Filed under:
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by pravintavagad at 11 Oct 2012 03:04 AM. Topic has 4 replies.