Referenced Model Simulation Modes

About Referenced Model Simulation Modes

Simulink® executes the top model in a model reference hierarchy just as it would if no referenced models existed. All Simulink simulation modes are available to the top model. Simulink can execute a referenced model in either of two modes:

Simulation results for a given model are essentially identical in either mode. Trivial differences may occur due to differences in the optimizations and libraries used.

Specifying the Simulation Mode

The Model block for each instance of a referenced model controls its simulation mode. The default referenced model simulation mode is Accelerator mode. To set or change a submodel's simulation mode:

  1. Access the Model block's parameter dialog box. (See Navigating a Model Block.)

  2. Set the Simulation mode field to Normal or Accelerator.

  3. Click OK or Apply.

Mixing Simulation Modes

Simulink models execute in Normal mode by default. When a top model executes in Normal mode, it can contain both Normal mode and Accelerator mode submodels. When the same submodel appears more than once in a hierarchy, at most one of these instances can specify Normal mode. All the rest must specify Accelerator mode.

Accelerator mode takes precedence over Normal mode when the two are mixed. Thus a model that executes in Normal mode can include submodels that execute in Accelerator mode, but a model that executes in Accelerator mode cannot include any submodels that execute in Normal mode. When a Normal mode submodel is subordinate to an Accelerated mode submodel, Simulink posts a warning and temporarily overrides the Normal mode specification.

Accelerating a Freestanding or Top Model

You can use Simulink Accelerator mode (see Accelerating Models) or Rapid Accelerator mode (see Running Rapid Simulations) to achieve faster execution of any Simulink model, including a top model in a model reference hierarchy.

When you execute a top model in Simulink Accelerator mode or Rapid Accelerator mode, all submodels execute in Accelerator mode. For any submodel that specifies Normal mode, Simulink posts a warning and temporarily overrides the Normal mode specification.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS