Modified Condition and Decision Coverage (MCDC) Definitions in Simulink Coverage
Simulink® Coverage™ by default uses the masking modified condition and decision coverage (MCDC) definition for recording MCDC coverage results. Although you can change the MCDC definition that Simulink Coverage uses during analysis to the unique-cause MCDC definition, there are some differences in how Simulink Coverage records coverage for models depending on which definition you use.
Differences between Masking MCDC and Unique-Cause MCDC in Simulink Coverage Coverage Analysis
Masking MCDC accounts for the masking of conditions in subexpressions, allowing for an increased number of satisfied MCDC objectives compared to the unique-cause definition of MCDC. As a result, some Simulink models that receive less than complete MCDC coverage using the unique-cause MCDC definition receive increased coverage when using the masking MCDC definition. Consider the following example, where two inputs to a Stateflow® chart, condition A and condition C, cannot change independently:
This input dependence results in dependent conditions for the expression contained within the Stateflow chart:
For the expression (A||B)&&(C||D), changing the value of condition C also changes the value of condition A. Due to the interdependence of conditions A and C, unique-cause MCDC for condition C cannot be achieved:
However, masking MCDC for condition C can be achieved, because masking MCDC allows the value of condition A to change in the independence pair for condition C, as long as the sub-expression (A||B) remains true:
Certification Considerations for MCDC Coverage
DO-248C Discussion Paper #13 "Discussion of Statement Coverage, Decision Coverage and Modified Condition/Decision Coverage" states that masking MCDC is acceptable for meeting the MCDC objective of DO-178B certification.
Setting the (MCDC) Definition Used for Simulink Coverage Coverage Analysis
By default, Simulink Coverage uses the masking MCDC definition during coverage analysis. There are two ways to change the MCDC definition used for Simulink Coverage coverage analysis:
Use the Model Configuration Parameters to Set the MCDC Definition Used
Open the Configuration Parameters dialog box.
cvtest Object to Set the MCDC Definition Used
cvtest object for your model to set the
cvt = cvtest(model) cvt.options.mcdcMode = 'UniqueCause' covdata = cvsim(cvt)
Modified Condition and Decision Coverage in Simulink Design Verifier
'UniqueCause' can result
in differences between MCDC reporting in Simulink
Coverage and test generation in Simulink
Design Verifier™. Simulink
Design Verifier always uses the masking MCDC definition for test case generation. For more
information, see Modified Condition and Decision Coverage in Simulink Design Verifier.
- MCDC (Simulink Design Verifier)