フィルターのクリア

C-Coder run-time performance

3 ビュー (過去 30 日間)
Sam
Sam 2023 年 11 月 8 日
回答済み: atharva 2023 年 11 月 9 日
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

回答 (1 件)

atharva
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!

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by