Simulink Modeling Components
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
- Referenced Models
 Generate code for referenced models
 
- Subsystems
 Generate and reuse code for subsystems
 
- Stateflow Charts
 Generate and reuse code for Stateflow charts
 
- Library Subsystems
 Generate and reuse code for subsystems included in a library that is configured for reuse
 
- Model Composition and Reuse
 Design models from which you can generate reusable code
 
- Variant Systems
 Design models from which you can generate reusable code