Each time a model containing a Task Manager block
runs in simulation or on an embedded processor with external mode, Simulink® records task execution data and statistics as a set of files. A diagnostics
folder, with name
contains two subfolders,
hw, for the data from
simulations and recorded from hardware, respectively. Each run generates a unique folder,
inside either the
hw folders, labelled by the
date and time of the run. The folder name uses a time-date format,
representing the year, month, day, hour, minute, and second, respectively.
To enable external mode in an SoC model, use the SoC Builder app.
Each run generates a set of metadata, statistics, and execution recording files, including:
TaskInfo.mat – This file contains task information, including
the task names and types, used internally by the SoC Blockset™.
metadata.csv – This file contains the derived mean and standard
deviation for all tasks recorded in the
profile.log data file.
metadata.csv file can be used directly in the Task
Manager block to set task duration statistics. For more information on
setting task duration, see Task Duration.
– This file contains
the recorded task execution data as a comma-separated variable list. The first
column contains the start time of each task instance. The second column contains the
task durations for each task instance. If a task is dropped, lost, or corrupted, the
start time and duration of that task execution instance are both replaced by
-1. For more information on using recorded task execution
timing in simulation, see Task Execution Playback using Recorded Data.
Tasks recorded from an embedded processor only start capturing task execution after successful connection of external mode. The lost start-up in task execution recordings from hardware should be considered when comparing timing results to recordings from simulation.
When executing on an embedded processor, task execution recordings times will continue to run until the completion of all task instances scheduled in the Task Manager prior to the stop time of the model.