Using Simulink Previous page   Next Page

Model Referencing Pane

The Model Referencing pane allows you to specify options for including other models in this model and this model in other models and for building simulation and code generation targets.

The pane includes controls for specifying options for

Rebuild options for all referenced models

This group allows you to specify rebuild options for models directly or indirectly referenced by this model. It includes the following controls.

Rebuild targets.   This control specifies whether to rebuild simulation and Real-Time Workshop targets for referenced models before updating, simulating, or generating code from this model. This includes models indirectly referenced by this model. The options, in order from safe and slow to fast and risky, are

Never rebuild targets diagnostic.   This control appears only if you select the Never rebuild targets option. It allows you to specify the diagnostic action that Simulink should take if it detects a target that needs to be rebuilt. The options are

Options for referencing this model

This group of controls specifies options for including this model in other models. It includes the following controls.

Total number of instances allowed per top model.   This option allows you to specify how many references to this model (i.e., the model you are configuring) can safely occur in another model. The options are

If you specify None, and a reference to this model occurs in another model (including its model references), Simulink displays an error when you try to simulate or update the root model. Simulink similarly displays an error, if you specify One and multiple references to this model occur in a root model (including its model references). If you specify multiple and Simulink determines that for some reason this model cannot be multiply referenced, Simulink displays an error when the model that references it is compiled or simulated. This occurs even if the model is referenced only once.

Model dependencies.   Specifies files on which this model relies. They are typically MAT-files and M-files used to initialize parameters and to provide data.

Specify the dependencies as a cell array of strings, where each cell array entry is the filename or path of a dependent file. These filenames may include spaces and must include file extensions (e.g.,.m,.mat, etc.).

Prefix the token $MDL to a dependency to indicate that the path to the dependency is relative to the location of this model file.

If Simulink cannot find a specified dependent file when you update or simulate a model that references this model, Simulink displays a warning.

Pass scalar root inputs by value.   Checking this option causes a model that calls (i.e., references) this model to pass this model's scalar inputs by value. Otherwise, the calling model passes the inputs by reference, i.e., it passes the addresses of the inputs rather than the input values.

Passing roots by value allows this model to read its scalar inputs from register or local memory which is faster than reading the inputs from their original locations. However, this option can lead to incorrect results if the model's root scalar inputs can change within a time step. This can happen, for instance, if this model's inputs and outputs share memory locations (e.g., as a result of a feedback loop) and the model is invoked multiple times in a time step (i.e., by a Function-Call Subsystem). In such cases, this model sees scalar input changes that occur in the same time step only if the inputs are passed by reference. That is why this option is off by default. If you are certain that this model is not referenced in contexts where its inputs can change within a time step, select this option to generate more efficient code for this model.

Minimize algebraic loop occurrences.   Checking this option causes Simulink to try to eliminate algebraic loops involving this model from models that reference it. Enabling this option disables conditional input branch optimization for simulation and the Real-Time Workshop single update/output function optimization for code generation. See Eliminating Algebraic Loops for more information.


Previous page  Hardware Implementation Pane Diagnosing Simulation Errors Next page

© 1994-2005 The MathWorks, Inc.