|
|
|
| R2011b Documentation → Simulink Verification and Validation | |
Learn more about Simulink Verification and Validation |
|
| Contents | Index |
The cvtest command creates a test specification object. Once you create the object, you simulate it with the cvsim command.
The call to cvtest has the following default syntax:
cvto = cvtest(root)
root is the name of, or a handle to, a Simulink model or a subsystem of a model. cvto is a handle to the resulting test specification object. Only the specified model or subsystem and its descendants are subject to model coverage.
To create a test object with a specified label (used for reporting results):
cvto = cvtest(root, label)
To create a test with a setup command:
cvto = cvtest(root, label, setupcmd)
You execute the setup command in the base MATLAB workspace, just prior to running the instrumented simulation. Use this command for loading data prior to a test.
The returned cvtest object, cvto, has the following structure.
Field | Description |
|---|---|
id | Read-only internal data-dictionary ID |
modelcov | Read-only internal data-dictionary ID |
rootPath | Name of the system or subsystem for analysis |
label | String for reporting results |
setupCmd | Command executed prior to simulation |
settings.condition | Set to 1 for condition coverage |
settings.decision | Set to 1 for decision coverage |
settings. | Set to 1 for coverage for Simulink Design Verifier blocks. |
settings.mcdc | Set to 1 for MCDC coverage |
settings.sigrange | Set to 1 for signal range coverage |
settings.sigsize | Set to 1 for signal size coverage. |
settings.tableExec | Set to 1 for lookup table coverage |
modelRefSettings.enable | String specifying one of the following values:
|
modelRefSettings. | Set to 1 for excluding coverage for the top model |
modelRefSettings. | String specifying a comma-separated list of referenced models for which coverage is disabled when modelRefSettings.enable specifies filtered |
emlSettings. | Set to 1 to enable coverage for external program files called by MATLAB functions in your model |
options. | Set to 1 to override the Simulink Block reduction parameter if it is enabled. |
![]() | Commands for Automating Model Coverage Tasks | Running Tests with cvsim | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |