Main Content

Run a Design Error Detection Analysis

Workflow for Detecting Design Errors

To analyze your model for design errors, use the following workflow:

  1. Verify that your model is compatible with Simulink® Design Verifier™ software.

  2. 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.

  3. Specify options that control how Simulink Design Verifier detects design errors in your model.

  4. Execute the Simulink Design Verifier analysis.

  5. 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.

Understand the Analysis Results

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 ColorAnalysis Results

Green

One of the following:

  • The analysis did not find overflow or division-by-zero errors.

  • The analysis did not find dead logic.

  • The analysis did not find intermediate or output signals outside the range of user-specified minimum and maximum constraints.

  • The analysis did not find out of bound array access errors.

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:

  • The analysis found at least one test case that causes overflow or division-by-zero errors.

  • The analysis found dead logic.

  • The analysis found intermediate or output signals outside the range of user-specified minimum and maximum constraints.

  • The analysis found at least one test case that causes an out of bound array access error.

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:

  • The analysis times out.

  • The software cannot determine if an error occurred or not. This result is due to:

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.

Review the Latest Analysis Results in the Results Summary Window

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.

Check For Design Errors using the Model Advisor

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:

  1. Specify options that control how Simulink Design Verifier detects design errors in your model.

  2. Open the Model Advisor.

  3. From the system hierarchy, select the model or model component you want to analyze

  4. Expand the design error detection analysis items. Look for Simulink Design Verifier under either By Product or By Task.

  5. If you have not checked your model for compatibility, enable the compatibility check for Simulink Design Verifier.

  6. Select the design error detection checks you want to run.

  7. Run the selected checks.

  8. Review the analysis results.

Related Topics