Standards, Guidelines, and Block Usage
Modeling guidelines provide information about model settings, block usage, and block parameters. When you develop models and generate code for specific applications, use modeling guidelines. If your application has safety-critical development or certification goals, then you can use modeling guidelines to increase the likelihood that the models and generated code comply with industry standards, including IEC 601508, IEC 62304, ISO 26262, IEC 62304, EN 50128, ISO 25119, DO-178C, AUTOSAR, MISRA C®:2012, CERT® C, CWE™, and ISO/IEC TS 17961.
To assess model design and code quality, and verify adherence to modeling guidelines, such as High-Integrity System Modeling guidelines, MathWorks Advisory Board (MAB) style guidelines, and code generation guidelines, use Model Advisor checks. For more information, see Check Your Model Using the Model Advisor.
Design High-Quality Models for Generating Efficient C and C++ Code
- Use Blocks and Products Supported for Code Generation
Identify blocks and products that Simulink® Coder™ and Embedded Coder® support for code generation.
- Consider Modeling Semantic when Generating Code
Data propagation, sample time propagation, latches for subsystem blocks, block execution order, and algebraic loops.
- Modeling Guidelines for Generated Code
Overview of guidelines to consider for your model and generated code, including coding guidelines, component deployment modeling guidelines, and MathWorks Advisory Board guidelines (MAB).
- Check Model and Configuration for Code Generation
Assess model readiness to generate code by using the Model Advisor and Code Generation Advisor.
Develop Models and Generate Code According to Industry Standards
- Industry Standards
Industry-specific standards to consider for your model and the generated code, including IEC 61508, IEC 62304, ISO 26262, IEC 62304, EN 50128, ISO 25119, DO-178C, and AUTOSAR.
- Modeling Guidelines and Model Advisor Checks for Verifying Compliance with Industry Standards
Use High-Integrity System Modeling guidelines and Model Advisor checks to verify that your model and the generated code complies with industry standards.
- Qualification of Embedded Coder and AUTOSAR Blockset for Use in Processes that Must Comply with Industry Standards
Use the IEC Certification Kit to qualify Embedded Coder and AUTOSAR Blockset for supported industry standards, including ISO 26262: 2018, IEC 61508: 2010, IEC 62304: 2015, ISO 25119: 2018, and EN 50128: 2011.
Verify Compliance of Models and Generated Code with Industry Coding Standards
- Coding Standards
Industry coding standards to consider for your model and generated code, including MISRA C:2012, CERT C, CWE, and ISO/IEC TS 19761:2013.
- Model Advisor Checks for Verifying Compliance with Secure Coding Standards
Use Model Advisor checks to verify that your model and the generated code complies with the secure coding standards.
- Modeling Guidelines and Model Advisor Checks for Verifying Compliance with MISRA C:2012
Modeling guidelines for those MISRA C:2012 guidelines whose compliance type is "Compliance via guideline".
- Developing a MISRA C:2012 Compliance Statement
Identifies how to use this documentation when developing your compliance statements for generated code as required per the MISRA C:2012 guidelines.
- Evaluate Your Generated Code for MISRA C:2012 Compliance
High-level workflow to evaluate your generated code for compliance with MISRA C:2012 guidelines.
- MISRA C:2012 Compliance Information Summary Tables
Defines the method to claim compliance to MISRA C:2012 guidelines. Includes applicable modeling guidelines, Model Advisor support, and Polyspace® MISRA C:2012 Checker support.
- Deviations Rationale for MISRA C:2012 Compliance
Rationale for MISRA C:2012 directives and rules whose compliance type is "Deviation".