hisl_0006: Usage of While Iterator blocks
R2026bSet maximum number of iterations for While Iterator blocks to support bounded iterative behavior
Usage: High-Integrity System Modeling
Guideline ID: hisl_0006
Rules
| hisl_0006: Usage of While Iterator blocks |
|---|
To support bounded iterative behavior in the generated code when using the While Iterator block, set block parameter Maximum number of iterations to a positive integer value. Rationale Support bounded iterative behavior in the generated code. Verification Check usage of While Iterator blocks (Simulink Check) |
Tips
When you use While Iterator subsystems, set the maximum number of iterations. If you use an unlimited number of iterations, the generated code might include infinite loops, which lead to execution-time overruns.
To observe the iteration value during simulation and determine whether the loop reaches the maximum number of iterations, select the While Iterator block parameter Show iteration number port. If the loop reaches the maximum number of iterations, verify the output values of the While Iterator block.
Industry Standards
DO-331, Section MB.6.3.2.g – 'Algorithms are accurate'
IEC 61508-3, Table A.3 (3) 'Language subset'
IEC 61508-3, Table A.4 (3) 'Defensive programming'IEC 62304, 5.5.3 - Software Unit acceptance criteria
ISO 26262-6, Table 1 (1b) 'Use of language subsets'
ISO 26262-6, Table 1 (1d) 'Use of defensive implementation techniques'EN 50128, Table A.4 (11) 'Language Subset'
EN 50128, Table A.3 (1) 'Defensive Programming'EN 50657, Table A.4 (11) 'Language Subset'
EN 50657, Table A.3 (1) 'Defensive Programming'EN 50716, Table A.3 (1) 'Defensive Programming'
MISRA C:2012, Rule 14.2
MISRA C:2012, Rule 16.4
MISRA C:2012, Dir 4.1MISRA C:2023, Rule 14.2
MISRA C:2023, Rule 16.4
MISRA C:2023, Dir 4.1INT32-C. Ensure that operations on signed integers do not result in overflow