Build only once when running SIL simulation

5 ビュー (過去 30 日間)
Davide Frey
Davide Frey 2019 年 2 月 8 日
コメント済み: Davide Frey 2019 年 2 月 20 日
Good Morning,
I was trying to verify coverage and numerical equivalence of a model by running SIL simulation and comparing the results with normal simulation. Unfortunately the script I'm using is quite slow, cause apparently for every test that I run it rebuilds the code.
Is there any way to run SIL simulations and to specify that it shall use the generate code already in the folder instead of regenerating it everytime?
To run the SIL simulation I'm using the following command:
out = sim(mdlFileName, ...
'SimulationMode', 'Software-in-the-Loop (SIL)', ...
'SystemTargetFile', 'ert.tlc', ...
'Toolchain', 'MinGW64 | gmake (64-bit Windows)', ...
'PortableWordSizes', 'off', ...
'ProdEqTarget', 'off', ...
'CovEnable', 'on', ...
'CovScope', 'EntireSystem', ...
'CovSaveName', 'off', ...
'RecordCoverage', 'on', ...
'LoadExternalInput', 'on', ...
'ExternalInput', 'test', ...
'StopTime', 'stopTime', ...
'SignalLogging', 'on', ...
'SignalLoggingName', 'logsOut', ...
'CovMetricStructuralLevel', 'MCDC', ...
'GenerateReport', 'off', ...
'CovSaveCumulativeToWorkspaceVar', 'on', ...
'CovShowResultsExplorer', 'off', ...
'CovHtmlReporting', 'off', ...
'CovSaveSingleToWorkspaceVar', 'on', ...
'CovCumulativeVarName', 'covCumulativeData', ...
'CovExternalEMLEnable', 'on', ...
'CovSFcnEnable', 'on', ...
'CovHighlightResults', 'off', ...
'CovSaveOutputData', 'off');
Thanks,
Davide
  2 件のコメント
Shishir Dwivedi
Shishir Dwivedi 2019 年 2 月 19 日
Hello Davide,
There are few ways by which you can speed up the SIL Simulation.
  • If you are using model references in your main model, then you can set Model reference in SIL rebuild option set to Never (setting the parameter, UpdateModelReferenceTargets).
  • You could also enable Fast Restart Mode (set_param(model,'FastRestart','on')). More details here. You could also vary your test vectors (parameter sets and input data) in this mode as well.
Best Regards,
Shishir.
Davide Frey
Davide Frey 2019 年 2 月 20 日
Hallo Shishir,
I tried what you suggested, but I get the following error:
'The following parameters are not supported by the sim command when Fast Restart is enabled: 'SimulationMode''
It looks like it is not possible to set Fast Restart when simulating the model programmatically in SIL mode (or at least I couldn't find a way to do it yet).
Best,
Davide

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGenerate Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by