Is it possible to inline Code Gen of top level Simulink model containing model references?

조회 수: 1 (최근 30일)
I am using MATLAB 2021b. I have a top level Simulink model containing several lower level model references. When generating C# code, it is possible to change the configuration settings so that all of the model references appear as inlined code, rather than function calls in the top level .c file? In my application, I am keen to improve execution speed and generating inlined code could help with this aim.

답변 (1개)

Benjamin Thompson
Benjamin Thompson 2022년 8월 16일
For generating C or C++ code using Embedded Coder, if you right click on the subsystem block, go to Block Parameters, and go to the Code Generation tab, you will see the available function packaging options for the block. One of those is inline.
  댓글 수: 1
Kevin Ferguson
Kevin Ferguson 2022년 8월 17일
Thanks for this. But my topModel is composed of several model references and not subsystems. To do what you've suggested, I'm I right in saying that I would need to convert all the model refs to subsystems? Is there an easier alternative? Then apply the online option.
For my application, I'm keen to retain model references.

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

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by