Measure task execution timing on an embedded processor using a code or kernel instrumentation profiler. Using external mode, a model with a Task Manager block executing on an SoC hardware board, the code or kernel instrumentation profiler stream the execution timing of the task to the host computer, displaying the data in the Simulation Data Inspector (SDI) in real time. You can also record the task execution data, which you can use with the Task Manager block to play back the task execution in simulation.
Open the Simulink® model to profile.
Select Model Configuration Parameters > Hardware Implementation, and then set Hardware board to an SoC Blockset™ supported hardware board.
In the Hardware board settings > Task profiling on processor section, enable Show in SDI.
for code or kernel instrumentation profiling, respectively. Based on the
profiling method you select, execution data will be collected from the processor
and displayed on the SDI. For more information about the instrumentation
methods, see Kernel Instrumentation Profiler and Code Instrumentation Profiler.
Optional enable Save to file to log the measured task
execution data into a file and save that file to
<model>_ert_rtw/instrumented/diagnostics folder on
your host PC. You can use this recorded data file in a Task
Manager block to simulate the task execution timing on your
Click Run to deploy and execute the code on the hardware board. This step opens the Simulation Data Inspector, displaying the streaming data for the tasks and processors on which the tasks are executing.
Click Stop to end the model execution.
You can access and examine the logged data in the code generation folder used by the model. For more information on accessing the recorded streaming profiled data, see Recording Tasks for Use in Simulation. To use the recorded data in simulation, see Task Execution Playback using Recorded Data.