Main Content

Simulink Modeling Components

Modularize generated code by using Simulink® component-based modeling options, reuse techniques, and variants

The code generator supports different types of Simulink model components to facilitate efficient and robust system development, collaboration, and verification workflows. Large-scale systems typically include a combination of these Simulink model components from which you can generate and reuse code:

  • Referenced models

  • Conditionally executed nonvirtual subsystems and atomic nonvirtual and virtual subsystems

  • Stateflow® charts

  • Library subsystems

During model design, you can choose to convert subsystems to referenced models. Models from which you generate reusable code potentially require special treatment. For example, the models referenced by a top model must be configured to use identical hardware settings.

For models that include variant blocks or use symbolic dimensions, the code generator produces code that includes preprocessor conditionals.

Categories