1

Is there a function in SystemC which returns the time of the next event? Or if does not exist, then how to implement it?

For example I have clock model with 1 MHz frequency and I run the model with sc_start(100, SC_NS). The next scheduled event is at 500 ns.

The code looks like this:

..
sc_start(100, SC_NS);
next_time = get_next_event_time(); //get_next_event_time() should return with 500
..
jsmith
  • 127
  • 2
  • 13

1 Answers1

1

You can use sc_time_to_pending_activity() to get the time until the earliest pending activity. More details are available in IEEE Std 1666-2011 at 4.5.7 Functions to detect pending activity

Guillaume
  • 1,277
  • 8
  • 11