Modeling Guidelines for Generated Code
Use modeling guidelines when you develop models and generate code for embedded systems using Model-Based Design with MathWorks® products. The guidelines provide model setting, block usage, and parameter considerations that impact code generation.
Code Generation Modeling Guidelines
You can use code generation guidelines when developing models and generating code for embedded systems. The guidelines provide guidance on modeling patterns, block usage, and configuration parameter settings that impact code generation and component model deployment.
Guidelines for blocks include:
Guidelines for modeling patterns include:
Guidelines for configuration parameters include:
Guidelines for component deployment using a service interface configuration:
cgsl_0404: Model startup and shutdown events by using Initialize Function and Terminate Function blocks for component deployment
cgsl_0411: Access nonvolatile memory by using Initialize Function and Terminate Function blocks
cgsl_0413: Reuse memory between component state and output for component deployment
Fort information about verifying the readiness of your model for code generation, see Check Model and Configuration for Code Generation.
Check Your Model Using the Model Advisor | Modeling Guidelines and Model Advisor Checks for Verifying Compliance with Industry Standards | Model Advisor Checks for Verifying Compliance with Secure Coding Standards