Main Content

Concurrent Execution

Specify tasks, triggers, and nodes for concurrent execution of a Simulink model

Description

Use the Concurrent Execution tool to specify tasks, triggers, and nodes for concurrent execution of a Simulink® model.

Once your Simulink model is configured for concurrent execution, you can use the Concurrent Execution tool to:

  • Add, edit, and delete periodic triggers and tasks.

  • Add, edit, and delete aperiodic triggers and tasks.

  • Explicitly assign partitions to execution elements or blocks in your model.

  • Specify how to handle data transfers between concurrently executing partitions.

Concurrent Execution window

Open the Concurrent Execution

Simulink Toolstrip: On the Setup tab, click Model Settings.

Note

The Concurrent Execution tool appears only if you enable Allow tasks to execute concurrently on target parameter in the Solver pane of the Configuration Parameters dialog box. To enable this parameter:

  1. Open the Model Settings from the Modeling tab of the current model and select Solver.

  2. Expand the Solver details section and select Allow tasks to execute concurrently on target.

    This option is visible only if the Solver Type is Fixed Step and the Periodic sample time constraint is set to Unconstrained.

  3. Click Configure Tasks.

Parameters

Concurrent Execution

Select this check box to enable manual mapping of tasks to blocks.

  • Enables custom task-to-block mappings. The node name changes to Tasks and Mapping label and the icon changes.

  • Disables the Automatically handle rate transition for data transfer check box on the Data Transfer pane.

Clear this check box to use rate-based tasks.

  • Disables custom task-to-block mappings. The node name changes to (Ignored) Tasks and Mapping.

  • Enables the Automatically handle rate transition for data transfer check box on the Data Transfer pane.

Programmatic Use

Parameter: ExplicitPartitioning
Values: on | off
Default: off

Choose from a set of predefined architectures in Simulink, or you can create an interface for a custom architecture. For more information on custom architectures, see Define a Custom Architecture File.

Clear this check box to reset existing target property settings to their default.

Data Transfer

  • Select Ensure data integrity only to ensure maximum data integrity during data transfer.

  • Select Ensure deterministic transfer (maximum delay) to ensure maximum capacity during data transfer.

  • Select Ensure deterministic transfer (minimum delay) to ensure minimum capacity during data transfer.

  • Select Ensure data integrity only to ensure maximum data integrity during data transfer.

  • Select Ensure deterministic transfer (maximum delay) to ensure maximum capacity during data transfer.

  • Select Ensure deterministic transfer (minimum delay) to ensure minimum capacity during data transfer.

  • Select None to not use any extrapolation method for task transitions.

  • Select Zero Order Hold to use zero order hold extrapolation method for extrapolation task transitions.

  • Select Linear to use linear extrapolation method for extrapolation task transitions.

  • Select Quadratic to use quadratic extrapolation method for extrapolation task transitions.

Tasks and Mapping

Software Node

Enter a unique character vector to identify the software node. This value must be a valid MATLAB® variable.

Hardware Node

Enter a unique character vector to identify the hardware node. This value must be a valid MATLAB variable.

Enter a value to specify the clock frequency of hardware node.

Click the color picker icon to select a color for the task icon.

The hardware node icon appears in the tree.

Task

Add a task to software node by clicking .

Enter a unique character vector to identify the task configuration. This value must be a valid MATLAB variable.

Enter a positive real or ratio value.

You can parameterize this value by using MATLAB expression character vectors as values.

Minimum: 0

Click the color picker icon to select a color for the task icon.

The task icon appears on the top left of the Model block. It indicates the task to which the Model block is assigned.

  • As you add a task, the software automatically assigns a color to the task icon, up to six colors. When the current list of colors is exhausted, the software reassigns previously used colors to the new tasks, starting with the first color assigned.

  • If you select a different color for an icon and then use the software to automatically assign colors, the software assigns a preselected color.

Periodic Trigger

Add a periodic trigger to software node by clicking .

Enter a unique character vector to identify the task configuration. This value must be a valid MATLAB variable.

Change ERTDefaultEvent to the actual trigger source event.

Click the color picker icon to select a color for the periodic trigger icon.

The XML-format custom architecture template file defines these settings.

Aperiodic Trigger (Interrupt)

Add an aperiodic trigger to software node by clicking .

Enter a unique character vector to identify the interrupt-driven task configuration. This value must be a valid MATLAB variable.

Click the color picker icon to select a color for the task icon.

The interrupt icon appears on the top left of the Model block. It indicates the task to which the Model block is assigned.

  • As you add an interrupt, the software automatically assigns a color to the interrupt icon, up to six colors. When the current list of colors is exhausted, the software reassigns previously used colors to the new interrupts, starting with the first color assigned.

  • If you select a different color for an icon and then use the software to automatically assign colors, the software assigns a preselected color.

This parameter enables either Signal number [2,SIGRTMAX-SIGRTMIN-1] or Event name.

  • For Linux® or VxWorks®, select POSIX Signal (Linux/VxWorks 6.x). This enables Signal number [2,SIGRTMAX-SIGRTMIN-1].

  • For Windows® systems, select Event (Windows) to enable Event name.

Enter the POSIX signal number as the trigger source.

Minimum: 2

Maximum: Signal number [2,SIGRTMAX-SIGRTMIN-1]

Aperiodic trigger source > POSIX Signal (Linux/VxWorks 6.x) enables this parameter.

Change the ERTDefaultEvent to the actual trigger source event.

Aperiodic trigger source > Event (Windows) enables this parameter.

System tasks

Task

To change the name, period, or color of this task, right-click the task node and select Convert to editable periodic task.

Enter a positive real or ratio value.

To change the name, period, or color of this task, right-click the task node and select Convert to editable periodic task.

Minimum: 0

Click the color picker icon to select a color for the task icon.

The task icon appears on the top left of the Model block. It indicates the task to which the Model block is assigned.

  • As you add a task, the software automatically assigns a color to the task icon, up to six colors. When the current list of colors is exhausted, the software reassigns previously used colors to the new tasks, starting with the first color assigned.

  • If you select a different color for an icon and then use the software to automatically assign colors, the software assigns a preselected color.

Aperiodic Trigger (Interrupt)

To change the name or color of this task, right-click the task node and select Convert to editable aperiodic trigger.

The task icon appears on the top left of the Model block. It indicates the task the Model block is assigned to.

  • To change the name or color of this task, right-click the task node and select Convert to editable aperiodic task.

Profile report

Enter the number of time steps to collect data.

Tips

To programmatically configure models for concurrent execution, see Programmatic Interface for Concurrent Execution.

Version History

Introduced in R2014a