Simulink® Coverage™ measures model coverage and code coverage to indicate untested elements of your design, such as logical conditions, unintended functionality, and switch positions during simulation. Review coverage information for the model in generated reports and in highlighted models to identify missing coverage and navigate to the associated requirements. Determine if you need to modify the requirements, test cases, or design to meet your coverage goals.
cvtest | Create model coverage test specification object |
cvsim | Simulate and return model coverage results for test objects |
cvhtml | Produce HTML report from model coverage objects |
cvmodelview | Display model coverage results with model coloring |
executioninfo | Retrieve execution coverage information from cvdata object |
conditioninfo | Retrieve condition coverage information from cvdata object |
decisioninfo | Retrieve decision coverage information from cvdata object |
mcdcinfo | Retrieve modified condition/decision coverage information
from cvdata object |
Validate your model tests by measuring how thoroughly the model objects are tested.
Simulink Coverage in End-to-End Systematic Verification
Learn how Simulink Coverage helps you to increase confidence in your design through end-to-end systematic verification.
In the Simulink Editor, specify several coverage recording options.
Specify the Simulink Coverage analysis options.
Model coverage metrics provided by Simulink Coverage.
View Coverage Results in a Model
Highlight model elements to view coverage results.
Obtain Cumulative Coverage for Reusable Subsystems and Stateflow® Constructs
Create and view cumulative coverage results for a model with a reusable subsystem.
Collect cumulative model coverage from successive simulation runs.
Create and run test cases by using the model coverage MATLAB® commands cvtest
and cvsim
.
Coverage for Custom C/C++ Code in Simulink Models
Analyze model coverage for C/C++ S-Functions.
Modified Condition and Decision Coverage (MCDC) Definitions in Simulink Coverage
Describes the definitions of MCDC coverage used in Simulink Coverage.
Modified Condition and Decision Coverage in Simulink Design Verifier
Describes the difference between MCDC coverage in Simulink Design Verifier™ and in Simulink Coverage.
Logical Operator Cascade Patterns
This model includes various patterns of cascaded Logical Operator blocks.
Analyzing MCDC for Cascaded Logic Blocks
This example illustrates how Simulink® Coverage™ records the MCDC metric for a cascade of Logical Operator blocks.
Simulink Optimizations and Model Coverage
Learn how inlined parameters, block reduction, and conditional input branch execution can affect your model coverage data.
Model Objects That Receive Coverage
Model objects that receive model coverage during simulation.
Model Objects That Do Not Receive Coverage
Simulink objects that do not receive coverage.
Model Coverage for MATLAB Functions
Use model coverage for MATLAB Function blocks and interpret the results.
Model Coverage for Stateflow Charts
Determine the extent to which a model test case exercises simulation control flow paths through a model.
Model Coverage for Multiple Instances of a Referenced Model
Collect model coverage when a model has multiple Model blocks that reference the same model.
Coverage for MATLAB® Function Blocks
This example model explains how Model Coverage relates to MATLAB code inside a MATLAB Function Block.
This example shows how to configure an S-Function generated with the Legacy Code Tool to be compatible with coverage.
Saturation on Integer Overflow Coverage
Simulate this model to collect and report Saturate on integer overflow coverage.