Filter löschen
Filter löschen

Simulink Code Generation Workflow for Subsystem

1 Ansicht (letzte 30 Tage)
Federico Toso
Federico Toso am 13 Nov. 2023
Kommentiert: Federico Toso am 22 Nov. 2023
In my understanding, if all blocks in a Simulink subsystem support Code Generation, than it is possible to treat the whole subsystem as an atomic unit and then generate code for it.
Is this correct? If so, is it always a good idea to convert the sybsystem to atomic unit in order to increase efficiency of code generation?

Akzeptierte Antwort

Mark McBroom
Mark McBroom am 18 Nov. 2023
Converting a subsystem to be atomic will disable some cross boundary optimizations. The benefit of making the subsystem atomic is you can then specify reusable function on the "code generation" tab of the subsystem that will result in a standalone C function, optionally in it's own file. If the atomic subsystem is used multiple times in the model, the code for the subsystem will only be generated once.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by