Main Content

sldvrun

Description

status = sldvrun analyzes the current model to generate the test cases that provide the model coverage or prove the model properties.

status = sldvrun(model) analyzes model to generate the test cases that provide the model coverage or prove the model properties

status = sldvrun(subsystem) converts the atomic subsystem subsystem into a new model and runs a design verification analysis on the new model.

example

status = sldvrun(model, options) analyzes model by using the sldvoptions object options.

[status, filenames] = sldvrun(model, options) analyzes model and returns the filenames that the software creates during the analysis.

[status, filenames] = sldvrun(model, options, showUI, startCov) opens the log window during the analysis if you set showUI to true. If you set showUI to false, sldvrun directs output to the MATLAB® command line.

Examples

collapse all

Set sldvoptions parameters and analyze the model by using the specified options

Set sldvoptions parameters:

opts = sldvoptions;
opts.Mode = 'TestGeneration';              % Perform test-generation analysis
opts.ModelCoverageObjectives = 'MCDC';     % MCDC coverage
opts.SaveHarnessModel = 'off';             % Don't save harness as model file
opts.SaveReport = 'on';                    % Save the HTML report

Open the sldvdemo_cruise_control model and analyze the model by using the specified options:

open_system ('sldvdemo_cruise_control');
[ status, files ] = sldvrun('sldvdemo_cruise_control', opts);

Input Arguments

collapse all

Name or handle of a Simulink® model, specified as a character vector or string scalar.

Name or handle of an atomic subsystem in a Simulink model, specified as a character vector or string scalar.

Analysis options, specified as a character vector or string scalar that contains the name of an sldvoptions object.

Whether to display messages during analysis, specified as:

true to display the messages in the log window.
false (default) to display the messages in the Command Window.

Model coverage objects, specified as a character vector or string scalar that contains the name of a cvdata object.

Output Arguments

collapse all

File names that Simulink Design Verifier™ generates, returned as a structure with these fields:

DataFile

MAT-file with raw input data

HarnessModel

Simulink harness model

Report

HTML report of the simulation results

ExtractedModel

Simulink model extracted from subsystem

BlockReplacementModel

Simulink model obtained after block replacements

Analysis status, returned as one of these values:

-1

Analysis exceeded the maximum processing time

 0

Error

 1

Processing completed normally

Alternatives

To run an analysis with Simulink Design Verifier, on the Design Verifier tab, in the Mode section, select any of these options:

  • Select Design Error Detection, then click Detect Design Errors.

  • Select Test Generation, then click Generate Tests.

  • Select Property Proving, then click Prove Properties.

Version History

Introduced in R2007a