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

Blocking and Eventing

SystemC originally provided a type called lambda for building predicate functions that could be registered with the EDS kernel so that the kernel could interpret them when it wished and hence determine when a process was unblocked.

However, they were cumbersome to use. They illustrate some of the issues typical to using a language like C++ for a purpose it was not designed for.

The recommended approach now is just to use spinlocks.

     waituntil(mycount.delayed() > 5 && !reset.delayed());
is replaced with the simple
     do { wait(0, SC_NS); }  while(!((mycount > 5 && !reset)));

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