Jump to content
jsmith126x

how to get the time of the next event

Recommended Posts

Hi,

Is there a function in SystemC which returns the time of the next event? Or if not exists how to implement it?
For example I have clock model with 1MHz frequency and I run the model with sc_start(100, SC_NS).
The next scheduled event is at 500ns.

The code looks like this

..
sc_start(100, SC_NS);
next_time = get_next_event_time(); //get_next_event_time() should return with 500
..
 

Share this post


Link to post
Share on other sites

Have a look at clause 4.5.7 "Functions to detect pending activity" in the IEEE Std 1666-2011 SystemC LRM. The functions described in this clause should allow you to implement the functionality you are looking for.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...