configure autosar scheduling and simulation -凯发k8网页登录

main content

configure autosar scheduling and simulation

you can simulate the behavior of the aggregated components in an autosar classic architecture model or an adaptive architecture model. to test the model, you can connect a test harness model that provides input values and other modeling elements. to simulate, go to the top level of the architecture model and click run.

as an example of configuring scheduling and simulation for an autosar classic 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.

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 and simulate autosar basic software services and run-time environment.

for an example of using bsw blocks in an autosar architecture model, see .

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 . 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:

  1. insert a model block.

  2. configure the model block to reference the architecture model.

  3. 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.

  4. 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

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, see and . for autosar component model examples, see .

in an autosar architecture model, to open the schedule editor, open the modeling tab and select design 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 model autosar_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 file modelname_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 in autosar_tpc_composition, based on the schedule editor configuration.


  tpc_composition
  
    <execution-order-constraint uuid="...">
      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
          ...
        
        
          tps_secondary_throttlesensor2_step
        ...
        
        
          monitor_throttlesensormonitor_step
          ...
        
        
          ctrl_controller_step
          ...
        
        
          actuator_actuator_step
          
            
              /components/tpc_composition/actuator
            
          
          
            /components/actuator/actuator_ib/actuator_step
          
        
      
    
  
  
    /components/tpc_composition
  

see also

| |

related topics

    网站地图