SC-DURING Library: Parallel Programming with SystemC

sc-during home page :

The sc-during library targets loosely timed systems, for which most other SystemC parallelization approaches are ineffective. It runs on top of any (unmodified) SystemC implementation.

Installation instructions are available in the INSTALL file of the source distribution.

The testsuite also serves as a set of examples. Start, for example, with the file simple.cpp. An example of call to the during library is:

SC_MODULE(A), sc_during {
void compute() {
// ...
during(10, SC_NS, [this] { f(); });
// ...
// ...

The lambda function is a way to create a 'void(void)' function with bindings to 'this' and other parameters. The std::bind way is similar and can also be used. This function will be executed during 10 nanoseconds of simulated time.

The primitives usable from within a during task are described in the sc_during_if interface.

At the end of simulation (i.e. after the call to sc_start() and before the destructors of modules are called at the end of sc_main()), the sc_during::terminate_all() static function should be called, to make sure all during tasks are stopped.

The build infrastructure generated several binaries for this source program: