Profile Task Execution on Processor

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.

Task Profiling with External Mode

  1. Open the Simulink® model to profile.

  2. Select Model Configuration Parameters > Hardware Implementation, and then set Hardware board to an SoC Blockset™ supported hardware board.

  3. In the Hardware board settings > Task profiling on processor section, enable Show in SDI.

  4. Select Code or Kernel 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.

  5. 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 model.

  6. 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.

  7. 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.

See Also

Related Topics