User`s guide

Model Reference and Embedded IDE Link™ CC
Model Reference and Embedded IDE Link CC
Model reference lets your mo de l include other m odels as modular components.
This technique provides useful features because it:
Simplies working with large models by letting you build large models
from smaller ones, or even large ones.
Lets you generate code once for all the modules in the entire model and
only regenerate code for modules that change.
Lets you develop the modules independently.
Lets you reuse modules and models by reference, rather than including the
model or module multiple times in your model. Also, multiple models can
refertothesamemodelormodule.
Your Real-Time Workshop documentation provides much more information
about model reference.
How Model Reference Works
Model refere nce behaves differe ntly in s imulation and in code generation. For
this discussion, you need to know the following terms:
Top m odel The root model b lock or model. It refers to other blocks or
models. In the mod el hierarchy, this is the top most model.
Referenced mode ls Blocks or models that other models reference, such
as mode ls the top model refers to. All m o dels or b locks below the top model
in the hierarchy are reference m odels.
The following sections describe briey how model reference works. More
details are available in your R eal-Time Workshop documentation in the
online Help system.
Model Reference in Simulation
When you simulate the top model, Real-Time Workshop software detects
that your model contains referenced models. Simulink software generates
code for the referenced mo dels and uses the generated code to build shared
library les for updating the model diagram and simulation. It also creates
3-77