This section describes model referencing considerations that apply specifically to code generation by the Simulink® Coder™.
A model reference hierarchy must satisfy various Simulink Coder requirements, as described in this section.
Minimize occurrences of algebraic loops by selecting the Minimize algebraic loop occurrences parameter on the Model Reference pane.
Introduces generating code for models referenced with Model blocks, and using Model Explorer to browse code files.
Generate reusable code from a top model with Model blocks.
Generate a single executable program from multiple models or multiple copies of the same model.
By default, the Simulink engine rebuilds simulation targets before the Simulink Coder software generates model reference targets.
In the generated code, place the definitions of global variables with the components that define them.
Models containing Model blocks can use signals
of storage class “
Auto” without restriction.
Be aware of limitations that apply to using a model hierarchy for code generation.
You can control the library file suffix and file type extension that the Simulink Coder code generator uses to name generated model reference libraries.
Share Simulink cache files in team-based development to reduce build time and avoid unnecessary code regeneration.