User`s guide

20 Excluding Model Objects From Coverage
20-20
protected division1
The library subsystem is a protection against division by zero and might not be relevant
in the coverage report. Exclude it from coverage for this model.
1
In the Simulink Editor, right-click either of the protected division reference blocks.
When you filter a library block, all instances of that block are filtered from coverage.
2
Select Coverage > Exclude reference library: slvnvdemo_covfilt_lib/
protected division.
The Coverage Filter Viewer opens with the new filter rule listed.
3
Click in the Rationale field for this new rule and enter text for excluding this
transition, for example, Protection against division by zero.
4
Save this rule to the current filter. Click Apply.
5
Simulate the model again and review the results.
The Filtered Blocks section of the report lists both protected division reference
blocks. No coverage is recorded for the two protected division subsystems.
In the Simulink Editor, the blocks filtered from coverage are colored grey.
Filter a Subsystem
The slvnvdemo_covfilt model uses a Constant block to drive the enable port for the
Switchable config subsystem. Because the constant is always 0, this subsystem never
executes.