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

Within SystenC, there is no direct equivalent to the continuous assignment of Veriog. But the `fully-supported' sensitivity list always @(*) or always_comb can be reproduced with an SC_METHOD if you manually list the supporting nets.

More-efficient performance gained by putting the continuous assignment behaviour in a method and remembering to call just after whenever the support is changed in other parts of the model.

Fortunately, for TLM designs, there will be very little continuous assignment needed (e.g. perhaps just for interrupt routing).


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