hisl_0054: Configuration Parameters > Code Generation > Optimization > Remove code that protects against integer division arithmetic exceptions
R2026bKeep division protection code to guard against divide-by-zero exceptions
Usage: High-Integrity System Modeling
Guideline ID: hisl_0054
Rules
| hisl_0054: Configuration Parameters > Code Generation > Optimization > Remove code that protects against integer division arithmetic exceptions |
|---|
To support the robustness of the operations, clear configuration parameter Remove code that protects against integer division arithmetic exceptions. Rationale Protect against divide-by-zero exceptions for fixed-point code. Verification Check safety-related optimization settings for integer division arithmetic exceptions (Simulink Check) |
Tips
Avoid division-by-zero exceptions. If you clear Remove code that protects against integer division arithmetic exceptions, the code generator produces code that guards against division by zero for fixed-point data.
This configuration parameter is applicable only when the System target file is an ERT-based target.
Industry Standards
DO-331, Section MB.6.3.1.g 'Algorithms are accurate'
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, Dir 4.1
MISRA C:2023, Dir 4.1
INT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
Version History
Introduced in R2010aSee Also
Remove code that protects against integer division arithmetic exceptions (Embedded Coder)