Main Content

Model References

Reuse models as blocks in other models

A model reference is a reference to another model using a Model block. These references create model hierarchy. Each referenced model has a defined interface that specifies the properties of its inputs and outputs. The defined interface makes the behavior of the referenced model independent of its context in the model hierarchy. For simulation and code generation, a referenced model executes like a single block, or atomic unit, when the parent model executes. Model references are ideal for code reuse, unit testing, parallel builds, and large components. They can also reduce file contention and merge issues.

To determine whether referenced models meet your modeling requirements, see Component-Based Modeling Guidelines.

To learn about code generation for model reference hierarchies, see Referenced Models (Simulink Coder).

To create a protected model, see Model Protection (Simulink Coder).


ModelReference another model to create model hierarchy
Variant ModelTemplate subsystem containing Subsystem, Model, or Subsystem Reference blocks as variant choices


développer tout

depviewAnalyze and visualize model referencing dependencies with or without library dependencies
find_mdlrefsFind referenced models and Model blocks in model hierarchy
Simulink.BlockPathFully specified Simulink block path
Simulink.fileGenControlSpecify root folders for files generated by diagram updates and model builds
Simulink.ModelReference.refreshUpdate Model blocks to reflect changes to referenced models
Simulink.SubSystem.convertToModelReferenceConvert subsystem to model reference
slbuildBuild standalone executable file or model reference target for model
slxcinfoQuery contents of Simulink cache files
slxcunpackUnpack simulation and code generation targets from Simulink cache file
Simulink.ProtectedModel.createHarnessCreate harness model that provides isolated environment for testing protected model
Simulink.ProtectedModel.getPublisherReturn information about publisher that signed the protected model
Simulink.ProtectedModel.verifySignatureVerify digital signature on protected model
Simulink.ProtectedModel.suppressSignatureVerificationSuppress digital signature verification of protected models


Model Reference Conversion AdvisorConvert subsystems to referenced models
Referenced Files PaneView, save, and close referenced subsystems and models


Determine When to Reference Models

Create Model References

Configure Model References

Simulate Model Hierarchies