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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×