How can I get the code execution tome of the model in simulink? (for the code generation of the C2000 processors)

8 次查看(过去 30 天)
I want to know what is the execution time of my model in simulink. I need to set a proper sampling time for the code generation for C2000 processors.
Thanks.

采纳的回答

Antonin
Antonin 2017-3-9
Hi JIANWEI,
Here are 2 techniques that will help you profile the execution time of the generated code on the TI C2000 processors:
  1. In R2017a, we introduced multitasking profiling, which will allow you to measure and visualize execution time and preemptions for the different synchronous rates in your model. Check the Real-Time Code Execution Profiling Example to learn more about this technique.
  2. In PIL mode, you can enable profiling and measure the execution time of your generated code. The Code Verification and Validation with PIL Example will show you how to run in PIL on the TI C2000 devices, while the "Code Verification and Validation with PIL" chapter of the documentation will explain you how to enable profiling with PIL.
I hope this helps,
Good luck!
Antonin.
  5 个评论
BD
BD 2017-12-3
Hi Antonin,
1. Is the execution profile is for code running in hardware or for simulation in simulink environment?
2. If the execution profile is collected from hardware, through which interface (serial, can etc...) the data is collected from hardware.

请先登录,再进行评论。

更多回答(1 个)

Manex Barrenetxea
Manex Barrenetxea 2017-10-27
Dear Antonin,
We have tried to measure and visualize execution time and preemptions for the different synchronous rates in our model following your recommendation. However, the following error arose while compiling:
*The parameter ExecutionProfileBufferLen is not defined for selected hardware board.
We are trying to measure the execution times of the F28335 board. Could you clarify us which could be the root of the error we are having?
Thank you in advance and best regards,
Manex.

类别

Help CenterFile Exchange 中查找有关 Code Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by