- 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
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
atharva
2023 年 11 月 9 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Deployment, Integration, and Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!