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
Setting the (MCDC) Definition Used for Simulink Coverage Coverage Analysis
Modified Condition and Decision Coverage in Simulink Design Verifier
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:
The Certification Authorities Software Team (CAST), in their CAST 6 position paper, states that masking MCDC is acceptable for meeting the MC/DC 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.
Set the CovMcdcMode
parameter to Masking
or Unique-Cause
.
cvtest
Object to Set the MCDC
Definition UsedCreate a cvtest
object for your model to
set the mcdcMode
to 'Masking'
or 'UniqueCause'
:
cvt = cvtest(model) cvt.options.mcdcMode = 'UniqueCause' covdata = cvsim(cvt)
Setting CovMcdcMode
to '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.