Main Content

slvnvharnessopts

Generate default options for slvnvmakeharness

Description

harnessopts = slvnvharnessopts generates the default configuration for running slvnvmakeharness.

example

Examples

collapse all

This example shows how to set harness options for a coverage harness.

Open the model using open_system.

open_system('slvnvdemo_counter')

Create the harness options object using slvnvharnessopts.

harnessOpts = slvnvharnessopts
harnessOpts = 

  struct with fields:

    harnessFilePath: ''
    modelRefHarness: 1
    usedSignalsOnly: 0
      harnessSource: 'Signal Editor'

Use the harnessOpts to create the harness file using slvnvmakeharness.

harnessFile = slvnvmakeharness('slvnvdemo_counter', ...
              '', harnessOpts);

Output Arguments

collapse all

Default harness options, returned as a structure. The harnessopts structure has the following fields. If you do not specify any values, default values are used.

FieldDescription
harnessFilePath

Specifies the file path for creating the harness model. If an invalid path is specified, slvnvmakeharness does not save the harness model, but it creates and opens the harness model. If you do not specify this option, slvnvmakeharness generates a new harness model and saves it in the MATLAB® current folder.

Default: ''

modelRefHarness

Generates the test harness model that includes model in a Model block. When false, the test harness model includes a copy of model.

Default: true

usedSignalsOnly

When true, the Signal Editor block in the harness model has signals only for input signals in the model. You must have the Simulink® Design Verifier™ software and model must be compatible with that software to detect the input signals.

Default: false

Version History

Introduced in R2010b