HOME       UP       PREV       FURTHER NOTES       NEXT (Power Estimation: RTL versus ESL)  

ESL Loose Timing Continued

The quantum keeper code is just a conditional resynch:

  void keeper(ref delay) { if (delay > global_q) { wait(delay); delay = 0; } }

By calling sc_wait(delay) the simulation time will advance to where the caller has got to while running other pending processes. The myQuantum could be a system default value or a special value for each thread or component.

(We here write sc_wait to emphasise it is the SystemC kernel primitive systemc::wait, not the unix call.)

Or where a thread needs to spin, waiting for a result from some other thread:

  while (!condition_of_interest)
  {
    wait(delay);
    delay = 0;
  }  

Generally, we can choose the quantum according to our current modelling interest:

Transactions may execute in a different sequence from reality: sequential consistency compromised ? Bugs exposed?


34: (C) 2008-18, DJ Greaves, University of Cambridge, Computer Laboratory.