Batch Mode Simulation : Breakpoints : Every numeric_expression

Every numeric_expression

The numeric expression is first evaluated at the end of the breakpoint definition and then, each time at the end of the breakpoint execution. The obtained value defines when the breakpoint is triggered the next time.

If the matching time has not passed, then the breakpoint’s statements are executed according to the trigger’s original evaluation. If the matching time has passed when the Simulation Control Program was suspended, then the numeric expression is re-evaluated at the time of resumption and the breakpoint triggering is scheduled relative to this time.

For example, if the breakpoint trigger is every GO and the execution clock units are in seconds, then the breakpoint statements are executed at one minute intervals. Assume the breakpoint is in a Simulation Control Program assigned to an activity which was suspended from time 01:30 to 01:55. Since the execution clock has not passed beyond the next breakpoint (02:00), this breakpoint’s scheduled execution remains at the original interval. Assume the activity is later suspended from time 05:36 to 10:08. When resumed, the breakpoint trigger is re-evaluated because the current time has passed the next scheduled interval (06:00). The breakpoint is executed thereafter at new one minute intervals of 11:08, 12:08, etc.

Examples:
1.
The associated SCL statements keep track of the execution time in minutes and display the minutes elapsed every minute. The assumed Global Clock Unit is seconds.

SET BREAKPOINT check => EVERY 60

DO

x := x +1

WRITE(x,’Simulation minutes passed \n’)

END BREAKPOINT

2.

SET BREAKPOINT [ NONDETERMINISM ]

DO

RANDOM_SOLUTION ;

WRITE(’Nondeterminism situation

solved randomly. \n’)

END BREAKPOINT

3.

SET BREAKPOINT device_full =>

[ max_buf > 7 ]

DO

WRITE(’Device full -

taking recovery action \n’)

WHEN tr(aux_buf_empty) THEN switch_bufs

ELSE

WHEN tr(aux_buf_ful) THEN st!(A)

ELSE

WRITE(’Something missing

in recovery procedure \n’)

END WHEN

END WHEN

error := error +1

END BREAKPOINT