Composition and ECU Software Simulation
When you develop multiple AUTOSAR software component models that are interconnected and work together, you can combine them in an AUTOSAR composition model for simulation. A composition is an AUTOSAR software component that aggregates related groups of software components. Compositions support component scaling and help to manage complexity in a design.
To create a Simulink® representation of an AUTOSAR composition, take one of these actions:
Import an AUTOSAR XML (ARXML) description of a composition (Classic Platform).
Create a model and use Model blocks to reference and connect AUTOSAR component models.
Alternatively, if you have System Composer™ software, you can create an AUTOSAR architecture model and use Software Composition blocks to model AUTOSAR compositions. For more information, see Software Architecture Modeling.
When you simulate a composition model, you simulate the combined behavior of the aggregated AUTOSAR components.
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 composition model and add preconfigured BSW service component blocks. The blocks provide reference implementations of BSW services.
If you have Simulink Design Verifier™, you can perform verification on the AUTOSAR component models.
Blocks
Control Function Available Caller | Call AUTOSAR Function Inhibition Manager (FiM) service interface
ControlFunctionAvailable (Since R2020a) |
Dem Status Inject | Inject an event failure to test recovery (Since R2022a) |
Dem Status Override | Override an event to simulate and verify behavior (Since R2022a) |
DiagnosticEventAvailableCaller | Call AUTOSAR Diagnostic Event Manager (Dem) service interface
EventAvailable (Since R2020a) |
DiagnosticInfoCaller | Call AUTOSAR Diagnostic Event Manager (Dem) service interface
DiagnosticInfo |
DiagnosticMonitorCaller | Call AUTOSAR Diagnostic Event Manager (Dem) service interface
DiagnosticMonitor |
DiagnosticOperationCycleCaller | Call AUTOSAR Diagnostic Event Manager (Dem) service interface
OperationCycle (Since R2020a) |
Diagnostic Service Component | Configure AUTOSAR Diagnostic Services and Runtime Environment (RTE) for emulation |
Function Inhibition Caller | Call AUTOSAR Function Inhibition Manager (FiM) service interface
FunctionInhibition (Since R2020a) |
NvMAdminCaller | Call AUTOSAR NVRAM Manager (NvM) service interface
NvMadmin |
NvMServiceCaller | Call AUTOSAR NVRAM Manager (NvM) service interface
NvMService |
NVRAM Service Component | Configure AUTOSAR NVRAM Services and Runtime Environment (RTE) for emulation |
Functions
createCompositionAsModel | Create Simulink representation of AUTOSAR ARXML software composition |
updateModel | Update AUTOSAR model or architecture with ARXML changes |
Topics
- AUTOSAR Software Components and Compositions
Develop and assemble reusable AUTOSAR software components into AUTOSAR compositions.
- Import AUTOSAR Composition to Simulink
Create Simulink® model from XML description of AUTOSAR software composition.
- Import AUTOSAR Software Composition with Atomic Software Components (Classic Platform)
Import AUTOSAR software composition and its contained components and compositions.
- Combine and Simulate AUTOSAR Software Components
Combine AUTOSAR software components in a composition model for simulation.
- Design and Simulate AUTOSAR Components and Generate Code
Develop AUTOSAR components by implementing behavior algorithms, simulating components and compositions, and generating component code.
- Model AUTOSAR Basic Software Service Calls
Model communication between an AUTOSAR software component and AUTOSAR Basic Software (BSW) services.
- Configure Calls to AUTOSAR Diagnostic Event Manager Service
Implement component calls to Diagnostic Event Manager (Dem) service with preconfigured AUTOSAR Basic Software blocks.
- Configure Calls to AUTOSAR Function Inhibition Manager Service
Implement component calls to Function Inhibition Manager (FiM) service with preconfigured AUTOSAR Basic Software blocks.
- Configure Calls to AUTOSAR NVRAM Manager Service
Implement component calls to NVRAM Manager (NvM) service with preconfigured AUTOSAR Basic Software blocks.
- Configure AUTOSAR Basic Software Service Implementations for Simulation
For system-level simulation of AUTOSAR Basic Software caller blocks, use reference implementations of Basic Software services.
- Simulate AUTOSAR Basic Software Services and Run-Time Environment
Simulate AUTOSAR component calls to Basic Software memory and diagnostic services by using reference implementations.
- Configure and Simulate AUTOSAR Function Inhibition Service Calls
Simulate AUTOSAR component calls to Basic Software function inhibition and related services by using reference implementations.
- Simulate and Verify AUTOSAR Component Behavior by Using Diagnostic Fault Injection
This example shows how to simulate and verify the behavior of AUTOSAR components modeled in Simulink® that contain calls into the AUTOSAR Diagnostic Event Manager (Dem).