In an AUTOSAR software component model, you can use the Schedule Editor to schedule and specify the execution order of runnables for simulation. In the Schedule Editor, you can:
View a graphical representation of runnables as partitions in an AUTOSAR component.
Directly specify the execution order of runnables.
For more information, see Using the Schedule Editor (Simulink).
You can also use the Schedule Editor in AUTOSAR architecture modeling. See Configure AUTOSAR Scheduling and Simulation.
In an AUTOSAR component model, you can configure implicit or explicit partitions. To view and configure implicit partitions:
Open AUTOSAR example model autosar_swc_expfcns
, which uses
Simulink® exported functions to model AUTOSAR runnables.
Open the Modeling tab and select Design > Schedule Editor. The Schedule Editor opens. The editor displays the implicit partitions (tasks) in the model.
You can use the editor controls to reorder the partitions.
Simulate the component model.
To create explicit partitions in an AUTOSAR software component:
Open AUTOSAR example model autosar_swc
, which models
periodic runnables with multiple sample rates.
To create a partition, open the block parameters dialog box for the SS1
subsystem and select Treat as atomic unit. Set parameter
Schedule as to Periodic
partition
. Specify a partition name and sample time. Click
Apply.
Open the Modeling tab and select Design > Schedule Editor. The Schedule Editor opens. The editor displays the explicit periodic partition in the model.
In the model window, open the Functions tab in the Code Mappings editor. Map the partition function to an AUTOSAR runnable. If necessary, use the AUTOSAR Dictionary to add a new runnable.
Simulate the component model.