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.
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:
Open the Model Settings from the Modeling tab of the current model and select Solver.
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 toUnconstrained
.Click Configure Tasks.
Examples
Parameters
Concurrent Execution
Enable explicit partitioning for concurrent behavior
— Specify whether you want to manually map tasks (explicit mapping) or use the
rate-based tasks
off
(default) | on
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 |
Target architecture
— Choose the architecture you want to deploy your model to
Multicore
(default) | Sample architecture - Example with 1 CPU and 2
FPGAs
| custom architecture
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.
Preserve compatible properties
— Specify whether you want to preserve existing target property settings
on
(default) | off
Clear this check box to reset existing target property settings to their default.
Data Transfer
Periodic signals
— Select the data transfer mode of synchronous signals
Ensure deterministic transfer (maximum
delay)
(default) | Ensure deterministic transfer (minimum delay)
| Ensure data integrity only
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.
Continuous signals
— Select the data transfer mode of continuous signals
Ensure deterministic transfer (maximum
delay)
(default) | Ensure deterministic transfer (maximum delay)
| Ensure data integrity only
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.
Extrapolation method
— Select the extrapolation method of data transfer to configure continuous-to-continuous task transitions
None
(default) | Zero Order Hold
| Linear
| Quadratic
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 NodeName
— Specify a unique name for software node
CPU
(default) | character vector
Enter a unique character vector to identify the software node. This value must be a valid MATLAB® variable.
Name
— Specify a unique name for hardware node
FPGAN
(default) | character vector
Enter a unique character vector to identify the hardware node. This value must be a valid MATLAB variable.
Clock Frequency [MHz]
— Specify clock frequency of hardware node
33
(default) | vector
Enter a value to specify the clock frequency of hardware node.
Color
— Specify a color for the hardware node icon
blue (default) | color
Click the color picker icon to select a color for the task icon.
The hardware node icon appears in the tree.
Add task
— Add task to software node
button
Add a task to software node by clicking .
Name
— Specify a unique name for the task configuration
Task
(default) | character vector
Enter a unique character vector to identify the task configuration. This value must be a valid MATLAB variable.
Period
— Specify the period of a periodic trigger
1
(default) | vector
Enter a positive real or ratio value.
You can parameterize this value by using MATLAB expression character vectors as values.
Minimum:
0
Color
— Specify a color for the task icon
blue (default) | color
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.
Add periodic trigger
— Add periodic trigger to software node
button
Add a periodic trigger to software node by clicking .
Name
— Specify a unique name for the periodic trigger configuration
Periodic
(default) | character vector
Enter a unique character vector to identify the task configuration. This value must be a valid MATLAB variable.
Period
— Specify the period of a periodic trigger
1
(default) | vector
Change ERTDefaultEvent
to the actual trigger source
event.
Color
— Specify a color for the periodic trigger icon
blue (default) | color
Click the color picker icon to select a color for the periodic trigger icon.
Template
— Specify the XML-format custom architecture template file that code generation properties use for the task, periodic trigger or aperiodic triggers
none (default)
The XML-format custom architecture template file defines these settings.
Add aperiodic trigger
— Add aperiodic trigger to software node
button
Add an aperiodic trigger to software node by clicking .
Name
— Specify a unique name for the interrupt-driven task configuration
Interrupt
(default) | character vector
Enter a unique character vector to identify the interrupt-driven task configuration. This value must be a valid MATLAB variable.
Color
— Specify a color for the interrupt icon
blue (default) | color
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.
Aperiodic trigger source
— Specify the trigger source for the interrupt-driven task
POSIX® Signal (Linux/VxWorks 6.x)
(default) | Event (Windows)
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.
Signal number [2,SIGRTMAX-SIGRTMIN-1]
— Enter the POSIX signal number as the trigger source
2
(default) | vector
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.
Event name
— Enter the name of the event as the trigger source
ERTDefaultEvent
(default) | character vector
Change the ERTDefaultEvent
to the actual trigger source
event.
Aperiodic trigger source > Event (Windows) enables this parameter.
System tasks
TaskName
— Specify a default name for the periodic system task configuration
DiscreteN
(default) | character vector
To change the name, period, or color of this task, right-click the task node and select Convert to editable periodic task.
Period
— Specify the period for the task
1
(default)
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
Color
— Specify the outline color for the task icon
blue (default) | color
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.
Name
— Specify a default name for the interrupt system task
Asynchronous
(default) | character vector
To change the name or color of this task, right-click the task node and select Convert to editable aperiodic trigger.
Color
— Specify the outline color for the task icon
blue (default) | color
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
Number of time steps
— Specify number of time steps to generate profile report
100
(default) | vector
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