Iterator Subsystems
Aniterator subsystemruns one or more times at the current time step when enabled by a control block. Acontrol blockimplements control logic similar to that expressed by programming language loop constructs such aswhile
orfor
.
Use aWhile Iterator Subsystemblock to repeat execution of an algorithm as long as a logical condition is true.
Use aFor Iterator Subsystemblock to repeat execution of an algorithm until an iteration variable exceeds a specified iteration limit.
Use aFor Each Subsystemblock to apply an algorithm to individual elements or subarrays of input signals or mask parameters.
Note
Each block inside a For Each subsystem that has states maintains a separate set of states for each element or subarray processed by the subsystem. By contrast, blocks inside While Iterator and For Iterator subsystems use the same states throughout successive iterations of the subsystem.
Blocks
While Iterator Subsystem | Repeat subsystem execution during simulation time step while logical expression is true |
For Iterator Subsystem | Repeat subsystem execution during simulation time step for specified number of iterations |
For Each Subsystem | Apply algorithm to individual elements or subarrays of input signals or mask parameters |
Topics
- Iterate Subsystem Execution with While Iterator and For Iterator Subsystems
Execute subsystem multiple times during time step in response to control block.
- Repeat an Algorithm Using a For-Each Subsystem
Iterate algorithm over groups of signals, subsystems, and parameters.
- Log Signals in For Each Subsystems
Use signal logging in For Each subsystems.