Using Embedded Coder, how can I prevent optimizations from interfering with Code Replacement Library (CRL) replacement?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 27 Jun. 2018
Bearbeitet: MathWorks Support Team
am 5 Feb. 2024
Using Embedded Coder, how can I prevent optimizations from interfering with Code Replacement Library (CRL) replacement?
Akzeptierte Antwort
MathWorks Support Team
am 2 Dez. 2023
Bearbeitet: MathWorks Support Team
am 5 Feb. 2024
Code Replacement happens after optimizations, so inlining and other optimizations can change function signatures that are involved in Code Replacement.
In order to protect a particular block or subsystem from optimizations, make the input signals global.
This can be done using Test Points or Global Storage Classes.
Run the below command in your MATLAB instance to access the release specific documentations on the same:
Test Points:
web(fullfile(docroot, 'simulink/ug/working-with-test-points.html'))
Global Storage Class:
web(fullfile(docroot, 'rtw/ug/apply-storage-classes-to-data.html'))
In order to create an easily-reusable subsystem that will always be protected from optimizations, add the block to a subsystem in a library, and make the inputs global.
This subsystem from the library can now be used to prevent optimizations from interfering with Code Replacement, without having to modify any other signal properties.
As an example, see the attached library, which has each input's Storage Class set to SimulinkGlobal.
Please follow the below link to search for the required information regarding the current release:
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!