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 for simulation.

To simulate the behavior of the aggregated components in an open architecture model, click Run.

Simulate Basic Software Service Calls

For the AUTOSAR Classic Platform, AUTOSAR Blockset provides 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, see Model AUTOSAR Basic Software Service Calls and Simulate AUTOSAR Basic Software Services and Run-Time Environment.

For an example of using BSW blocks in an AUTOSAR architecture model, see Author 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 model autosar_tpc_composition from example Author 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 model autosar_tpc_composition. The 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 model autosar_tpc_system.

To connect the architecture model to the test harness, insert a Model block, and configure the Model block to reference the architecture model.

In the Model block dialog box, select the option Schedule rates. For the associated parameter Schedule rates with, select Schedule Editor. The architecture model components have explicit partitions that you can schedule with the Schedule Editor.

Connect the architecture model ports to the test harness signals.

To view and run the completed test harness model, open example model autosar_tpc_system. (To open the model in a local working folder, use openExample('autosar_tpc_system').)

Schedule Component Runnables

To schedule and specify the execution order of AUTOSAR component runnables for simulation, use the Schedule Editor. In the Schedule Editor, you can:

  • View a graphical representation of AUTOSAR component runnables as partitions.

  • Directly specify the execution order of runnables.

You can open the Schedule Editor from a standalone component model or an architecture model.

In a standalone AUTOSAR component model, to open the Schedule Editor, open the Modeling tab and select Design > Schedule Editor. Depending on the modeling style of the component, the editor displays the implicit partitions (tasks) or explicit partitions in the model. You can use the editor controls to reorder the partitions or create new explicit partitions. For more information, see Configure AUTOSAR Runnable Execution Order By Using Schedule Editor.

In an AUTOSAR architecture model, to open the Schedule Editor, open the Modeling tab and select Design Tools > Schedule Editor. The editor displays partitions representing every component runnable in the composition hierarchy. Here is the execution order view when you open the Schedule Editor from the example architecture model autosar_tpc_composition. You can use the editor controls to modify the execution order of the runnables.

For more information, see Using the Schedule Editor (Simulink).

See Also

| |

Related Topics