- 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 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (4)
Pat Canny
le 4 Jan 2019
Modifié(e) : Pat Canny
le 4 Jan 2019
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 commentaires
Pat Canny
le 8 Jan 2019
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
le 11 Jan 2019
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
1 commentaire
Prahladavaradan Sampath
le 11 Jan 2019
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 commentaires
Pat Canny
le 17 Jan 2019
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.
Voir également
Catégories
En savoir plus sur Generate Tests dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!