主要内容

本页采用了机器翻译。点击此处可查看英文原文。

sldvhighlight

R2026b

使用来自 Simulink Design Verifier 分析的数据突出显示模型

描述

sldvhighlight 使用其活动的 Simulink® Design Verifier™ 分析结果突出显示当前模型。如果没有活动结果,sldvhighlight 会加载当前模型的最新分析结果,然后使用这些结果突出显示模型。

示例

sldvhighlight(model) 使用其活动的 Simulink Design Verifier 分析结果突出显示 model。如果没有活动结果,sldvhighlight 会加载 model 的最新分析结果,然后使用这些结果突出显示模型。

示例

sldvhighlight(model, dataFile) 从 dataFile 加载 Simulink Design Verifier 的分析结果。该函数使用这些结果突出显示 model。

示例

sldvhighlight(model, dataFile, filterFiles) 加载来自 dataFile 的 Simulink Design Verifier 分析结果和来自 filterFiles 的分析过滤器文件。该函数使用这些结果突出显示 model。

示例

全部折叠

突出显示具有活动 Simulink Design Verifier 分析结果的当前模型。

打开 sldvdemo_debounce_modelcov 示例模型。

openExample('sldv/ModelCoverageTestGenerationExample',...
'supportingFile', 'sldvdemo_debounce_modelcov');

使用默认设置,对示例模型运行测试生成分析。

status = sldvrun('sldvdemo_debounce_modelcov')
Checking compatibility for test generation: model 'sldvdemo_debounce_modelcov'
Compiling model...done
Building model representation...done

'sldvdemo_debounce_modelcov' is compatible for test generation with Simulink Design Verifier.

Generating tests using model representation from 15-Mar-2019 13:12:06...
...................

Completed normally.

Generating output files:

    Harness model:
    pwd\sldv_output\sldvdemo_debounce_modelcov\sldvdemo_debounce_modelcov_harness.slx

Results generation completed.

    Data file:
    pwd\sldv_output\sldvdemo_debounce_modelcov\sldvdemo_debounce_modelcov_sldvdata.mat

status =

     1

突出显示对当前模型 sldvdemo_debounce_modelcov 的分析结果。

sldvhighlight

示例模型通过分析结果突出显示。

要在结果检查器中查看对象的详细分析结果,点击模型中突出显示的对象。

突出显示具有活动 Simulink Design Verifier 分析结果的指定模型。

打开 sldvdemo_debounce_modelcov 示例模型。

openExample('sldv/ModelCoverageTestGenerationExample',...
'supportingFile', 'sldvdemo_debounce_modelcov');

使用默认设置,对模型运行测试生成分析。

status = sldvrun('sldvdemo_debounce_modelcov')
Checking compatibility for test generation: model 'sldvdemo_debounce_modelcov'
Compiling model...done
Building model representation...done

'sldvdemo_debounce_modelcov' is compatible for test generation with Simulink Design Verifier.

Generating tests using model representation from 15-Mar-2019 13:12:06...
...................

Completed normally.

Generating output files:

    Harness model:
    pwd\sldv_output\sldvdemo_debounce_modelcov\sldvdemo_debounce_modelcov_harness.slx

Results generation completed.

    Data file:
    pwd\sldv_output\sldvdemo_debounce_modelcov\sldvdemo_debounce_modelcov_sldvdata.mat

status =

     1

重点突出 sldvdemo_debounce_modelcov 模型的分析结果。

sldvhighlight('sldvdemo_debounce_modelcov')

示例模型通过分析结果突出显示。

要在结果检查器中查看对象的详细分析结果,点击模型中突出显示的对象。

突出显示具有从数据文件加载的 Simulink Design Verifier 分析结果的指定模型。

打开 sldvdemo_debounce_modelcov 示例模型。

openExample('sldv/ModelCoverageTestGenerationExample',...
'supportingFile', 'sldvdemo_debounce_modelcov');

使用默认设置,对示例模型运行测试生成分析。

status = sldvrun('sldvdemo_debounce_modelcov')
Checking compatibility for test generation: model 'sldvdemo_debounce_modelcov'
Compiling model...done
Building model representation...done

'sldvdemo_debounce_modelcov' is compatible for test generation with Simulink Design Verifier.

Generating tests using model representation from 15-Mar-2019 13:12:06...
...................

Completed normally.

Generating output files:

    Harness model:
    pwd\sldv_output\sldvdemo_debounce_modelcov\sldvdemo_debounce_modelcov_harness.slx

Results generation completed.

    Data file:
    pwd\sldv_output\sldvdemo_debounce_modelcov\sldvdemo_debounce_modelcov_sldvdata.mat

status =

     1

关闭分析生成的示例模型和框架模型。

bdclose('sldvdemo_debounce_modelcov')
bdclose('sldvdemo_debounce_modelcov_harness')

重新打开示例模型。

open_system('sldvdemo_debounce_modelcov')

突出显示具有分析结果的示例模型,该结果存储在分析创建的数据文件中。

sldvhighlight('sldvdemo_debounce_modelcov',[pwd ...
'\sldv_output\sldvdemo_debounce_modelcov\' ...
'sldvdemo_debounce_modelcov_sldvdata.mat'])

Simulink Design Verifier 结果检查器打开。该模型被突出显示以显示分析结果。

要在结果检查器中查看对象的详细分析结果,点击模型中突出显示的对象。

输入参数

全部折叠

要突出显示的模型的名称或模型的句柄。

示例: 'sldvdemo_cruise_control'

示例: 'sldvdemo_flipflop'

Simulink Design Verifier 分析数据文件的名称。

有关分析数据文件的更多信息,请参阅管理 Simulink Design Verifier 数据文件。

示例: 'results.mat'

示例: 'sldv_output\sldvdemo_flipflop\sldvdemo_flipflop_sldvdata.mat'

示例: 'sldv_output\my_model\my_model_sldvdata.mat'

包含申述规则的分析过滤器文件的名称。

示例: 'sldvdemo_design_error_detection_sldv_filter.cvf', 'sldvdemo_design_error_detection_sldv_filter.cvf; sldvdemo_design_error_detection_sldv_filter1.cvf', {'sldvdemo_design_error_detection_sldv_filter.cvf', 'sldvdemo_design_error_detection_sldv_filter1.cvf'}

版本历史记录

在 R2013b 中推出