hisl_0022: Data type selection for index signals
R2026bUse an appropriate data type for index signals to prevent unexpected results and enable correct data access
Usage: High-Integrity System Modeling
Guideline ID: hisl_0022
Rules
| hisl_0022: Data type selection for index signals | |
|---|---|
| A | For index signals, use an integer or enumerated data type. Blocks that use a signal index include:
Rationale Prevent unexpected results that can occur with rounding operations for floating-point data types. Verification Check data types for blocks with index signals (Simulink Check) |
| B | For index signals, use a data type that covers the range of indexed values. Blocks that use a signal index include:
Rationale Enable access to data in a vector. Verification Check data types for blocks with index signals (Simulink Check) |
Industry Standards
IEC 61508–3, Table A.3 (2) 'Strongly typed programming language'
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 (1c) 'Enforcement of strong typing'
ISO 26262-6, Table 1 (1d) 'Use of defensive implementation techniques'
EN 50128, Table A.4 (8) 'Strongly Typed Programming Language'
EN 50128, Table A.3 (1) 'Defensive Programming'
EN 50657, Table A.4 (8) 'Strongly Typed Programming Language'
EN 50657, Table A.3 (1) 'Defensive Programming'
EN 50716, Table A.3 (1) 'Defensive Programming'
DO-331, Section MB.6.3.2.g – 'Algorithms are accurate'
FLP30-C. Do not use floating-point variables as loop counters