Main Content

Simulation Mode Override Behavior in Model Reference Hierarchy

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 contains Model 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 a Model block in a model hierarchy.

Simulation Mode Used by Parent ModelSimulation Mode of Model Block
NormalAcceleratorSILPIL
NormalCompatible Compatible Compatible Compatible
AcceleratorOverriddenCompatible

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)OverriddenCompatible ErrorError
SILOverriddenOverriddenCompatible Error
PILOverriddenOverriddenErrorCompatible

The different types of behavior are:

  • Compatible — The software simulates the Model block in the mode specified for it.

  • Error — The simulation produces an error. For example, if a top model specifies rapid accelerator mode but contains a Model block in SIL or PIL mode, then running a simulation produces an error: the rapid accelerator mode cannot override the SIL and PIL mode of Model blocks. This behavior avoids the risk of false positives, that is, the simulation of a model in rapid accelerator mode does not lead to the conclusion that generated source or object code of Model blocks is tested or verified.

  • Overridden — The simulation mode of the top model or parent model overrides the simulation mode of the Model block. For example, if a top model or parent model that you configured for a SIL simulation contains a Model block with normal or accelerator simulation mode, then the software simulates the referenced model in SIL mode. The override behavior:

    • Allows a Model block in the model hierarchy to have SIL or PIL mode.

    • Makes lower-level referenced models execute in SIL or PIL mode if you simulate the top model or parent model in SIL or PIL mode. You do not have to switch the simulation mode of every referenced model in the hierarchy.

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.

Related Topics