The sensitivity of a process instance is the set of events and time-outs that can potentially cause the process to be resumed or triggered.
A process instance is said to be sensitive to an event if the event has been added to the static sensitivity or dynamic sensitivity of the process instance.
A time-out occurs when a given time interval has elapsed.
Two types of sensitivities:
1. Static sensitivity is fixed during elaboration, supported with a sensitivity list for each process in a module.
2. Dynamic sensitivity may vary over time under the control of the process itself, support with wait() for a thread, or next_trigger() for a method.
Learn with Examples, 2020, MIT license
#include<systemc>
usingnamespace sc_core;
SC_MODULE(SENSITIVITY) {
events for inter-process triggering
sc_event e1, e2;
SC_CTOR(SENSITIVITY) {
register processes
SC_THREAD(trigger_1);
SC_THREAD(trigger_2);
SC_THREAD(catch_1or2_dyn);
SC_THREAD(catch_1or2_static);
static sensitivity for the preceeding process, can only "OR" the triggers
sensitive << e1 << e2;
}
voidtrigger_1(){
delay trigger by a delta cycle, make sure catcher is ready