Clear Filters
Clear Filters

What does the option "ModelRefe​renceRTWTa​rgetOnly" mean when "slbuild" is used?

6 views (last 30 days)
I'm advised to use the option "ModelReferenceRTWTargetOnly" for "slbuild" for my model reference block.
And what what does it mean and what is the difference from the option "ModelReferenceCoderTaget"?

Accepted Answer

Kilsu Kim
Kilsu Kim on 20 Sep 2023
Hello,
Starting in R2019a, the 'ModelReferenceRTWTargetOnly' option for "slbuild" is no longer recommended due to clarity in the name. Instead, 'ModelReferenceCoderTargetOnly' is recommended. See the image below from this documentation.
To understand 'ModelReferenceRTWTargetOnly', see the "slbuild" documentation for previous release (R2018b). The difference between 'ModelReferenceRTWTarget' and 'ModelReferenceRTWTargetOnly' is the 'model reference simulation target', that is, whether or not a MEX file is created for each model reference. 'ModelReferenceRTWTargetOnly' does not create a MEX file.
----------------------------------------------------------------------------------------
'ModelReferenceRTWTarget'
Builds a model reference Simulink Coder target and the corresponding model reference simulation target
'ModelReferenceRTWTargetOnly'
Builds only a model reference Simulink Coder target
----------------------------------------------------------------------------------------
When you generate code for a referenced model hierarchy, the code generator produces a standalone executable for the top model and a library module called a model reference target(Simulink Coder target) for each referenced model. When the code executes, the top model executable invokes the model reference targets to compute the referenced model output. Model reference targets are sometimes called Simulink® Coder™ targets.(Generate Code for Model Reference Hierarchy)
Starting in R2020b, the buildSpec argument values 'ModelReferenceCoderTarget' and 'ModelReferenceCoderTargetOnly' have the same behavior. Therefore, there is no need to distinguish between the two options but 'ModelReferenceCoderTarget' is recommended.

More Answers (1)

Angelo Yeo
Angelo Yeo on 20 Sep 2023
안녕하세요.
문의해주신 사항은 R2022b 버전에서 "ModelReferenceRTWTargetOnly" 옵션을 사용하도록 권고받은 사항에 관한 질문으로 보입니다.
결론: R2022b 버전을 사용중이시라면 "ModelReferenceCoderTaget"과 "ModelReferenceRTWTargetOnly" 옵션의 기능은 동일함.
우선 참고로 RTW는 "Real-Time Workshop"의 준말이며 Simulink Coder 제품의 옛날 이름입니다. Simulink Coder라는 이름은 R2011a 부터 적용되었습니다.
R2019a 버전부터는 "ModelReferenceRTWTargetOnly"라는 표현 대신에 "ModelReferenceCoderTargetOnly" 라는 표현을 쓸 것을 권장하고 있다는 점을 먼저 말씀드립니다. 따라서 "RTW"라는 이름이 쓰인 옵션을 사용하는 것은 R2019a 버전부터는 권장되지 않는 사항임을 알려드립니다.
또, R2020b 버전부터는 "ModelReferenceCoderTarget"과 "ModelReferenceCoderTargetOnly"의 기능이 동일하게 변경되었습니다.
이에 관해선 아래의 문서에서 확인하실 수 있습니다.
  • slbuild(https://www.mathworks.com/help/simulink/slref/slbuild.html)
결론적으로 R2022b 버전을 사용중이시라면 "ModelReferenceCoderTaget"과 "ModelReferenceRTWTargetOnly" 옵션의 기능은 동일합니다. 다만, 한 가지 궁금한 점은 R2022b 버전을 사용중이신데 어떤 과정에서 "ModelReferenceRTWTargetOnly" 옵션을 사용하도록 권고 받았는지에 관한 것입니다. 만약, 해당 과정을 재현할 수 있게 알려주신다면 제품 향상에 도움이 될 수 있을 것으로 생각합니다.
  1 Comment
sangmin kim
sangmin kim on 20 Sep 2023
Edited: sangmin kim on 20 Sep 2023
감사합니다.
컨설팅해주시는 분이 예전 기억으로 말씀해주신거 같네요.

Sign in to comment.

Categories

Find more on Embedded Coder in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!