hisl_0011: Usage of Switch Case blocks and Action Subsystem blocks
R2026bTo support verifiable generated code, when using the Switch Case block
Usage: High-Integrity System Modeling
Guideline ID: hisl_0011
Prerequisite: hisl_0016: Usage of blocks that compute relational operators
Rules
| hisl_0011: Usage of Switch Case blocks and Action Subsystem blocks | |
|---|---|
| A | Select block parameter Show default case. Rationale Support generation of verifiable code. Verification Check usage of Switch Case blocks and Switch Case Action Subsystem blocks (Simulink Check) Example — Correct Switch Case block with default case selected and all outports connected to Switch Case Action Subsystem blocks.
|
| B | Connect the outports of the Switch Case block to a Switch Case Action Subsystem block. Rationale Support generation of verifiable code. Verification Check usage of Switch Case blocks and Switch Case Action Subsystem blocks (Simulink Check) |
| C | Use an integer data type or an enumeration value for the inputs to Switch Case blocks. Rationale Support generation of verifiable code. Verification Check usage of Switch Case blocks and Switch Case Action Subsystem blocks (Simulink Check) |
Tips
The combination of Switch Case and If Action Subsystem blocks enable conditional execution based on input conditions. Provide a default path of execution in the form of a “Default” block.
Industry Standards
DO-331, Section MB.6.3.2.d – 'Low-level requirements are verifiable'
DO-331 Section MB.6.3.2.b – Low-level requirements are accurate and consistentIEC 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(b) 'Use of language subsets'
ISO 26262–6, Table 1(d) '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.1
