Simulation Mode Override Behavior in Model Reference Hierarchy - MATLAB & Simulink (original) (raw)

When the top model contains a Model block, the simulation mode of the top model can override the simulation mode of the Model block. The model referenced by the Model block can be a parent model that containsModel blocks at lower levels of the model hierarchy. When you simulate the model hierarchy, the simulation mode of a parent model can override the simulation mode of Model blocks that the parent model contains.

You can specify the simulation mode of a top model to be normal, accelerator, rapid accelerator, SIL, or PIL. With a Model block, you can specify all modes except rapid accelerator. This table shows how the software determines the effective simulation mode of aModel block in a model hierarchy.

Simulation Mode Used by Parent Model Simulation Mode of Model Block
Normal Accelerator SIL PIL
Normal Compatible Compatible Compatible Compatible
Accelerator Overridden Compatible Compatible only if the parent model is in accelerator mode_and_ is the top model in the hierarchy Compatible only if the parent model is in accelerator mode_and_ is the top model in the hierarchy
Rapid accelerator (top model only) Overridden Compatible Error Error
SIL Overridden Overridden Compatible Error
PIL Overridden Overridden Error Compatible

The different types of behavior are:

Multiple Model blocks, starting at the top of a model hierarchy, can execute in SIL or PIL mode. However, if code coverage or code execution profiling is enabled, only one Model block can execute at a time in SIL or PIL mode.

Note

You can view your model hierarchy in the Dependency Analyzer. In the Model Instances view, the software displays Model blocks differently to indicate their simulation modes, for example, normal, accelerator, SIL, and PIL. In this view, the software does not indicate the simulation mode of the top model.

See Also

Topics