Main Content

Configure AUTOSAR Scheduling and Simulation

To configure scheduling and simulation for an AUTOSAR architecture model, you can:

  • Add Basic Software (BSW) blocks to simulate calls to BSW services.

  • Create a test harness model to connect inputs and plant elements to the architecture model.

  • Use the Schedule Editor to schedule and specify the execution order of component runnables.

To simulate the behavior of the aggregated components in an open architecture model, clickRun

Simulate Basic Software Service Calls

For the AUTOSAR Classic Platform,AUTOSAR Blocksetprovides Basic Software (BSW) blocks, which allow you to model software component calls to BSW services that run in the AUTOSAR run-time environment. BSW services include NVRAM Manager (NvM), Diagnostic Event Manager (Dem), and Function Inhibition Manager (FiM). In the run-time environment, AUTOSAR software components typically access BSW services using client-server or sender-receiver communication.

To simulate AUTOSAR components that call BSW services, you create a containing architecture, composition, or test harness model and add preconfigured BSW service component blocks. The blocks provide reference implementations of BSW service operations.

If the components in your architecture model use BSW caller blocks, make sure that the architecture model contains BSW service implementations. For more information, seeModel AUTOSAR Basic Software Service CallsandSimulate AUTOSAR Basic Software Services and Run-Time Environment

For an example of using BSW blocks in an AUTOSAR architecture model, seeAuthor AUTOSAR Compositions and Components in Architecture Model

Connect a Test Harness

After you develop an architecture model, you can connect it to a test harness model that provides meaningful input values and plant model elements. For example, consider the architecture modelautosar_tpc_compositionfrom exampleAuthor AUTOSAR Compositions and Components in Architecture Model。The model has three require (input) ports and one provide (output) port.

Here is a test harness model for simulating the architecture modelautosar_tpc_composition。test harness contains a plant model with a pedal input block and signals that correspond with the architecture model require and provide ports. This model was adapted from example modelautosar_tpc_system

To connect the architecture model to the test harness:

  1. Insert aModelblock.

  2. Configure theModelblock to reference the architecture model.

  3. In theModelblock dialog box, select the optionSchedule rates。For the associated parameterSchedule rates with中,选择Schedule Editor。The architecture model components have explicit partitions that you can schedule with the Schedule Editor.

  4. Connect the architecture model ports to the test harness signals.

To view and run the completed test harness model, open example modelautosar_tpc_system。(To open the model in a local working folder, useopenExample('autosar_tpc_system')。)

Schedule Component Runnables

For AUTOSAR Classic Platform software components that contain multiple runnables, the AUTOSAR Timing Extensions specification defines execution order constraints. These constraints specify the execution order of runnable entities within a component. You can view and manipulate the constraints at the component level or, in AUTOSAR architecture models, at the Virtual Function Bus (VFB) level.

In architecture models, you can:

  • Import VFB-level execution order constraints from ARXML files.

  • Use the Schedule Editor to modify the execution order of AUTOSAR component runnables. The editor displays every runnable in every component in the composition hierarchy.

  • As part of composition export, export VFB-level execution order constraints to an ARXML timing module,modelname_timing.arxml

To schedule and specify the execution order of AUTOSAR component runnables, use the Schedule Editor. From a standalone component model or an architecture model, you can:

  • View a graphical representation of component runnables as partitions in an AUTOSAR component or architecture model.

  • Create partitions and map them to AUTOSAR runnables.

  • Directly specify the execution order of runnables.

The Schedule Editor supports multiple modeling styles, including rate-based and export-function modeling. For more information, seeUsing the Schedule EditorandCreate Partitions。For AUTOSAR component model examples, seeConfigure AUTOSAR Runnable Execution Order

In an AUTOSAR architecture model, to open the Schedule Editor, open theModelingtab and selectDesign Tools>Schedule Editor。The editor displays every runnable in every component in the composition hierarchy. Here is the execution order view when you open the Schedule Editor from the example architecture modelautosar_tpc_composition。Use the editor controls to modify the execution order of the runnables.

Exporting a composition from an AUTOSAR architecture model exports VFB-level execution order constraints into the filemodelname_timing.arxml。The ARXML module aggregates timing information from the entire composition hierarchy. This ARXML code shows the execution order constraint exported for the runnables inautosar_tpc_composition, based on the Schedule Editor configuration.

 TPC_Composition  <EXECUTION-ORDER-CONSTRAINTUUID="..."> EOC  /Components/TPC_Composition    PedalSensor_PedalSensor_Step   /Components/Sensors/PedalSensor    /Components/PedalSensor/PedalSensor_IB/PedalSensor_Step    /Timing/TPC_Composition/EOC/TPS_Primary_ThrottleSensor1_Step     TPS_Primary_ThrottleSensor1_Step< /字>…< / EOC-EXECUTABLE-ENTITY-REF > < EOC-EXECUTABLE-ENTITY-REF UUID="..."> TPS_Secondary_ThrottleSensor2_Step< /字>…< / EOC-EXECUTABLE-ENTITY-REF > < EOC-EXECUTABLE-ENTITY-REF UUID="..."> Monitor_ThrottleSensorMonitor_Step< /字>…< / EOC-EXECUTABLE-ENTITY-REF > < EOC-EXECUTABLE-ENTITY-REF UUID="..."> Ctrl_Controller_Step< /字>…< / EOC-EXECUTABLE-ENTITY-REF > < EOC-EXECUTABLE-ENTITY-REF UUID="..."> Actuator_Actuator_Step   /Components/TPC_Composition/Actuator    /Components/Actuator/Actuator_IB/Actuator_Step       /Components/TPC_Composition  

See Also

||

Related Topics