Main Content


Generate and reuse code for subsystems

Design and configure a model to control the code that the code generator produces for its subsystems. For more information, see Control Generation of Functions for Subsystems.


Subsystems and Code Generation

Control Generation of Functions for Subsystems

Control whether the code generator stores the generated functions in memory sections.

Generate Code and Executables for Individual Subsystems

Generate and build a standalone executable from a subsystem.

Generate Subsystem Code as Separate Function and Files

Configure subsystems to generate functions in separate files and specify the names of those functions and files.

Code Generation of Constant Parameters

Generate constant parameters to the shared utilities folder or top model.

Modeling Guidelines for Subsystems

Develop models and generate code for subsystems by using the modeling guideline recommendations.

Code Optimization

Generate Inlined Subsystem Code

Configure nonvirtual subsystems to generate inlined code.

Optimize Code for Identical Nested Subsystems

Optimize code to inline nested subsystems.