Concurrent Execution
Specify tasks, triggers, and nodes for concurrent execution of Simulink model
Description
Use the Concurrent Execution tool to specify tasks, triggers, and nodes for concurrent execution of a Simulink® model.
After you configure the Simulink model, 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: You can only open the Concurrent Execution tool if you select the Allow tasks to execute concurrently on target parameter in the Configuration Parameters dialog box. To open the tool:
Open the Configuration Parameters dialog, then select Solver in the left pane.
Expand the Solver details section and select Allow tasks to execute concurrently on target.
This option is visible only if Solver Type is
Fixed Step
and Periodic sample time constraint isUnconstrained
.Click Configure Tasks.
Examples
Parameters
Concurrent Execution
Enable explicit partitioning for concurrent behavior
— Whether to manually map tasks or use rate-based tasks
off
(default) | on
Select this check box to enable manual mapping of tasks to blocks. When you select this check box, you:
Enable custom task-to-block mappings. The node name changes to Tasks and Mapping label and the icon changes.
Disable the Automatically handle rate transition for data transfer check box in the Data Transfer pane.
Clear this check box to use rate-based tasks. Clear this check box to:
Disable custom task-to-block mappings. The node name changes to (Ignored) Tasks and Mapping.
Enable the Automatically handle rate transition for data transfer check box in the Data Transfer pane.
Programmatic Use
Parameter:
ExplicitPartitioning |
Values:
on | off |
Default:
off |
Target architecture
— Architecture to which to deploy model to
Multicore
(default) | Sample architecture - Example with 1 CPU and 2
FPGAs
Choose from a set of predefined architectures in Simulink or a custom architecture. For more information on custom architectures, see Define a Custom Architecture File.
Preserve compatible properties
— Whether 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
— Data transfer mode for synchronous signals
Ensure deterministic transfer (maximum
delay)
(default) | Ensure deterministic transfer (minimum delay)
| Ensure data integrity only
Select the data transfer mode to use for synchronous signals:
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.
Dependencies
To enable this parameter, select Enable explicit model partitioning for concurrent behavior.
Continuous signals
— Data transfer mode for continuous signals
Ensure deterministic transfer (maximum
delay)
(default) | Ensure deterministic transfer (maximum delay)
| Ensure data integrity only
Select the data transfer mode to use for continuous signals:
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.
Dependencies
To enable this parameter, select Enable explicit model partitioning for concurrent behavior.
Extrapolation method
— Extrapolation method to configure continuous-to-continuous task transitions
None
(default) | Zero Order Hold
| Linear
| Quadratic
Select the extrapolation method to use to configure continuous-to-continuous task transitions:
Select
None
to not use an extrapolation method for task transitions.Select
Zero Order Hold
to use the zero order hold extrapolation method for extrapolation task transitions.Select
Linear
to use the linear extrapolation method for extrapolation task transitions.Select
Quadratic
to use the quadratic extrapolation method for extrapolation task transitions.
Dependencies
To enable this parameter, select Enable explicit model partitioning for concurrent behavior.
Tasks and Mapping
Software NodeName
— Name for software node
CPU
(default)
Enter a unique character vector to identify the software node. This value must be a valid MATLAB® variable.
Name
— Name for hardware node
FPGAN
(default)
Enter a unique character vector to identify the hardware node. This value must be a valid MATLAB variable.
Clock Frequency [MHz]
— Clock frequency of hardware node
33
(default) | vector
Enter a value to specify the clock frequency of hardware node.
Color
— Color for hardware node icon
button
Click the color picker button to select a color for the task icon.
The hardware node icon appears in the left pane.
Add task
— Add task to software node
button
Add a task to software node by clicking the Add task button, .
Name
— Name for task configuration
Task
(default)
Enter a unique character vector to identify the task configuration. This value must be a valid MATLAB variable.
Period
— 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.
Color
— Color for task icon
button
Click the color picker button to select a color for the task icon.
The task icon appears on the top left of the Model block to which the task is assigned.
After 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 the Add periodic trigger button, .
Name
— Name for periodic trigger configuration
Periodic
(default)
Enter a unique character vector to identify the periodic trigger configuration. This value must be a valid MATLAB variable.
Period
— Period of 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.
Color
— Color for periodic trigger icon
button
Click the color picker button to select a color for the periodic trigger icon.
Template
— XML-format custom architecture template file
none (default)
Specify the XML-format custom architecture template file for code generation to use for the task, periodic trigger, or aperiodic triggers.
Add aperiodic trigger
— Add aperiodic trigger to software node
button
Add an aperiodic trigger to software node by clicking the Add aperiodic trigger button, .
Name
— Name for the interrupt-driven task configuration
Interrupt
(default)
Enter a unique character vector to identify the interrupt-driven task configuration. This value must be a valid MATLAB variable.
Color
— Color for the interrupt icon
button
Click the color picker button to select a color for the task icon.
The interrupt icon appears on the top left of the Model block to which the task 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
— Trigger source for interrupt-driven task
POSIX® Signal (Linux/VxWorks 6.x)
(default) | Event (Windows)
Select the trigger source for the interrupt-driven task:
For Linux® or VxWorks®, set this parameter to
POSIX Signal (Linux/VxWorks 6.x)
.For Windows® systems, set this parameter to
Event (Windows)
.
Signal number [2,SIGRTMAX-SIGRTMIN-1]
— POSIX signal number trigger source
2
(default) | vector
Enter the POSIX signal number for the trigger source.
Dependencies
To enable this parameter, set Aperiodic trigger
source to
POSIX Signal (Linux/VxWorks 6.x)
.
Event name
— Name of trigger source event
ERTDefaultEvent
(default)
Specify the name of the trigger source event.
Aperiodic trigger source > Event (Windows) enables this parameter.
Dependencies
To enable this parameter, set Aperiodic trigger
source to Event (Windows)
.
System tasks
TaskName
— Default name for periodic system task configuration
DiscreteN
(default)
Specify the name for the periodic system task configuration.
To change the name, period, or color of this task, right-click the task node and select Convert to editable periodic task.
Period
— Period for task
1
(default) | vector
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
— Outline color for task icon
button
Click the color picker button to select a color for the task icon.
The task icon appears on the top left of the Model block to which the task 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
— Default name for interrupt system task
Asynchronous
(default)
Specify the name for the aperiodic system task configuration.
To change the name or color of this task, right-click the task node and select Convert to editable aperiodic trigger.
Color
— Specify outline color for task icon
button
Click the color picker button to select a color for the task icon.
The task icon appears on the top left of the Model block to which the task 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
— 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