Retrieve child coverage results from parent model

조회 수: 3 (최근 30일)
Luis Ruiz
Luis Ruiz 2020년 5월 27일
댓글: Luis Ruiz 2020년 5월 29일
I am using the coverage toolbox, MATLAB 2018a, these are my settings to get the coverage from a model:
load_system( 'my_model' );
set_param( 'my_model', ...
'CovEnable' , 'on', ...
'CovMetricSettings', 'dcmetr', ...
'RecordCoverage' , 'on' );
I am turning on signal range and table coverage results.
I run and I get the coverage, then when I try to see the signal ranges I use this:
[minVal, maxVal] = sigrangeinfo(cumCovData, 'my_model/subsystem', 1 )
And I can see the max-min values for a specific subsystem, my problem is that I can only see the max-min values for the subsystems at the very bottom level of the model. Now, if I want to see this max-min values in the parent model, e.g.:
[minVal, maxVal] = sigrangeinfo(cumCovData, 'my_model', 1 )
I get this:
minVal =
[]
maxVal =
[]
So, it looks like MATLAB/SIMULINK cannot assign the low level range outputs to the parent model.
So my question is:
Can I assign max-min ranges from coverage data to the parent model? What's the setting for this operation?

답변 (1개)

Pat Canny
Pat Canny 2020년 5월 29일
Hi Luis,
Thanks for your question.
You are correct in that the signal range coverage is not collected for model outputs. The object needs to have a valid handle, and model outputs don't qualify. This is why you are seeing the discrepancy between the subsystem and the model. This is a good bit of feedback for the team.
One suggestion is to try creating a test harness (which would use a model reference hierarchy) and collecting the range coverage on the harness model. This is a workaround solution, but it would treat the harness as a block and allow you to collect range coverage for the "block" outputs. I suggest using slvnvmakeharness to create a harness.
  댓글 수: 1
Luis Ruiz
Luis Ruiz 2020년 5월 29일
Thanks for the feedback!
It would be good to add some functionality to these coverage tools. Because, also when checking the coverage for S Functions I have a similar problem. The data is shown in the html generated output but from command line I cannot see the results of a specific function iside the C code, eg.
[coverage, description] = mcdcinfo(cumCovData, 'my_model/subsystem/S-Function/file.c/my_function' )
I know the data is in the cumCoVData variable because I can see it in the html output, and I can dig inside description and see it, so I think it is possible to get detailed data from the command line.
Thanks!!

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

카테고리

Help CenterFile Exchange에서 Analyze Coverage and View Results에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by