HOME       UP       PREV       FURTHER NOTES       NEXT (Transactional Handshaking)  

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


24: (C) 2008-11, DJ Greaves, University of Cambridge, Computer Laboratory.