HOME       UP       PREV       FURTHER NOTES       NEXT (Pre-TLM Software Style Channels)  

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).

Wait on arbitrary boolean condition is harder to implement owing to the compiled nature of C++:

     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: use the less-efficient

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

(C) 2008-10, DJ Greaves, University of Cambridge, Computer Laboratory.