hisl_0020: Blocks not recommended for MISRA C compliance
R2026bImprove MISRA C:2012 and MISRA C:2023 compliance of the generated code
Usage: High-Integrity System Modeling
Guideline ID: hisl_0020
Rules
| hisl_0020: Blocks not recommended for MISRA C compliance | |
|---|---|
| A | Use only blocks that support code generation, as documented in the Simulink® Block Support Table. Rationale Improve quality and MISRA C:2012 and MISRA C:2023 compliance of the generated code. Verification Check for blocks not recommended for MISRA C:2023 (Simulink Check) and Check for blocks not recommended for C/C++ production code deployment (Simulink Check) |
| B | Do not use blocks that are listed as "Not recommended for production code" in the Simulink Block Support Table. Rationale Improve quality and MISRA C:2012 and MISRA C:2023 compliance of the generated code. Verification Check for blocks not recommended for MISRA C:2023 (Simulink Check) and Check for blocks not recommended for C/C++ production code deployment (Simulink Check) |
| C | Do not use Lookup Table blocks using cubic spline interpolation or extrapolation methods. Specific blocks are:
Rationale Improve quality and MISRA C:2012 and MISRA C:2023 compliance of the generated code. Verification Check for blocks not recommended for MISRA C:2023 (Simulink Check) |
| D | Do not use deprecated Lookup Table blocks. The deprecated Lookup Table blocks are Lookup and Lookup2D. Rationale Improve quality and MISRA C:2012 and MISRA C:2023 compliance of the generated code. Verification Check for blocks not recommended for MISRA C:2023 (Simulink Check) |
| E | Do not use S-Function Builder blocks in the model or subsystem. Rationale Improve quality and MISRA C:2012 and MISRA C:2023 compliance of the generated code. Verification Check for blocks not recommended for MISRA C:2023 (Simulink Check) |
| F | Do not use From Workspace blocks in the model or subsystem. Rationale Improve quality and MISRA C:2012 and MISRA C:2023 compliance of the generated code. Verification Check for blocks not recommended for MISRA C:2023 (Simulink Check) |
| G | Do not use these String blocks in the model or subsystem:
Rationale Improve quality and MISRA C:2012 and MISRA C:2023 compliance of the generated code. Verification Check for blocks not recommended for MISRA C:2023 (Simulink Check) |
Tips
If you follow this and other modeling guidelines, you can eliminate model constructs that are not suitable for C/C++ production code generation, at the same time, increase the likelihood of generating code that complies with the MISRA C:2012 and MISRA C:2023 standards.
Use the Block Support Table block to view the Block Support Table. Blocks with the footnote (4) in the Block Support Table are classified as "Not recommended for production code".
Industry Standards
DO-331, Section MB.6.3.2.b 'Low-level requirements are accurate and consistent'
DO-331, Section MB.6.3.2.e 'Low-level requirements conform to standards'
DO-331, Section MB.6.3.4.d 'Source code conforms to standards'IEC 61508-3, Table A.3 (3) - Language subset
IEC 62304, 5.5.3 - Software Unit acceptance criteria
ISO 26262-6, Table 1 (1b) - Use of language subsets
EN 50128, Table A.4 (11) - Language Subset
EN 50657, Table A.4 (11) - Language Subset
MISRA C: 2012
MISRA C: 2023