Documentation

Subsystems

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, seeCode Generation of Subsystems(Simulink Coder).

Topics

Subsystems and Code Generation

Code Generation of Subsystems

For you to control how code is generated for a nonvirtual subsystem, the code generator provides subsystem parameters that you can use.

Generate Code and Executables for Individual Subsystem

描述如何生成和建立一个独立的executable from a subsystem

Code Generation of Constant Parameters

The code generator attempts to generate constant parameters to the shared utilities folder first.

Modeling Guidelines for Subsystems

When you develop models and generate code for subsystems, use the modeling guideline recommendations.

Generate Code and Executables for Individual Subsystem

描述如何生成和建立一个独立的executable from a subsystem

Code Optimization

Generate Inlined Subsystem Code

You can configure a nonvirtual subsystem to inline the subsystem code with the model code.

Optimize Code for Identical Nested Subsystems

TheFunction packagingparameterAutooption can optimize code in situations in which identical subsystems contain other identical subsystems, by both reusing and inlining generated code.

Was this topic helpful?