HOME       UP       PREV       FURTHER NOTES       NEXT (Verilog RTL: Modules, Protocols and Interfaces)  

Blocking and Eventing

A SystemC thread can block for a given amount of time using the wait function in the SystemC library (not the Posix namesake).

Waiting for an arbitrary boolean expression to hold hard to implement on top of C++ owing to its compiled nature:

     waituntil(mycount.delayed() > 5 && !reset.delayed());

Poor user had to just insert the delayed keyword where needed and then ignore it when reading the code.

It was too unwieldly, now removed. So today (pre C++11) use the less-efficient:

     do { wait(10, SC_NS); }  while(!((mycount > 5 && !reset)));


26: (C) 2012-14, DJ Greaves, University of Cambridge, Computer Laboratory.   TAPE MISSING ICON