Enhanced MCDC Coverage in Simulink Design Verifier
Enhanced Modified Condition Decision Coverage (MCDC) is an extension of modified condition decision coverage. For a test block, enhanced MCDC generates test cases that avoid masking effects from downstream blocks, so that the test block has an effect on the output.
To detect the effect of a test block by using the enhanced MCDC coverage objective, you can consider a standard model coverage objective of a test block or you can author your own custom test objectives for analysis. For more information, see:
To generate test cases by using enhanced MCDC model coverage objectives, and then analyzing the results, see Basic Workflow for Enhanced MCDC Analysis.
Use Model Coverage Objectives for Enhanced MCDC Coverage
For a given test block, you can detect the effect on a model coverage objective from the downstream blocks. When you generate test cases by using enhanced MCDC model coverage objectives, the generated test cases avoid the masking effect from the downstream blocks. The model coverage objective is detectable at a detection site.
Consider this model that consists of a cascade of Switch, Min, and Max blocks.
The test cases generated for enhanced MCDC coverage ensure that the decision objective of the Switch (Simulink Coverage) test block is not masked by the downstream Min and Max blocks. The generated test cases ensure that these nonmasking conditions for Min and Max blocks are satisfied:
F < D, ensures that the Min block does not mask the Switch output.
G > E, ensures that the Max block does not mask the Min output.
The decision objective of the Switch block and the nonmasking
conditions of the Min and Max blocks are satisfied along
the path and are detected at the detection site (Out1
). For example,
the path starts from the output signal of the Switch
block,
propagates along the Min block, and ends at the output signal of the
Max block (highlighted in the example model).
Enhanced MCDC criteria ensure better quality test cases because the test case detects the effect of a model coverage objective of the test block at the detection site. To analyze a model for enhanced MCDC analysis, see example Analyze Model for Enhanced MCDC Analysis.
Author Custom Test Objectives for Enhanced MCDC Coverage
Enhanced MCDC considers the default coverage objectives of a test block that are detectable at the detection site. To check the detectability status of a custom test objective, you can author the test objective of a model object, and then perform enhanced MCDC analysis.
Consider this model that consists of a Product block and a Min block. The Product block does not have a coverage objective.
You can author a custom test objective for the Product block to render
the output value less than 0
and detect the effect of the custom test
objective at a detection site.
For more information, see Author Custom Test Objective Workflow.