To analyze your model for design errors, use the following workflow:
Verify that your model is compatible with Simulink® Design Verifier™ software.
If you have Stateflow® objects in your model, in the Configuration
Parameters dialog box, on the Diagnostics > Stateflow pane, set Unreachable
execution path to error
.
Specify options that control how Simulink Design Verifier detects design errors in your model.
Execute the Simulink Design Verifier analysis.
Review the analysis results.
Note
If you select design error detection for dead logic, you cannot select any other type of design error detection. For dead logic detection, Simulink Design Verifier performs an independent analysis. If you want to detect design errors for dead logic and any of the other types of design errors, you must perform design error detection analysis twice.
When you run a design error detection analysis, by default, the software highlights model objects in one of four colors so that the analysis results are easy to review.
Model Object Highlighting Color | Analysis Results |
---|---|
Green | One of the following:
Note If your design contains at least one object that Simulink Design Verifier highlights red, other objects in your model that are highlighted green may also contain further design errors. If an object in your design causes run-time errors, Simulink Design Verifier may not be able to determine further errors on objects that are downstream of or rely on the results of the object that causes the run-time errors. Resolve the errors that cause the initial red highlighting and re-run the analysis to determine if Simulink Design Verifier will also highlight other objects in your model as red. |
Red | One of the following:
|
Orange | For at least one objective, the analysis could not determine if the model has dead logic, overflow errors, division-by-zero errors, signals outside the user-specified range, or out of bound array access errors. This situation can occur when:
|
Gray | The model object was not part of the analysis. |
The Simulink Design Verifier Results window initially displays a summary of the analysis results, as in the following example.
When you click an object in the model, additional details about the results for that object are displayed in the Simulink Design Verifier Results window.
Tip
By default, the Simulink
Design Verifier Results window is
always the topmost visible window.
To change that setting, click the icon and
on the context menu, clear the check mark next to Always
on top.
If you close the analysis results to fix the cause of the errors in your model, you might need to rereview the analysis results. As long as your model remains open, you can view the results of your most recent analysis results in the Results Summary Window.
After you close your model, you can no longer view any analysis results.
To view the latest results, on the Design Verifier tab, in the Review Results section, click Results Summary.
For any Simulink Design Verifier analysis, from the Results Summary Window, you can perform the following tasks:
Highlight the analysis results on the model.
Generate a detailed analysis report.
Create the harness model, or if the harness model already exists, open it.
Note
If no objectives are falsified, you cannot create the harness model.
View the data file.
View the log file.
You can perform design error detection analysis from the Model Advisor, which is particularly useful if you need to perform other model checks. To analyze your model from the Model Advisor, follow this high-level workflow:
Specify options that control how Simulink Design Verifier detects design errors in your model.
Open the Model Advisor.
From the system hierarchy, select the model or model component you want to analyze
Expand the design error detection analysis items. Look for Simulink Design Verifier under either By Product or By Task.
If you have not checked your model for compatibility, enable the compatibility check for Simulink Design Verifier.
Select the design error detection checks you want to run.
Run the selected checks.
Review the analysis results.