That is because SC_METHOD
does not have its own thread of execution. Every time an event on an SC_METHOD
sensitivity list is triggered, the SC_METHOD
's code is (ideally) entirely executed. In other words, calling wait()
in an SC_METHOD
would freeze the simulation itself.
In contrast, an SC_THREAD
has its own thread of execution and its activity is generally modeled inside a loop containing or not wait()
statements, which pauses the execution of the thread. Whenever an event (of the sensitivity list) is triggered, the execution is resumed at the command that follows the previously issued wait()
.