Collect Coverage for Models
Collect coverage during simulation to measure which elements in your model or Stateflow® charts are tested. Simulink® Coverage™ measures several types of coverage, such as execution, decision, condition, and modified condition/decision coverage. The most basic coverage level determines whether an item executes during simulation, while more extensive coverage levels determine whether individual logical conditions are fully exercised and independently affect the output of logical expressions.
Collect Model Coverage
|Simulate a Simulink model|
|Create model coverage test specification object|
|Simulate and return model coverage results for test objects|
|Access Simulink Coverage data in the MATLAB workspace|
|Exit coverage environment|
|Simulate dynamic system multiple times in parallel or serial|
Verify Individual Components
|Log test data for component or model during simulation|
|Combine test data from data files|
|Generate Simulink Coverage harness model|
|Generate default options for
|Combine test data from harness models|
|Simulate model by using input data|
|Invoke Code Generation Verification (CGV) API and execute model|
|Generate simulation or execution options for |
|Extract atomic subsystem or subchart contents into new model|
Model Coverage Definitions
- Model Coverage
Validate your model tests by measuring how thoroughly the model objects are tested.
- Types of Model Coverage
Model coverage metrics provided by Simulink Coverage.
- Modified Condition and Decision Coverage (MCDC) Definitions in Simulink Coverage
Describes the definitions of MCDC coverage available for use 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.
Using Model Coverage
- Use Simulink Coverage to Analyze Your Model
Learn the basic Simulink Coverage workflow.
- Specify Coverage Options
In the model settings, specify several coverage analysis options.
- 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 Multiple Instances of a Referenced Model
Collect model coverage when a model has multiple Model blocks that reference the same model.
- Model Coverage for Variant Blocks
Learn how Simulink Coverage displays coverage results for Simulink variants.
- Simulink Optimizations and Model Coverage
Learn how inlined parameters, block reduction, and conditional input branch execution can affect your model coverage data.
Model Coverage for Stateflow Charts
- Model Coverage Reports for Stateflow Charts
Describes the definition of coverage for elements in Stateflow charts.
- Types of Coverage for Stateflow Charts
Describes the coverage metrics you can collect for Stateflow charts.
- Model Coverage for Stateflow Atomic Subcharts
Coverage behavior when your model contains Stateflow atomic subcharts.
- Model Coverage Display for Stateflow Charts
Interpret the colored model highlighting for Stateflow charts.
- Model Coverage for Stateflow Truth Tables
Coverage behavior when your model contains Stateflow truth tables.