Products & Services Solutions Academia Support User Community Company

Learn more about Simulink Design Verifier   

sldvgencov - Analyze models to obtain missing model coverage

Syntax

[status, cvdo] = sldvgencov(model, options, showUI, startCov)
[status, cvdo] = sldvgencov(block, options, showUI, startCov)
[status, cvdo, filenames] = sldvgencov(model, options, showUI, startCov)
[status, cvdo, filenames, newmodel] = sldvgencov(block, options, showUI, startCov)

Description

[status, cvdo] = sldvgencov(model, options, showUI, startCov) analyzes model using the sldvoptions object options.

[status, cvdo] = sldvgencov(block, options, showUI, startCov) analyzes the Atomic Subsystem block block using the sldvoptions object options.

[status, cvdo, filenames] = sldvgencov(model, options, showUI, startCov) analyzes model and returns the file names that the software created in filenames.

[status, cvdo, filenames, newmodel] = sldvgencov(block, options, showUI, startCov) analyzes block using the sldvoptions object options. The software returns a handle to newmodel, which contains a copy of the block subsystem.

Inputs

block

Handle to an Atomic Subsystem block in a Simulink model

model

Handle to a Simulink model

Default: []

options

sldvoptions object that specifies analysis parameters

Default: []

showUI

Logical value indicating where to display messages during analysis

true to display messages in the log window
false (default) to display messages in the MATLAB command window

startCov

cvdata object. The analysis ignores all model coverage objectives already satisfied in startCov.

Default: []

Outputs

cvdo

cvdata object containing coverage data for new tests

filenames

A structure whose fields list the file names with the analysis results:

DataFile

MAT-file with raw input data

HarnessModel

Simulink harness model

SystemTestFile

SystemTest TEST-file

Report

HTML report of the results

ExtractedModel

Simulink model extracted from subsystem

BlockReplacementModel

Simulink model obtained after block replacements

status

Logical value that indicates whether the analysis collected model coverage successfully

true
false

Examples

Analyze the Cruise Control model and simulate a version of that model using data from test cases from the previous analysis. Compare the model coverage data, and collect the coverage missing from the sldvdemo_cruise_control_mod model analysis:

opts = sldvoptions;
opts.Mode = 'TestGeneration';             % generate test cases
opts.ModelCoverageObjectives = 'MCDC';    % MCDC coverage
opts.SaveHarnessModel = 'off';            % Don't create the harness model
opts.SaveReport = 'off';                  % or report
open_system 'sldvdemo_cruise_control';
[ status, files ] = sldvrun('sldvdemo_cruise_control', opts);
open_system 'sldvdemo_cruise_control_mod.mdl';
[ outData, startCov ] = sldvruntest('sldvdemo_cruise_control_mod',...
    files.DataFile, [], true);
cvhtml('Coverage with the original test suite', startCov);
[ status, covData, files ] = sldvgencov('sldvdemo_cruise_control_mod',...
    opts, false, startCov);

See Also

sldvharnessmerge | sldvoptions | sldvrun

Tutorials

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS