- Static Code Metrics Report: Use this for measuring the memory allocation quantitatively. This is only available with the Embedded Coder.
- Model Advisor: Use the Code Generation Efficiency checks to identify optimization opportunities.
- Code Generation Advisor: Set the optimization objectives.
C-Coder run-time performance
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I was wondering if there is any way to evaluate the timing performance of generated C-Code of a Simulink model.
I am aware of the build in function "profile viewer"
However, this gives only a generic solution of specific Matlab-code and depends naturally on my computer performance.
I would like to evaluate for example the excecution time of my generated code for the specified embedded system,
which is in my case the TI C2000 Dual Core (F28379D Launchpad) .
The reason: The matlab function which I compile to my target has quite a good exceution time in "profile viewer" but not on my target.
I evaluated this by placing a counter within the embedded system. The difference to the "profile viewer" is enormous.
I would like to find the pieces of code that are responsible for the long run-time without implementig a counter for each line.
Cheers
0 Kommentare
Antworten (1)
atharva
am 9 Nov. 2023
Hey Sam,
I understand that you are facing an issue where "profile viewer" is showing good exceution time for the generated code but not on your target.
You can use the tic and toc function, tic works with the toc function to measure elapsed time. The tic function records the current time, and the toc function uses the recorded value to calculate the elapsed time.
Also you can try the following methods to optimize your code-
I hope this helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!