Main Content

sldvcompat

Check model for compatibility with analysis

Description

status = sldvcompat(model) returns a status of 1 if the model is compatible with Simulink® Design Verifier™ software. Otherwise, sldvcompat returns 0.

example

[status, errmsgs] = sldvcompat(model) returns a list of incompatibilities.

status = sldvcompat(subsystem) converts the Simulink atomic subsystem subsystem into a temporary model and checks the compatibility of the temporary model with Simulink Design Verifier software. After the compatibility check, sldvcompat closes the temporary model.

status = sldvcompat(subsystem, options) checks the subsystem specified by subsystem for compatibility with Simulink Design Verifier software by using the sldvoptions object options.

status = sldvcompat(model, options, showUI, startCov) checks the compatibility of the model with Simulink Design Verifier software. If showUI is true, errors appear in the Diagnostic Viewer. Otherwise, errors appear at the MATLAB® command line. The analysis ignores all model coverage objectives satisfied in startCov, a cvdata object.

Examples

collapse all

Check the sldvdemo_flipflop model for compatibility with Simulink Design Verifier software.

Open the sldvdemo_flipflop example model and check for compatibility.

openExample('sldv/FlipFlopTestGenerationExample',...
'supportingFile','sldvdemo_flipflop');
status = sldvcompat('sldvdemo_flipflop');

Input Arguments

collapse all

Handle to a Simulink model,specified as a character vector or string scalar.

Example: openExample('sldv/FlipFlopTestGenerationExample')

Handle to an atomic subsystem in a Simulink model.

Analysis parameters, 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 messages in the log window.
false (default) to display messages in the Command Window.

Coverage data for the model, specified as a character vector or string scalar that contains the name of a cvdata object.

Output Arguments

collapse all

Whether the model is compatible, returned as a logical. If the model is compatible with Simulink Design Verifier software, the status is 1. Otherwise, sldvcompat returns 0.

List of incompatibilities, returned as a structure. If the model is compatible with Simulink Design Verifier, the errmsgs returns [] (empty). If the model is incompatible, the errmsgs is a struct that returns a list of incompatibilities.

Alternatives

To check if a model is compatible with Simulink Design Verifier, on the Design Verifier tab, in the Analyze section, click Check Compatibility.

To check the compatibility of a subsystem, right-click the subsystem and select Design Verifier > Check Subsystem Compatibility.

Version History

Introduced in R2007a