Jump to content

sc_start return on node change


Recommended Posts



Think about how simulation works in SystemC. 

Logical time advances with events (timestamps). And in a process, every line between two wait statements (or every line of a method) is executed without any time advance. 


So, if you want the simulation not to advance time after a specific event: don't let the execution of a process reach the next wait statement. 


E.g., you may have a method sensitive to the mentioned output port. In the execution of this method, you can synchronize with your environment (Operation system wait (physical/wall-clock-time), read or set button status, ...). When the synchronization is done, let the method return and the simulation will continue.




Link to post
Share on other sites



I'd like to run sc_start(duration) but to stop when a node change. Nodes are the out ports at top level.

Is there this feauture or could you give me guidlines how to implement it?


Maybe I did not understand your query correctly, but a sensitivity list

achieves your goal fairly easily. For example, if one were to simulate

a 2 input AND gate, then the first is set to logic '1', the second to '0'

and then sc_core::sc_start(<time duration>); is executed,

Then the first input is changed to logic '0' and the second to logic '1',

and sc_core::sc_start is invoked gain for the same time period. Hope

this helps.

Link to post
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...