Main Content

Model Representation for Analysis

When you analyze a model for the first time, Simulink® Design Verifier™ performs a compatibility check and creates a model representation. The model representation contains information about model behavior to use for analysis. By default, the software saves the model representation at the Simulation cache folder location.

If you modify a model and rerun the analysis, Simulink Design Verifier determines whether to rebuild the model representation or to use the existing Simulink cache depending on the Rebuild model representation parameter. A rebuild of the model representation is triggered, when the Rebuild model representation option is set to If change is detected and the software detects any changes in the model.

Reuse Model Representation for Analysis

The Rebuild model representation option is set to If change is detected by default and the software validates the model representation against any model changes and Simulink Design Verifier analysis options. The software then determines whether to reuse or to rebuild the model representation for analysis. When you set the option to Always, the model representation is rebuilt during every model analysis.

When the Rebuild model representation option is set to If change is detected, Simulink Design Verifier checks for these changes in a model:

Simulink Design Verifier Options

The software validates the model representation against any changes in the Simulink Design Verifier options. This table lists the options that do not affect the model representation, and if you change any of these options the software reuses the model representation.

Structural Checksum of a Model

The Simulink Design Verifier uses both structural checksum and code checksum. A structural checksum is a computation that detects changes in the model that can affect simulation results. For more information about the kinds of changes that affect the model, see Rebuild.

Note

When you Generate Test Cases for Embedded Coder Generated Code, Simulink Design Verifier also considers checksum of the generated code.

Additional Dependencies

In addition to structural checksum, Simulink Design Verifier checks for changes in model dependencies that can impact the analysis results, such as:

  • Simulation run-time parameters that are defined in the data dictionary or the MATLAB® base, mask, or model workspaces

  • External C or C++ source code files that the model uses during simulation

  • Minimum and maximum constraints that are specified for block parameters

  • Block parameters that are specified for blocks in the Simulink Design Verifier Block Library, such as Values

Limitations

  • The model representation is always rebuilt:

    • When Simulink Design Verifier analysis is started from other products such as Simulink Test™, Simulink Coverage™, Simulink Check™, and Requirements Toolbox™.

    • When the model contains MATLAB System blocks.

  • Simulink Design Verifier does not detect changes in the custom block replacement rules that you apply, even if the Rebuild model representation option is set to If change is detected. In such cases, the Simulink cache is reused for analysis and a warning message is displayed in the Diagnostic Viewer that suggests you to set the Rebuild model representation option to Always, if you want to rebuild the model representation.

See Also

Related Topics