Main Content

Recording Tasks for Use in Simulation

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 modelname_diagnostics, contains two subfolders, sim and hw, for the data from simulations and recorded from hardware, respectively. Each run generates a unique folder, inside either the sim or hw folders, labelled by the date and time of the run. The folder name uses a time-date format, YYYY_MM_DD_hh_mm_ss, representing the year, month, day, hour, minute, and second, respectively.

Note

To enable external mode in an SoC model, use the SoC Builder tool.

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

  • TaskName.csv – 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.

Note

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

See Also

Related Topics