- If your model contains a lot of timer elements (e.g. delay blocks or after statements in Stateflow), this can add significant analysis time. Consider shortening the length of the timers in the model.
- If your model contains a lot of floating point operations, this can also add significant analysis time. Consider casting to single-precision (if your signals are doubles) or, if possible, to int.
- Wherever possible, split the logical parts of your design from the parts with a lot of math operations for analysis. Make use of harnesses or Model Slicer. Parts of your model with a lot of Stateflow tend to be easier to analyze, as well.
Simulink Design Verifier Test Generation Internal Error
16 次查看(过去 30 天)
显示 更早的评论
Hallo,
I am trying to using the Simulink Design Verifier Toolbox on a large model, but I am facing some challenges and errors which I am not able to solve. I have started trying the test generation of SLDV, which from the beginning seemed to be extremely slow and not feasible in a reasonable amount of time. I have anyway tried to apply some changes to generate the test a bit faster (like fixing input range), but no extreme improvement could be observed. Afterwards I then started trying to just let it run as much as I can to see if it ultimately can generate what I need and unfortunately now it is giving me always the same error after a couple of minutes (6-20 minutes).
The error is the following:
Looking at previously answered questions (https://ch.mathworks.com/matlabcentral/answers/320807-design-verifier-error-after-2-days-of-running-analysis), I've seen that the problem may comes from a lack of RAM memory. I have tried the to check the memory consumption, but it looks like it never exceeds 50% of the total memory.
I would also ask some advices on how to use simulink design verifier with large models, because from what I've seen up to now it doesn't looks really promising....
Regards,
Davide
0 个评论
回答(4 个)
Pat Canny
2019-1-4
编辑:Pat Canny
2019-1-4
Hi Davide,
Thanks for following up on the error.
Regarding your question about large model support, what do you mean by "doesn't look very promising"? Are you seeing very long analysis times?
Which workflow are you using with Design Verifier? (Design Error Detection, Test Generation, or Property Proving)
If you are performing automatic test generation, I suggest trying the Test Generation Advisor: https://www.mathworks.com/help/sldv/ug/select-components-for-test-case-generation.html
Here are a few other tips, though I would be happy to chat about this:
3 个评论
Pat Canny
2019-1-8
Hi Davide,
These are great questions. I can help you out on a few of these items. I have passed along your specific Test Generation workflow questions to MathWorks Development and our Pilot Engineering team, who will answer those directly here. This is a relatively common workflow, but I want to be sure I get the right folks to answer.
To answer your last three questions:
"It contains a lot of delays, what you mean by "shortening the length" of them?"
By "shortening", I mean reduce the number of simulation steps before, for example, a transition is taken. As an example, if you specify a number of ticks in a Stateflow chart using an "after" statement, then the number of ticks is what you would reduce.
"By splitting you mean really separate the model in sort of a "logic part" and a "math part", test them separately and then use them together with model referencing? In the model we have a lot of logical components, would it be better to switch to Stateflow then?"
Yes, you could use model reference to recombine the components. That is a good practice.
Design Verifier tends to work well with Stateflow, especially for designs with a lot of logic (which is what Stateflow does best). However, if your design uses a lot of standard Simulink logic components, it wouldn't necessarily save you on analysis time. If you're interested, we could chat directly about your design and workflow. Feel free to reach out to me: pat.canny@mathworks.com
Prahladavaradan Sampath
2019-1-11
hi Davide,
I will try to add on to the suggestions Pat has already provided, but first I would like to understand a bit more about the internal error. Could you provide the output of the command-line invocation of SLDV:
[s,f,h,msg] = sldvrun('modelname');
save msg.mat msg
The structure "msg" would have some more hints about the error that we could use to help you.
regards
Prahlad
Prahladavaradan Sampath
2019-1-11
hi Davide,
You could try using sldvmergeharness to combine the sldv generated harness with your custom test harness models. The overall syntax is
sldvmergeharness('target_harness',{'sldv_harness','harness1'},{'','param1 = 4; param2 = 5'});
The third argument could be used to initialize parameters for the tests in the corresponding harness.
You should be able to do this incrementally. For example after the above step, you could do:
sldvmergeharness('target_harness',{'target_harness','harness2'},{'','param1=5; param2=7'});
This would accumulate the tests in harness2 into target_harness.
regards
Prahlad
2 个评论
Pat Canny
2019-1-17
Hi Davide,
We'd like to learn more about your workflow and help get you unstuck.
When you have time, please e-mail me at pat.canny@mathworks.com
Thanks.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Generate Tests 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!