Model Architecture and Design
When developing Simulink® models for generated C or C++ production code, consider:
Modelings styles that meet common code generation requirements.
Data and function interface requirements.
Application objectives, such as efficiency and traceability.
Standards and guidelines compliance.
Scheduling requirements and relevant modeling techniques.
Modeling patterns for C code.
Products and blocks that support code generation.
Code generation treatment of Simulink modeling semantics.
Represent multiple algorithms with and generate code from a single model or multiple models. Decide whether to represent components as subsystems, reference models, or Stateflow® charts. Consider whether you want to generate reusable code. For an automotive system, you can use AUTOSAR software components that you develop with AUTOSAR Blockset.
Configure test or production hardware or control the location of generated code files.
As you evolve your model, use the Model Advisor to check whether the model is ready for code generation.
- Modeling Styles
Choose a modeling style that best meets your code generation requirements
- Code Interface Definitions
Create data, function, and memory section code generation definitions for standardization and software architecture conformance
- Standards, Guidelines, and Block Usage
Develop models and code that comply with standards and guidelines; products and blocks that support code generation
Time- and event-based scheduling requirements
Generate C/C++ code to use messages for communication
- Component-Based Modeling
Modularization, reentrancy, reuse, variants
- Model Configuration
Configure models for simulation and code generation
- Modeling Patterns for C Code
Apply modeling patterns that generate specific C constructs
- Blocks for Embedded Targets
Blocks for embedded processors and operating systems
- Block Authoring and Customization
Define code generation behavior for user-defined blocks