Modeling Guidelines for Generated Code - MATLAB & Simulink (original) (raw)
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:
- cgsl_0102: Evenly spaced breakpoints in lookup tables
- cgsl_0103: Precalculated signals and parameters
- cgsl_0201: Redundant Unit Delay and Memory blocks
Guidelines for modeling patterns include:
- cgsl_0202: Usage of For, While, and For Each subsystems with vector signals
- cgsl_0204: Vector and bus signals crossing into atomic subsystems or Model blocks
Guidelines for configuration parameters include:
Guidelines for component deployment using a service interface configuration:
- cgsl_0401: Modeling styles for component deployment
- cgsl_0402: Signal interfaces for component deployment
- cgsl_0404: Model startup and shutdown events by using Initialize Function and Terminate Function blocks for component deployment
- cgsl_0405: Data receive for component deployment
- cgsl_0406: Data send for component deployment
- cgsl_0408: Partial data send for component deployment
- cgsl_0409: Data transfer for component deployment
- cgsl_0411: Access nonvolatile memory
- cgsl_0413: Reuse memory between component state and output for component deployment
- cgsl_0414: Configure service interface for component model
Fort information about verifying the readiness of your model for code generation, see Check Model and Configuration for Code Generation.
See Also
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