Two types of test benches are available in statecharts:
The Every Step Testbenches run the task
Testbench
. This task executes every step. The Only Once Testbenches run the taskTestBench_run_once
. TheTestBench_run_once
task executes only once on startup. In the OSI’s (mainloop_sc
andmainloop_sc_ext
), the call to the generated function:
●TestBench_run_once
is (by default) put in the fileuser_code.c
(<profile>.c), after the call to the call toTASKINIT()
.
●
● The preprocessor flag is generated in the filecmp_flg.h
if there are such Only Once testbenches.
●
●
Possible Values: “Every Step” - runs under the Task TestBench, which runs every step, used as the default value.
●
“Only Once” - runs under the Task “TestBench_run_once,” which runs only once on system startup.
●
The Design-Attributes are available for update from the OSI’s:
MAINLOOP_SC
MAINLOOP_SC_EXT
DEFAULT