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.
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 subexpression (A||B) remains true:
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.
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:
Open the Configuration Parameters dialog box.
CovMcdcMode parameter to
cvtestObject to Set the MCDC Definition Used
cvtest object for your model to
cvt = cvtest(model) cvt.options.mcdcMode = 'UniqueCause' covdata = cvsim(cvt)
result in differences between MCDC reporting in Simulink
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.