Main Content

sldvruntestopts

Generate simulation or execution options for sldvruntest or sldvruncgvtest

Description

example

runOpts = sldvruntestopts generates a runOpts structure for sldvruntest.

runOpts = sldvruntestopts('cgv') generates a runOpts structure for sldvruncgvtest.

Examples

collapse all

Create runOpts for the sldvdemo_cruise_control model. Then, analyze the model by using sldvruntest.

Open the sldvdemo_cruise_control example model.

openExample('sldv/CruiseControlTestGenerationExample',...
'supportingFile', 'sldvdemo_cruise_control');

Set the sldvoptions and create runOpts for sldvruntest.

opts = sldvoptions;
opts.Mode = 'TestGeneration';
opts.SaveHarnessModel = 'on';
opts.SaveReport = 'off';
[ status, files ] = sldvrun('sldvdemo_cruise_control', opts);
runOpts = sldvruntestopts;

Analyze the model by using the runOpts.

[ outData ] = sldvruntest('sldvdemo_cruise_control',...
    files.DataFile, runOpts);

Input Arguments

collapse all

Generates a default runOpts structure for sldvruncgvtest.

Example: runcgvtest_options = sldvruntestopts('cgv');

Output Arguments

collapse all

A structure whose fields specify the configuration of sldvruntest or sldvruncgvtest. If you do not specify a field name, sldvruncgvtest or sldvruntest uses the default value. runOpts can contain the fields listed in the table.

Field NameDescription
testIdx

Test case index array to simulate or execute from dataFile.

If testIdx = [], all test cases are simulated or executed.

signalLoggingSaveFormat

Available only for sldvruntest.

Specifies the format of signal logging data for signals that connect to the outport of the model and for intermediate signals that are configured for logging.

If you specify Dataset, data is stored in the Simulink.SimulationData.Dataset objects.

Default: 'Dataset'

coverageEnabled

Available only for sldvruntest.

If true, the Simulink® Coverage™ software collects model coverage data during simulation.

Default: false

coverageSetting

Available only for sldvruntest.

cvtest object to use for collecting model coverage.

If coverageSetting is [], sldvruntestopts returns the coverage settings for the model specified in the call to sldvruntest.

Default: []

allowCopyModel

Available only for sldvruncgvtest.

If you have not configured sldvruncgvtest to execute test cases with the CGV API, allowCopyModel specifies creating and configuring the model.

If true and you have not configured the model to execute test cases with the CGV API, sldvruncgvtest copies the model, fixes the configuration, and executes the test cases on the copied model.

If false (the default), an error occurs if the tests cannot execute with the CGV API.

Note

If you have not configured the top-level model or any referenced models to execute test cases, sldvruncgvtest does not copy the model, even if allowCopyModel is true. An error occurs.

cgvComType

Available only for sldvruncgvtest.

Defines the software-in-the-loop (SIL) or processor-in-the-loop (PIL) approach for CGV:

  • 'topmodel' (default)

  • 'modelblock'

cgvConn

Available only for sldvruncgvtest.

Specifies mode of execution for CGV:

  • 'sim' (default)

  • 'sil'

  • 'pil'

fastRestart

Available only for sldvruntest.

If true, Simulink Design Verifier™ uses fast restart mode for model simulation.

Default: true

useParallel

Available only for sldvruntest.

If true, Simulink Design Verifier simulates test cases with parallel computing. This option requires a Parallel Computing Toolbox™ license.

Default: false

Alternatives

Create a runOpts object for sldvruntest from the MATLAB® Command Window.

Version History

Introduced in R2010b