Colored Simulink Diagram Coverage Display

How Model Coverage Highlighting Works

The Simulink Verification and Validation software displays model coverage results for individual blocks directly in Simulink diagrams. If you enable model coverage, the tool does the following:

Coloring is used to highlight structural coverage in Simulink models. When you enable coloring for model coverage results (see Enabling the Colored Diagram Display), the tool highlights blocks that received the following types of model coverage:

Enabling the Colored Diagram Display

You enable the model coverage colored diagram display as follows:

  1. In the Simulink window, from the Tools menu, select Coverage Settings.

    The Coverage Settings dialog box appears.

  2. In the Coverage tab of the Coverage Settings dialog box, select Coverage for this model.

  3. Select the Results tab, as shown.

    The Display coverage results using model coloring option is selected by default for all models. This check box becomes visible only after Coverage for this model is enabled in the Coverage tab. You can disable this option for the current session by clearing this check box.

Displaying Model Coverage with Model Coloring

You enable display coverage as described in Enabling the Colored Diagram Display, After you enable this display, any time that the model generates a model coverage report, individual blocks receiving coverage are highlighted with light green or light red.

The light green Manual Switch blocks received full coverage during testing. The light red blocks (the engine speed Manual Switch block, and the fuel rate controller and engine gas dynamics subsystems) received incomplete coverage during testing. Blocks with no color highlighting (the Constant blocks, Scope blocks, and the throttle command Repeating Sequence block) received no coverage at all.

Accessing Coverage Information for Colored Blocks

Displaying Model Coverage with Model Coloring describes the highlighted Simulink diagram that appears after simulation when you enable display coverage with model coloring in the coverage settings for the model. Along with the highlighted Simulink diagram, a Coverage Display window appears, as shown.

If you click a colored block in the Simulink model, its summarized coverage appears in the Coverage Display window. In the preceding example, the following summary report appears when you click the fuel rate controller subsystem:

Summary coverage information appears in the Coverage Display window for the block, whose hyperlinked name appears at the top of the window. Click the hyperlink to access the appropriate section of the coverage report for this block. You can also see this section of the report by right-clicking the block and selecting Coverage > Report.

You can set the Coverage Display window to display coverage for a block in response to a hovering mouse cursor instead of a mouse click in one of two ways:

  


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