| Contents | Index |
| ID: Title | hisl_0020: Blocks not recommended for MISRA-C:2004 compliance | ||
|---|---|---|---|
| Description | To improve MISRA-C:2004 compliance of the generated code, | ||
| A | Use only blocks that support code generation, as documented in the Simulink Block Support Table | ||
| B | Do not use blocks that are listed as "Not recommended for production code" in the Simulink Block Support Table | ||
| Notes | If you follow this and other modeling guidelines, you increase the likelihood of generating code that complies with the MISRA-C:2004 standard. Choose Simulink Help > Block Support Table > Simulink to view the block support table. Blocks with the footnote (4) in the Block Support Table are classified as "Not Recommended for production code." | ||
| Rationale | A,B | Improve MISRA-C:2004 compliance of the generated code. | |
| Model Advisor Checks | By Product > Embedded Coder > Check for blocks not recommended for MISRA-C:2004 compliance | ||
| References | MISRA-C:2004 | ||
| Last Changed | R2011a | ||
| ID: Title | hisl_0101: Avoid invariant comparison operations to improve MISRA-C:2004 compliance | ||
|---|---|---|---|
| Description | To improve MISRA-C:2004 compliance of generated code, avoid comparison operations with invariant results. Comparison operations are performed by the following blocks:
| ||
| Rationale | Improve MISRA-C:2004 compliance of the generated code. | ||
| References |
| ||
| Last Changed | R2012a | ||
| Example | Invariant comparisons can occur in simple or compound comparison operations. In compound comparison operations, the individual components can be variable when the full calculation is invariant. Simple: A uint8 is always greater then or equal to 0.
| ||
| ID: Title | hisl_0102: Data type of loop control variables to improve MISRA-C:2004 compliance | ||
|---|---|---|---|
| Description | To improve MISRA-C:2004 compliance of generated code, use integer data type for variables that are used as loop control counter variables in:
| ||
| Rationale | Improve MISRA-C:2004 compliance of the generated code. | ||
| References |
| ||
| Last Changed | R2012a | ||
![]() | Modeling Style | Configuration Settings | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |