This model shows real-time task execution profiling feature using IDE Link component.
Available versions of this model:
|On this page…|
The following figure shows the example model:
This Simulink model shows the real-time task execution profiler. The profiler includes a set of utilities for recording, uploading, and analyzing execution profile data for synchronous and asynchronous tasks. The profiler displays when tasks are activated, preempted, resumed, and completed. In addition, the profiler generates an HTML report with statistical information about each synchronous task.
The following figure shows the task execution graph. The graph shows three synchronous tasks. Each task completes successfully following the original schedule set in the model. However, tasks for each sub-rate are temporarily suspended at times to run higher-priority tasks.
One of the following boards:
Open the model.
Open the Model Configuration Parameters dialog and select "Coder Target" under "Code Generation". Click "Target Hardware Resources" and verify that the settings match your target hardware.
Build (Ctrl+B) the model, to generate, build, load, and run the DSP code.
Halt the execution of the program in Code Composer Studio™ (see the note below).
To obtain the task execution graph and the report, enter the following command at the MATLAB® command prompt type:
profile(CCS_Obj, 'execution', 'report')
Real-Time Task Execution Profiler uses an on-chip timer. If you use a processor simulator, select one that can simulate processor timers.
The model needs to run long enough to collect sufficient profiling data. This time depends on the number of profiling samples specified and the sample rates of the model. If you use a simulator, data collection may take considerably longer than when you use hardware.
Running the profiler while the target is running generates warnings and may give unexpected results. Halt the program before you run the profiler.