Main Content

CLA Task Manager

Create and manage task executions in Control Law Accelerator (CLA) model

  • Library:
  • SoC Blockset Support Package for Texas Instruments C2000 Processors

  • CLA Task Manager block

Description

The CLA Task Manager block simulates the execution of software tasks as they would be expected to behave on a CLA processor. Using this block, you can add and remove event-driven tasks from your model. Tasks can be represented as function-call subsystems contained inside a single Model block. The CLA Task Manager block executes individual tasks based on their parameters. Task parameters include duration, trigger, and priority

Note

The CLA Task Manager block cannot be used in a referenced model. For more information on referenced models, see the Model block.

The CLA Task Manager block provides three methods to specify the duration of a task in simulation:

  • A probability model of task duration defined in the block mask.

  • A data file recording of either a previous task simulation or from a task on an SoC device.

  • Input ports, which you can connect to more dynamic models of task duration.

Limitations

  • A model containing a CLA Task Manager blocks does not support simulation stepping. For more information on simulation stepping, see Simulation Stepper.

Ports

Output

expand all

A function-call signal that can trigger event-driven tasks. The CLA Model block represents these tasks as function-call subsystems.

To show the function-call port from an event-driven subsystem contained in a Function-Call Subsystem block on the Model block, include an Inport in the processor Model block connected to the function-call trigger port of the subsystem. In the Inport, select Block Parameters > Signal Attributes > Output function call.

Note

The Task1 port must be connected to a function-call port on a Model block.

Dependencies

To create or remove a control signal port for a task, add or remove the task from the CLA Task Manager block by clicking the Add or Delete buttons in the block dialog mask.

Input

expand all

A message port that triggers the associated event-driven task. The Task1Event port receives the message from a SW Trigger CPU<->CLA, PWM Interface, or ADC Interface block. For more information on messages, see Messages.

Dependencies

To show a Task1Event port, set the Type parameter of Task1 to Event-driven.

Data Types: rteEvent

A positive-value signal that specifies the execution duration of a task at the present time. For more information on specifying task duration, see Task Duration.

Dependencies

To enable this port, set the Specify task duration via parameter to Input port.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32

Parameters

expand all

Enable or disable the simulation of task duration. If you clear this parameter, tasks simulate using a function-call generator. Event-driven tasks inherit their period from the fundamental sampling time of the model. Timer-driven tasks inherit their period from the block dialog mask.

List of the tasks generated by the CLA Task Manager block. Each task has a set of parameters listed in the Main and Simulation tabs of the block dialog mask.

Add a task to the CLA Task Manager block. During deployment, the generated code encapsulates each task as an interrupt. The Main parameters for each task define the properties of its interrupt. During simulation, the task uses a combination of the Main and Simulation parameters for that task.

Remove a task from the Task Manager.

Dependencies

To enable this parameter, specify at least two tasks.

Main

Unique name of the task. The task name must contain only alphanumeric characters and underscores.

Specify the scheduler's priority for the event-driven task as an integer in the range [1, 99]. Higher-priority tasks can preempt lower-priority tasks. The hardware attributes limit the task priority range. For more information on task priority, see Task Priority and Preemption.

Dependencies

To enable this parameter, set Type to Event-driven.

Simulation

Specify the source of timing information for task execution as one of these options.

  • Dialog — Use a normally-distributed probabilistic model with Mean, Deviation, Min, and Max defined in the block dialog mask.

  • Input port — The block input port dynamically defines the execution duration.

  • Record task execution statistics — Use a normally-distributed probabilistic model with mean and deviation defined in the file specified by File name.

For more information on configuring task duration, see Task Duration.

Task duration settings

Adds a distribution to the set of normal distributions that generates an execution duration. For more information on configuring task duration, see Task Duration.

Note

Only a maximum five distributions can be assigned to a single task.

Remove a distribution from the set of normal distributions.

Specify the likelihood of each normal distribution. The Percent weighted sum of normal distributions determines the task duration likelihood. For more information on configuring task duration, see Task Duration.

Note

The sum of Percent for all the distributions in a single task must equal 100.

Specify the mean task duration during simulation of the task. The simulated task duration uses a normal distribution with specified Mean and SD parameter values as a first-order approximation of the task behavior. For more information on configuring task duration, see Task Duration.

Specify the standard deviation task duration during simulation of the task. The simulated task duration uses a normal distribution with specified Mean and SD as a first-order approximation of the task behavior. For more information on configuring task duration, see Task Duration.

Lower limit of a task duration distribution. For more information on configuring task duration, see Task Duration.

Upper limit of a task duration distribution. For more information on configuring task duration, see Task Duration.

Extended Capabilities

Version History

Introduced in R2022a