Design verifier :run all and produce coverage for a sldvmakeharness created model

조회 수: 1 (최근 30일)
Hi,
After I use MATLAB 17b to generate harness model by using 'sldvmakeharness' function, the harness model and its signal builder display successfully.
Normally I will click the 'run all and produce coverage' button in signal builder to test All cases and produce a model coverage report.
Rather than click button, can I produce the coverage report programmly?
I've spend a lot of time to search commands for this but nothing I can found...

채택된 답변

Pat Canny
Pat Canny 2020년 6월 19일
편집: Pat Canny 2020년 6월 19일
Hi Jiahao,
I recommend using sldvrun to generate tests with Design Verifier, then sldvruntest to run the tests and cvhtml to generate a report. An example workflow is included in the documentation for sldvruntest, which I've copied here:
open_system('sldvdemo_cruise_control');
opts = sldvoptions;
opts.Mode = 'TestGeneration';
opts.SaveHarnessModel = 'on';
opts.SaveReport = 'off';
[ status, files ] = sldvrun('sldvdemo_cruise_control', opts);
runOpts = sldvruntestopts;
runOpts.coverageEnabled = true;
[ outData,covData ] = sldvruntest('sldvdemo_cruise_control',...
files.DataFile,runOpts);
cvhtml('coverageReport',covData);
Thanks.
- Pat
  댓글 수: 2
Jiahao CHANG
Jiahao CHANG 2020년 6월 19일
Hi Pat, this is exactly what I'm looking for. It seems that the documentation for sldvruntest in 2020a is much more helpful compare to the doc in 2017b. The demo runs perfectly well, therefore I'll put this in my model. Thanks for your help Pat!
Pat Canny
Pat Canny 2020년 6월 19일
You're welcome! Thanks for the feedback on the Documentation improvement. We've tried to improve it over the recent releases. If you come across anything else that is confusing or missing, please let me know.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Generate Tests에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by