• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. time between two events

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 65
  • Views 14873
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

time between two events

pravintavagad
pravintavagad over 12 years ago

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

e.g. time between two resets

  • Cancel
  • hannes
    hannes over 12 years ago

    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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 12 years ago

    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;
      };
    };
    
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • pravintavagad
    pravintavagad over 12 years ago
    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)
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 12 years ago

    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.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information