User`s guide
15 Model Coverage Definition
15-4
For an example of cyclomatic complexity data in a model coverage report, see “Cyclomatic
Complexity” on page 19-22.
Condition Coverage (CC)
Condition coverage analyzes blocks that output the logical combination of their inputs
(for example, the Logical Operator block) and Stateflow transitions. A test case achieves
full coverage when it causes each input to each instance of a logic block in the model and
each condition on a transition to be true at least once during the simulation, and false at
least once during the simulation. Condition coverage analysis reports whether the test
case fully covered the block for each block in the model.
When you collect coverage for a model, you may not be able to achieve 100% condition
coverage. For example, if you specify to short-circuit logic blocks, by selecting Treat
Simulink Logic blocks as short-circuited in the Coverage Settings dialog box, you
might not be able to achieve 100% condition coverage for that block. See “Treat Simulink
logic blocks as short-circuited” on page 17-12 for more information.
For an example of condition coverage data in a model coverage report, see “Conditions
Analyzed” on page 19-25.
Decision Coverage (DC)
Decision coverage analyzes elements that represent decision points in a model, such
as a Switch block or Stateflow states. For each item, decision coverage determines the
percentage of the total number of simulation paths through the item that the simulation
actually traversed.
For an example of decision coverage data in a model coverage report, see “Decisions
Analyzed” on page 19-24.
Lookup Table Coverage
Lookup table coverage (LUT) examines blocks, such as the 1-D Lookup Table block, that
output information from inputs in a table of inputs and outputs, interpolating between
or extrapolating from table entries. Lookup table coverage records the frequency that
table lookups use each interpolation interval. A test case achieves full coverage when
it executes each interpolation and extrapolation interval at least once. For each lookup
table block in the model, the coverage report displays a colored map of the lookup table,