| Simulink® Verification and Validation™ | ![]() |
| On this page… |
|---|
How Model Coverage Highlighting Works Enabling the Colored Diagram Display |
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:
Highlights (colors) blocks that have received model coverage during simulation
Provides a context-sensitive display of summary model coverage information for each block
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:
You enable the model coverage colored diagram display as follows:
In the Simulink window, from the Tools menu, select Coverage Settings.
The Coverage Settings dialog box appears.
In the Coverage tab of the Coverage Settings dialog box, select Coverage for this model.
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.
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.
Note To restore the Simulink diagram to its original colors, right-click a colored block and select Coverage from the resulting context menu followed by Remove information from the resulting submenu. Alternatively, you can select Remove Highlighting from the Simulink View menu or the diagram's context menu to remove model coloring. |
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:
Select the down arrow on the right side of the Coverage Display window, and, from the resulting menu, select Focus.
Right-click a colored block and select Coverage from the resulting context menu followed by Display details on mouse-over from the resulting submenu.
Tip You can adjust the font size that the Coverage Display window uses. To increase the font size, press the Ctrl+ keys; to decrease the font size, press the Ctrl- keys. |
![]() | Signal Range Analysis Report | Using Model Coverage Commands | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |