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

19 views (last 30 days)
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.

Accepted Answer

Antonin
Antonin on 9 Mar 2017
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 Comments
balakrishnan dhandapani
balakrishnan dhandapani on 3 Dec 2017
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.

Sign in to comment.

More Answers (1)

Manex Barrenetxea
Manex Barrenetxea on 27 Oct 2017
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.

Categories

Community Treasure Hunt

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

Start Hunting!