AUTOSAR EXP LayeredSoftwareArchitecture
AUTOSAR EXP LayeredSoftwareArchitecture
AUTOSAR EXP LayeredSoftwareArchitecture
Document Identification No 53
Document ID 53 : 2
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
Document Change HistoryM
Date Release Changed by Change Description
2022-11-24 R22-11 AUTOSAR ➢ Incorporated new concepts for Vehicle-2-X Data Manager, MACsec, CAN XL, DDS,
Release Secured Time Synchronization, Vehicle-2-X Support for China
Management ➢ Editorial changes
2021-11-25 R21-11 AUTOSAR ➢ Incorporated draft concept for new Memory Driver and Memory Access
Release
Management
2020-11-30 R20-11 AUTOSAR ➢ Removed Pretended Networking
Release ➢ Added caveats for E2E Protection Wrapper
Management ➢ Layer Interaction Matrix: Allow Crypto Driver to access Memory Services
➢ Incorporated new concepts for Intrusion Detection System Manager, CP Software Clusters
2019-11-28 R19-11 AUTOSAR ➢ Incorporated new concepts for Atomic multicore safe operations, Signal-service-translation,
Release NV data handling enhancement
Management ➢ Changed Document Status from Final to published
2018-10-31 4.4.0 AUTOSAR ➢ Adopting LIN Slave Support, LinNm removed
Release ➢ New Concepts: Key Management, 1st draft of MCAL Multicore Distribution
Management ➢ Editorial changes
2017-12-08 4.3.1 AUTOSAR ➢ Editorial changes
Release
Management
Document ID 53 : 3
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
Document Change History
Date Release Changed by Change Description
2016-11-30 4.3.0 AUTOSAR ➢ Incorporated new 4.3 concepts for Crypto Stack, Vehicle-2-X Communication, SOME/IP
Release Transport Protocol, DLT rework
Management ➢ Removed obsolete Dbg module
➢ Editorial changes
2015-07-31 4.2.2 AUTOSAR ➢ Editorial changes
Release
Management
Document ID 53 : 4
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
Document Change History
Date Release Changed by Change Description
2014-10-31 4.2.1 AUTOSAR ➢ Incorporated new 4.2 concepts for: Switch Configuration; Sender-Receiver-Serialization;
Release CAN-FD; Large-Data-COM; E2E-Extension; Global Time Synchronization; Support for Post-
Management build ECU-Configuration; Secure-Onboard-Communication; ASIL/QM-Protection
➢ Introduction of new error classification
➢ Editorial changes
2014-03-31 4.1.3 AUTOSAR ➢ Editorial changes
Release
Management
2013-03-15 4.1.1 AUTOSAR ➢ Clarification of partial network support for CAN/LIN slave.
Administration ➢ New Ethernet stack extensions
➢ Added Crypto Service Manager to System Services
➢ Revised presentation of J1939 and added new J1939 modules
➢ Added new energy management concepts: “Pretended Networking”, “ECU Degradation”
➢ Added new modules: “Output Compare Unit Driver” and “ ime Service”
➢ Changed handling of Production Errors
➢ Fixed various typography and layout issues
2011-12-22 4.0.3 AUTOSAR ➢ Added a note for the R3-compatibility FlexRay Transport Layer FrArTp on slide "ki890".
Administration ➢ Added an overview chapter for energy management and partial networking
➢ Corrected examples regarding DEM symbol generation
➢ Fixed minor typography issues
➢ Clarification of term AUTOSAR-ECU on slide "94jt1"
➢ Corrected CDD access description for EcuM on slide "11123“
Document ID 53 : 5
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
Document Change History
Date Release Changed by Change Description
2009-12-18 4.0.1 AUTOSAR ➢ Added a note regarding support for System Basis Chips on slide "94juq“
Administration ➢ Clarification of DBG and DLT text on slide "3edfg"
➢ Corrected DBG description on slide "11231"
2010-02-02 3.1.4 AUTOSAR ➢ The document has been newly structured. There are now 3 main parts:
Administration ◼ Architecture
◼ Configuration
◼ Integration and Runtime Aspects
➢ The whole content has been updated to reflect the content of the R 4.0 specifications.
➢ Topics which have bee newly introduced or heavily extended in release 4.0 have been
added. E.g.,. Multi-Core Systems, Partitioning, Mode Management, Error Handling,
Reporting and Diagnostic, Debugging, Measurement and Calibration, Functional Safety etc
➢ Legal disclaimer revised
2008-08-13 3.1.1 AUTOSAR ➢ Legal disclaimer revised
Administration
2007-12-21 3.0.1 AUTOSAR ➢ Updates based on new wakeup/startup concepts
Administration ➢ Detailed explanation for post-build time configuration
➢ "Slimming" of LIN stack description
➢ ICC2 figure
➢ Document meta information extended
➢ Small layout adaptations made
Document ID 53 : 6
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
Document Change History
Date Release Changed by Change Description
2007-01-24 2.1.15 AUTOSAR ➢ ICC clustering added.
Administration ➢ Document contents harmonized
➢ Legal disclaimer revised
➢ Release Notes added
➢ “Advice for users” revised
➢ “Revision Information” added
2006-11-28 2.1.1 AUTOSAR Rework Of:
Administration ➢ Error Handling
➢ Scheduling Mechanisms
➢ More updates according to architectural decisions in R2.0
2006-01-02 1.0.1 AUTOSAR ➢ Correct version released
Administration
2005-05-31 1.0.0 AUTOSAR ➢ Initial release
Administration
Document ID 53 : 7
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
Disclaimer
Disclaimer
This work (specification and/or software implementation) and the material contained in it, as released by AUTOSAR, is for the purpose
of information only. AUTOSAR and the companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intellectual property rights. The commercial exploitation
of the material contained in this work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by any means, for informational purposes only. For any
other purpose, no part of the work may be utilized or reproduced, in any form or by any means, without permission in writing from the
publisher.
The work has been developed for automotive applications only. It has neither been developed, nor tested for non-automotive
applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Document ID 53 : 8
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
page id: toc01
Table of contents
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces: General Rules
7. Interfaces: Interaction of Layers
8. Overview of CP Software Clusters
2. Configuration
3. Integration and Runtime Aspects
This document does not contain requirements and is informative only. The examples given are
not meant to be complete in all respects.
Inputs
This document is based on specification and requirement documents of AUTOSAR.
NOTE: In the AUTOSAR sense an ECU means one microcontroller plus peripherals and the according
software/configuration. The mechanical design is not in the scope of AUTOSAR. This means that if more than
one microcontroller in arranged in a housing, then each microcontroller requires its own description of an
AUTOSAR-ECU instance.
AUTOSAR extensibility
The AUTOSAR Software Architecture is a generic approach:
➢ standard modules can be extended in functionality, while still being compliant,
◼ still, their configuration has to be considered in the automatic Basic SW configuration process!
➢ non-standard modules can be integrated into AUTOSAR-based systems as Complex Drivers and
The AUTOSAR Architecture distinguishes on the highest abstraction level between three
software layers: Application, Runtime Environment and Basic Software which run on a
Microcontroller.
Application Layer
Microcontroller
The AUTOSAR Basic Software is further divided in the layers: Services, ECU Abstraction,
Microcontroller Abstraction and Complex Drivers.
Application Layer
Runtime Environment
Services Layer
Complex
ECU Abstraction Layer Drivers
Microcontroller
The Basic Software Layers are further divided into functional groups. Examples of Services
are System, Memory and Communication Services.
Application Layer
Runtime Environment
System Services Memory Crypto Off-board Communication I/O Hardware Complex
Services Services Communication Services Abstraction Drivers
Services
Microcontroller
Microcontroller
Properties
Implementation: µC dependent
Upper Interface: standardized and µC
independent
Microcontroller
Task
Make higher software layers independent of
ECU hardware layout
Properties
Implementation: µC independent, ECU hardware
dependent
Upper Interface: µC and ECU hardware
independent
Complex
Drivers
functionality, e.g. drivers for devices: ECUECU Abstraction
Abstraction Layer
Layer
➢ which are not specified within AUTOSAR,
Microcontroller Abstraction Layer
➢ with very high timing constrains or
➢ for migration purposes etc. Microcontroller
Properties
Implementation: might be application, µC and ECU
hardware dependent
Upper Interface: might be application, µC and ECU
hardware dependent
Complex
Drivers
➢ Vehicle network communication and management
ECUECU Abstraction
Abstraction Layer
Layer
services
➢ Memory services (NVRAM management) Microcontroller Abstraction Layer
➢ Diagnostic Services (including UDS communication, error
memory and fault treatment) Microcontroller
➢ ECU state management, mode management
➢ Logical and temporal program flow monitoring (Wdg
manager)
Task
Provide basic services for applications, RTE and
basic software modules.
Properties
Implementation: mostly µC and ECU hardware
independent
Upper Interface: µC and ECU hardware independent
Services Layer
Above the RTE the software architecture style
Complex
Drivers
changes from “layered“ to “component style“. ECUECU Abstraction
Abstraction Layer
Layer
Task
Make AUTOSAR Software Components independent
from the mapping to a specific ECU.
Properties
Implementation: ECU and application specific
(generated individually for each ECU)
Upper Interface: completely ECU independent
The Basic Software can be subdivided into the following types of services:
➢ Input/Output (I/O)
Standardized access to sensors, actuators and ECU onboard peripherals
➢ Memory
Standardized access to internal/external memory (non volatile memory)
➢ Crypto
Standardized access to cryptographic primitives including internal/external hardware
accelerators
➢ Communication
Standardized access to: vehicle network systems, ECU onboard communication systems and
ECU internal SW
➢ Off-board Communication
Standardized access to: Vehicle-to-X communication, in vehicle wireless network systems,
ECU off-board communication systems
➢ System
Provision of standardizeable (operating system, timers, error memory) and ECU specific (ECU
state management, watchdog manager) services and library functions
A driver contains the functionality to control and access an internal or an external device.
Internal devices are located inside the microcontroller. Examples for internal devices are:
➢ Internal EEPROM
➢ Internal CAN controller
➢ Internal ADC
A driver for an internal device is called internal driver and is located in the Microcontroller
Abstraction Layer.
External devices are located on the ECU hardware outside the microcontroller. Examples for
external devices are:
➢ External EEPROM
➢ External watchdog
➢ External flash
A driver for an external device is called external driver and is located in the ECU Abstraction
Layer. It accesses the external device via drivers of the Microcontroller Abstraction Layer.
This way also components integrated in System Basis Chips (SBCs) like transceivers and
watchdogs are supported by AUTOSAR.
➢ Example: a driver for an external EEPROM with SPI interface accesses the external
EEPROM via the handler/driver for the SPI bus.
Exception:
The drivers for memory mapped external devices (e.g. external flash memory) may access the
microcontroller directly. Those external drivers are located in the Microcontroller Abstraction
Layer because they are microcontroller dependent.
An Interface (interface module) contains the functionality to abstract from modules which are
architecturally placed below them. E.g., an interface module which abstracts from the
hardware realization of a specific device. It provides a generic API to access a specific type of
device independent on the number of existing devices of that type and independent on the
hardware realization of the different devices.
Example: an interface for a CAN communication system provides a generic API to access CAN
communication networks independent on the number of CAN Controllers within an ECU and
independent of the hardware realization (on chip, off chip).
A handler is a specific interface which controls the concurrent, multiple and asynchronous
access of one or multiple clients to one or more drivers. I.e. it performs buffering, queuing,
arbitration, multiplexing.
Handler functionality is often incorporated in the driver or interface (e.g. SPIHandlerDriver, ADC
Driver).
A manager offers specific services for multiple clients. It is needed in all cases where pure
handler functionality is not enough to abstract from multiple clients.
Besides handler functionality, a manager can evaluate and change or adapt the content of the
data.
Example: The NVRAM manager manages the concurrent access to internal and/or external
memory devices like flash and EEPROM memory. It also performs distributed and reliable
data storage, data checking, provision of default values etc.
AUTOSAR Libraries
Libraries: Runtime Environment (RTE)
➢ can be called by BSW modules (that Basic Software
including the RTE), SW-Cs, libraries
or integration code
➢ run in the context of the caller in the
same protection environment
➢ can only call libraries
➢ are re-entrant ECU Hardware
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces: General Rules
7. Interfaces: Interaction of Layers
8. Overview of CP Software Clusters
2. Configuration
3. Integration and Runtime Aspects
Ethernet Driver
FlexRay Driver
Crypto Driver
PORT Driver
PWM Driver
MCU Driver
OCU Driver
GPT Driver
CAN Driver
ADC Driver
Flash Test
ICU Driver
DIO Driver
RAM Test
LIN Driver
Core Test
Software
module
internal
peripheral
Clock Unit
SHE/HSM
EEPROM
Pow er &
FLASH
device
LIN or
WDT
PWM
CAN
MCU
OCU
CCU
ADC
GPT
DIO
SPI
SCI
Microcontroller
External
External Driver for ext. Driver for ext.
EEPROM
Watchdog Driver ADC ASIC I/O ASIC
Driver
Communication Drivers
SPIHandlerDriver
µC SPI
Complex Drivers
A Complex Driver is a module which implements non-
standardized functionality within the basic software
stack.
Microcontroller (µC)
An example is to implement complex sensor
evaluation and actuator control with direct access
to the µC using specific interrupts and/or complex Example:
µC peripherals (like PCP, TPU), e.g.
Complex Drivers
➢ Injection control
➢ Electric valve control
➢ Incremental position detection
Injection Control
Fulfill the special functional and timing requirements
for handling complex sensors and actuators
Properties:
Implementation: highly µC, ECU and application
dependent
Upper Interface to SW-Cs: specified and implemented
according to AUTOSAR (AUTOSAR interface)
e.g. PCP
e.g. CCU
e.g. TPU
Lower interface: restricted access to Standardized µC
Interfaces
I/O HW
The I/O Hardware Abstraction is a group of modules Abstraction
ADC Driver
SPIHandler
Properties:
DIO Driver
Driver
Implementation: µC independent, ECU hardware
dependent
Upper Interface: µC and ECU hardware independent,
dependent on signal type specified and
ADC
DIO
SPI
implemented according to AUTOSAR (AUTOSAR µC
interface)
Provide equal mechanisms to access a bus channel I/O Drivers Communication Drivers
SPIHandler
CAN Driver
DIO Driver
Driver
Properties:
Implementation: µC independent, ECU hardware
dependent and external device dependent
CAN
DIO
SPI
µC
Upper Interface: bus dependent, µC and ECU
hardware independent
Flash Driver
SPIHandler
(EEPROM, Flash).
EEPROM
Internal
Driver
Driver
Properties:
Implementation: µC independent, external device
dependent
EEPROM
Flash
SPI
Upper Interface: µC, ECU hardware and memory µC
device independent
External
Task: Memory Driver
Provide equal mechanisms to access internal (on-chip) COM Drivers Memory Drivers
and external (on-board)
memory devices and type of memory hardware
SPIHandler
Memory
Memory
Driver1
Driver2
(EEPROM, Flash).
Driver
Properties:
Implementation: µC independent, external device
dependent
EEPROM
Flash
SPI
µC
Upper Interface: µC, ECU hardware and memory
device independent
Example:
Task:
Onboard Device Abstraction
Abstract from ECU specific onboard devices. Watchdog Interface
External
Watchdog Driver
SPIHandler
w atchdog
Driver
device dependent
internal
driver
Upper Interface: µC independent, partly ECU
hardware dependent
Wdg
SPI
µC
Task: Example:
Crypto Hardw are Abstraction
Provide equal mechanisms to access internal (on-chip)
and software Crypto Interface
cryptographic devices.
Properties:
External Crypto
Implementation: µC independent Crypto Driver
Driver (SW-based)
Crypto
Crypto
Driver
Driver
SPIHandlerDriver
HSM
SHE
SPI
µC
➢ the Key Manager interacts with the key provisioning Microcontroller (µC)
master (either in NVM or Crypto Driver) and
manages the storage and verification of certificate
chains
➢ The Intrusion Detection System Manager is
responsible for handling security events reported
by BSW modules or SW-C
Example:
Crypto Services
Task:
Provide cryptographic primitives, IDS services and key
Intrusion
storage to the application in a uniform way. Crypto Service Detection
Key Manager
Abstract from hardware devices and properties. Manager System
Manager
Properties:
Implementation: µC and ECU hardware independent,
highly configurable
Upper Interface: µC and ECU hardware independent
specified and implemented according to AUTOSAR
(AUTOSAR interface)
Task:
Provide a uniform interface to the vehicle network for
communication.
Provide uniform services for network management
Provide uniform interface to the vehicle network for Example:
diagnostic communication Communication Services
Hide protocol and message properties from the Generic
Com. Manager
Diagnostic Log
Transformer
Transformer
Com Based
NM
application.
Large Data
AUTOSAR
Diagnostic
and Trace
SOME/IP
Interface
COM
COM
Properties: <Bus
specific>
Implementation: µC and ECU HW independent, partly State <Bus
Secure Onboard
IPDU Multiplexer
Communication
Manager
dependent on bus type PDU Router specific>
NM
E2E
Upper Interface: µC, ECU hardware and bus type Transformer
<Bus specific>
independent Transport
Protocol
Com. Manager
Diagnostic Log
Generic NM cation
Large Data
AUTOSAR
Diagnostic
and Trace
Drivers
Interface Drivers
COM
COM
Microcontroller (µC)
CAN
State
Secure Onboard
IPDU Multiplexer
Manager
Communication
PDU Router
CAN NM
The CAN Communication Services are a group of
modules for vehicle network communication with the
CAN Transport
Protocol
communication system CAN.
Task:
Communication Hardw are Abstraction
➢ Provide a uniform interface to the CAN network.
CAN Interface
Hide protocol and message properties from the
CAN Transceiver
CAN XL
Driver for ext. application.
Driver CAN ASIC
Com. Manager
Diagnostic Log
cation
Large Data
AUTOSAR
Diagnostic
and Trace
Drivers
COM
COM
Microcontroller (µC)
Secure Onboard
IPDU Multiplexer
Communication
Ethernet Interface
Task:
CAN Transceiver Driver CAN XL
➢ Provide vehicle wide communication with
I/O Drivers Communication Drivers
same semantic used everywhere regardless
DIO Driver Handler / Driver CAN Driver CAN XL
physical connection (CAN XL / Ethernet) or
communication paradigm (Signal- and
Service-based communication).
µC SPI CAN XL
External
CAN XL Controller
51
Document ID 53 : 51
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
page id: bbnxp
Architecture – Content of Software Layers Application Layer
Communication Stack Extension – CAN XL RTE
Communi-
cation
Services
Properties: COM HW
Abstr.
52
Document ID 53 : 52
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
page id: qw wwe
Architecture – Content of Software Layers Application Layer
Communication Stack Extension – TTCAN RTE
Communi-
cation
Services
Example:
COM HW
Communication Services Abstr.
Communi-
I/O
Com. Manager
Diagnostic Log
Generic NM cation
Large Data
AUTOSAR
Diagnostic
and Trace
Drivers
Interface Drivers
COM
COM
Microcontroller (µC)
CAN
State
Secure Onboard
IPDU Multiplexer
Manager
Communication
PDU Router
CAN NM
The TTCAN Communication Services are the
optional extensions of the plain CAN Interface and
CAN Transport
Protocol
CAN Driver module for vehicle network communi-
cation with the communication system TTCAN.
Communication Hardw are Abstraction
Task:
CAN Interface TTCAN ➢ Provide a uniform interface to the TTCAN network.
CAN Transceiver Driver for ext. Hide protocol and message properties from the
Driver CAN ASIC
application.
I/O Drivers Communication Drivers
SPIHandler TTCAN
DIO Driver
Driver
CAN Driver
Please Note:
➢ The CAN Interface with TTCAN can serve both a
µC SPI TTCAN
plain CAN Driver and a CAN Driver TTCAN.
External
TTCAN Controller
Properties: COM HW
Abstr.
J1939 Diagnostic
I/O
Com. Manager
Diagnostic Log
Com. Manager
Generic cation
Large Data
AUTOSAR
Diagnostic
and Trace
NM Drivers
Drivers
COM
COM
Interface
Microcontroller (µC)
Request Manager
State Manager
J1939
CAN
J1939 NM
Secure Onboard
IPDU Multiplexer
PDU Router
Com. Manager
Diagnostic Log
Generic Communi-
Large Data
AUTOSAR
Diagnostic
and Trace
NM cation
COM
COM
Interface Drivers
Microcontroller (µC)
FlexRay
State
The FlexRay Communication Services are a group
Secure Onboard
IPDU Multiplexer
Communication
Manager
PDU Router FlexRay
NM of modules for vehicle network communication with
the communication system FlexRay.
FlexRay Transport
Protocol
Task:
Communication Hardw are Abstraction
➢ Provide a uniform interface to the FlexRay network.
FlexRay Interface
Hide protocol and message properties from the
Driver for FlexRay Driver for external
application.
Transceiver FlexRay Controller
Com. Manager
Diagnostic Log
Generic NM cation
Large Data
AUTOSAR
Diagnostic
and Trace
Interface Drivers
COM
COM
Microcontroller (µC)
Ethernet
UDP NM
State The TCP/IP Communication Services are a
Secure Onboard
IPDU Multiplexer
Manager
Communication
Ethernet Interface
Task:
Ethernet Sw itch Driver ➢ Provide a uniform interface to the TCP/IP
Ethernet Transceiver Driver network. Hide protocol and message
properties from the application.
I/O Drivers Communication Drivers
µC MII Ethernet
External
Ethernet Controller
Properties: COM HW
Abstr.
Com. Manager
Diagnostic Log
Generic NM cation
Large Data
AUTOSAR
Diagnostic
and Trace
Interface Drivers
COM
Ethernet
UDP NM
State The Data Distribution Services is a module
Secure Onboard
IPDU Multiplexer
Data Distribution
Manager
Communication
communication.
Socket Adaptor
TCP/IP Communication Services
Properties: COM HW
Abstr.
➢ The DDS module relies on unserialized data Communi-
cation
as input, so it can implement all the features Drivers
DDS standard.
V2X Management
The European Vehicle-2-X Communication
V2X Basic
Transport
Services are a group of modules for Vehicle-to-
Protocol X communication via an ad-hoc wireless
network.
V2X Geo
Netw orking
➢ Facilities: implement the functionality for reception and
transmission of standardized V2X messages, build the
interface for vehicle specific SW-Cs
[Wireless / Wired] Communication Hardw are Abstraction ➢ Basic Transport Protocol = Layer 4
➢ Geo-Networking = Layer 3 (Addressing based on
Ethernet Interface
geographic areas, the respective Ethernet frames have their
own Ether-Type)
Wireless Ethernet Transceiver Driver ➢ V2X Management: manages cross-layer functionality (like
dynamic congestion control, security, position and time)
➢ V2X Data Manager: manages the receiving and
I/O Drivers Wireless Communication Drivers transformation of V2X messages and sends them through
RTE to SW-Cs or via SOME/IP
DIO Driver Handler / Driver Wireless Ethernet Driver
Task:
µC SPI Wireless Ethernet
➢ Provide a uniform interface to the Wireless
Ethernet network. Hide protocol and message
External properties from the application.
Wireless Ethernet Controller
Task:
µC E.g. SPI Cellular V2X ➢ Provide a uniform interface to the cellular
based V2X network. Hide protocol and
External Cellular V2X message properties from the application.
etc.
NVRAM Manager
Properties:
Implementation: µC and ECU hardware
independent, highly configurable
Upper Interface: µC and ECU hardware
independent specified and implemented
according to AUTOSAR
(AUTOSAR interface)
System Services
Synchronized Time-
➢ µC dependent (like OS), and may support special
Watchdog Manager
Function Inhibition
Manager (Bsw M)
Manager (ComM)
Diagnostic Event
Manager (Dem)
Communication
Manager (FiM)
Time Service
µC capabilities (like Time Service),
(WdgM)
(Det)
(Tm)
➢ partly ECU hardware and application dependent
(like ECU State Manager) or
➢ hardware and µC independent.
AUTOSAR OS
(EcuM)
Provide basic services for application and
basic software modules.
Properties:
Implementation: partly µC, ECU hardware and
application specific
Upper Interface: µC and ECU hardware
independent
69 Document ID 53 : AUTOSAR_EXP_LayeredSoftw areArchitecture
Document ID 53 : 69
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
page id: 3edfg
Architecture – Content of Software Layers Application Layer
Error Handling, Reporting and Diagnostic RTE
Communi-
System Services cation
Services
Application Layer Onboard
Dev. Abstr.
Micro-
AUTOSAR Runtime Environment (RTE) controller
Drivers
Communication Microcontroller (µC)
Services
System Services
Watchdog Manager
Microcontroller
➢ All detected development errors in the Basic Software are reported to Default Error Tracer.
➢ The Diagnostic Communication Manager provides a common API for diagnostic services
➢ etc.
Task:
Provide an abstraction from the specific RTE
physical properties of hardware sensors and
actuators, which are connected to an ECU. Basic Software
Interfaces to (e.g.)
• I/O HW Abstraction (access to I/O signals)
Properties: • Memory Services (access to calibration data)
• System Services (access to Error Manager)
Implementation: µC and ECU HW independent,
sensor and actuator dependent
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces: General Rules
7. Interfaces: Interaction of Layers
8. Overview of CP Software Clusters
2. Configuration
3. Integration and Runtime Aspects
ECU
core 0: core 1:
partition 0: partition 1:
Application Layer
RTE
Operating
Communi- Communi-
System Services System
Memory cation cation
Services Services Services
(Master) ECU State (Satellite)
I/O HW Manager I/O HW
Abstraction Abstraction
Complex Drivers
Complex Drivers
BSW Mode
Manager COM HW
COM HW
Onboard Dev. Memory HW Abstraction
Abstraction
Abstraction Abstraction (e.g. CAN,
(e.g. ETH)
FR)
Microcontroller (µC)
ECU
core 0: core 1:
partition 0: partition 1: partition 2: partition 3: partition 4:
Application Layer
RTE
Microcontroller (µC)
➢ Basic Software Mode Manager (BswM) in every partition that runs BSW modules
◼ all these partitions are trusted
➢ One EcuM per core (each in a trusted partition)
➢ EcuM on that core that gets started via the boot-loader is the master EcuM
◼ Master EcuM starts all Satellite EcuMs
System Services
Microcontroller
core 0: core 1:
System Services System Services
management Core 1
ECU State Manager
Function Inhibition
Diagnostic Event
Communication
Communication
Inter OsApplication
Inter OsApplication
ECU state
communication
communication
Manager
Manager
Manager
Manager
Manager
Core 0
…
iOC
iOC
AUTOSAR OS
AUTOSAR OS
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces: General Rules
7. Interfaces: Interaction of Layers
8. Overview of CP Software Clusters
2. Configuration
3. Integration and Runtime Aspects
modules are
separated into
different partitions
(BSW distribution)
Hardware
BSW
Other
BSW
Other
modul Other BSW
OS
Other
BSW
modules es modules
WdgIf
BSW
modules
Other BSW
modules
modules
Wdg
Hardware
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces: General Rules
7. Interfaces: Interaction of Layers
8. Overview of CP Software Clusters
2. Configuration
3. Integration and Runtime Aspects
Application Layer
Com
Dcm
Dlt
If
WdgM
ComM
BswM
Dem
StbM
NvM
FiM
Det
SM
Tm
SecOC
PduR
IpduM
Xf
Nm
Tp
Driver for Driver for
Onboard Device Memory Hardware Communication ext. ext.
AUTOSAR OS
FlsTst
Pw m
Mem
Wdg
Mcu
Ocu
Adc
Eep
Can
Port
Gpt
Fls
Spi
Lin
Eth
Icu
Dio
Fr
Microcontroller
Application Layer
PDU Router
CAN … …
O
S CAN St Mgr …
CAN CAN
..
TP NM
CAN Interface
CAN Driver
ECU Hardware
Application Layer
Proprietary software
ECU Hardware
Application Layer
Basic Software
ECU Hardware
ICC 3 compliant
behavior
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces: General Rules
7. Interfaces: Interaction of Layers
8. Overview of CP Software Clusters
2. Configuration
3. Integration and Runtime Aspects
Interface
Interface Interface Interface
.............. Interface
relevant
Operating Complex
BSW System Drivers
relevant Standardized
Interface
Possible interfaces
inside Basic Software Microcontroller
Basic Software
(which are
Abstraction
not specified
within AUTOSAR)
ECU-Hardware
Note: This figure is incomplete with respect to the possible interactions between the layers.
Services Layer: horizontal interfaces are allowed One Layer may access all interfaces of the SW layer
Example: Error Manager saves fault data using the below
NVRAM manager
ECU Abstraction Layer: horizontal interfaces are Bypassing of one software layer should be avoided
allowed
A complex driver may use selected other BSW Bypassing of two or more software layers is not
modules allowed
Microcontroller (µC)
Microcontroller Hardware
Memory HW Abstraction
Comm. HW Abstraction*
interactions between
Communication Drivers*
Crypto HW Abstraction
Onboard Device Abstr.
System Services / OS
Microcontroller Drivers
AUTOSAR Basic Software layers
Memory Services
Complex Drivers
Crypto Services
Memory Drivers
Crypto Drivers
uses
I/O Drivers
✓ allowed to use SW Components / RTE ✓ ✓ ✓ ✓ ✓ ✓ ✓
not allowed to System Services / OS ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
use Memory Services ✓ ✓ ✓ ✓
restricted use Crypto Services ✓ ✓ ✓ ✓
(callback only) Communication Services ✓ ✓ ✓ ✓ ✓ ✓
Off-board Comm. Services ✓ ✓ ✓ ✓ ✓ ✓
The matrix is read Complex Drivers restricted access -> see the following two slides
row-wise: I/O Hardware Abstraction ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
Example: “I/O Onboard Device Abstr. ✓ ✓ ✓ ✓ ✓ ✓
Drivers are Memory HW Abstraction ✓ ✓ ✓ ✓ ✓ ✓ ✓
allowed to use Crypto HW Abstraction ✓ ✓ ✓ ✓ ✓ ✓
Comm. HW Abstraction* ✓ ✓ ✓ ✓ ✓ ✓ ✓
System Services
Microcontroller Drivers ✓ ✓
and Hardware,
Memory Drivers ✓ ✓
but no other
✓ ✓ ✓
layers”. Crypto Drivers
Communication Drivers* ✓ ✓ ✓
(gray background indicates
“non-Basic Software”
I/O Drivers ✓ ✓
layers)
*: includes w ired and w ireless communication
Complex Drivers
Complex Drivers may need to interface to other modules
in the layered software architecture, or modules in
the layered software architecture may need to interface
to a Complex Driver. If this is the case,
Microcontroller (µC)
the following rules apply:
This is only allowed if the Complex Driver offers an interface which can be generically configured by the accessing
AUTOSAR module.
A typical example is the PDU Router: a Complex Driver may implement the interface module of a new bus system.
This is already taken care of within the configuration of the PDU Router.
Again, this is only allowed if the respective modules of the layered software architecture offer the interfaces, and are
prepared to be accessed by a Complex Driver. Usually this means that
➢ The respective interfaces are defined to be re-entrant.
➢ If call back routines are used, the names are configurable
➢ No upper module exists which does a management of states of the module (parallel access would change states
without being noticed by the upper module)
Complex Drivers
In general, it is possible to access the following modules:
➢ The SPI driver
➢ The GPT driver
➢ The I/O drivers with the restriction that re-entrancy often only exists for Microcontroller (µC)
separate groups/channels/etc. Parallel access to the same
group/channel/etc. is mostly not allowed. This has to be taken care of during configuration.
➢ The NVRAM Manager as exclusive access point to the memory stack
➢ The Watchdog Manager as exclusive access point to the watchdog stack
➢ The PDU Router as exclusive bus and protocol independent access point to the communication stack
➢ The bus specific interface modules as exclusive bus specific access point to the communication stack
➢ The NM Interface Module as exclusive access point to the network management stack
➢ The Communication Manager (only from upper layer) and the Basic Software Mode Manager
as exclusive access points to state management
➢ Det, Dem and Dlt
➢ The OS as long as the used OS objects are not used by a module of the layered software architecture
Still, for each module it is necessary to check if the respective function is marked as being re-entrant. For example,
‘init’ functions are usually not re-entrant and should only be called by the ECU State Manager.
Complex Drivers
In case of multi-core architectures, there are additional rules:
➢ The BSW can be distributed across several cores. The core
responsible for executing a call to a BSW service is determined
by the task mapping of its BswOperationInvokedEvent.
Microcontroller (µC)
➢ Crossing partition and core boundaries is permitted for module
internal communication only, using a master/satellite implementation.
➢ Consequently, if the CDD needs to access standardized interfaces of the BSW, it needs to reside on the same
core.
➢ In case a CDD resides on a different core, it can use the normal port mechanism to access AUTOSAR interfaces
and standardized AUTOSAR interfaces. This invokes the RTE, which uses the IOC mechanism of the operating
system to transfer requests to the other core.
➢ However, if the CDD needs to access standardized interfaces of the BSW and does not reside on the same core,
◼ either a satellite providing the standardized interface can run on the core where the CDD resides and forward
the call to the other core
◼ or a stub part of the CDD needs to be implemented on the other core, and communication needs to be
organized CDD-local using the IOC mechanism of the operating system similar to what the RTE does.
➢ Additionally, in the latter case the initialization part of the CDD also needs to reside in the stub part on the
different core.
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces: General Rules
7. Interfaces: Interaction of Layers
8. Overview of CP Software Clusters
2. Configuration
3. Integration and Runtime Aspects
➢ What are the features / difference of the available memory service modules?
➢ The different service modules (memory managers) abstract from the used non-volatile (NV) memory, but the properties of the
hardware impact their design and how access is realized.
➢ There are constraints on the use of the different listed modules depending on the properties of the used NV hardware.
➢ The following table lists the properties of the modules and related NV memory.
NvM • Storage of module data (e.g. Error information, • Direct (memory mapped) and • Internal data flash
special configuration info, status information, indirect (e.g. via SPI) NV access (via Flash eeprom
diagnostic data, ...) • Serialized access (read-while- emulation)
• Supports many reader/writer (BSW and SW-C) write-in-same-HW-segment may • External eeprom /
in parallel. not work → NvM always buffer the data flash
• Mostly read during start-up and written in data)
shutdown, but intermediate reads/writes during
normal operation are also supported
• Typical data size per user is bytes to some KiB
BndM • Storage of car specific data • Direct access of NV data (via • Internal data flash
• (Very rare) Writes via diagnostics, only in pointer) is required • Internal code flash
„controlled environment“ (e.g. repair shop) • Parallel read of NV data is required
• Supports many readers (SW-C) in parallel
• Users have direct access via pointer
• Typical size many KiB
FOTA • Storage of model specific car data/code • Read-While-Write (e.g. via memory • Internal and
(manager) • Very few users, typically only one abstraction/partitioning) external code flash
• Typical size in MiB
• Write new data in the background e.g. over
several driving cycles (interruptible and
preemptable update procedure)
External External
Watchdog EEPROM
Memory Access
The microcontroller includes also an internal flash which is
used in parallel to the external EEPROM. The EEPROM
External External
Abstraction and the Flash EEPROM Emulation have an Watchdog Driver Mem Driver
API that is semantically identical.
Spi_ReadIB() Mem_Read()
Spi_WriteIB() Mem_Write()
The Memory Abstraction Interface can be realized in the
following ways: COM Drivers Memory Drivers
➢ routing during runtime based on device index (int/ext) SPIHandlerDriver
Internal
Memory Driver
➢ routing during runtime based on the block index (e.g. >
0x01FF = external EEPROM)
➢ routing during configuration time via ROM tables with µC SPI Flash
function pointers inside the NVRAM Manager (in this case
the emory Abstraction Interface only exists „virtually“)
CS1 SPI CS2 SPI
External External
Watchdog EEPROM
RTE
BndM_GetBlockPtr() (C-func)
Memory
Abstraction
Interface
Fee_Read()
Fee_Write()
External diagnostic request
(WriteDataByIdentifier) Flash EEPROM
Emulation
Fls_Read()
Fls_Write()
µC Flash
➢ Use-case: large data blocks frequently written with only small local changes
◼ The actual algorithm is vendor-specific (block split, compression, delta,…)
lo ompression
S C Nv emIf
Nv riteBlock
continue in
Nv main function
irrorCallback
vendor specific
compression
emIf rite
Nv obEndNotification
Nv ob inish
Architecture Description
The NVRAM Manager accesses drivers via the
Memory Abstraction Interface. It addresses NvM_Write(BlockIndex)
different memory devices using a device index.
Memory Services
Ea_Write(
BlockNumber, Fee_Write(
The EEPROM Abstraction as well as the Flash BlockNumber,
DataBufferPtr)
EEPROM Emulation could have the following DataBufferPtr)
interface (e.g. for the write function):
EEPROM Abstaction Flash
EEPROM Emulation
Std_ReturnType Ea_Write
(
uint16 BlockNumber,
uint8 *DataBufferPtr
)
File MemIf.h:
#include “Ea.h“ /* for providing access to the EEPROM Abstraction */
...
#define MemIf_Write(DeviceIndex, BlockNumber, DataBufferPtr) \
Ea_Write(BlockNumber, DataBufferPtr)
File MemIf.c:
Does not exist
Result:
No additional code at runtime, the NVRAM Manager virtually accesses the EEPROM Abstraction or the Flash
Emulation directly.
File MemIf.h:
File MemIf.c:
#include “Ea.h“ /* for getting the API function addresses */
#include “Fee.h“ /* for getting the API function addresses */
#include “MemIf.h“ /* for getting the WriteFctPtrType */
Result:
The same code and runtime is needed as if the function pointer tables would be inside the NVRAM Manager.
The Memory Abstraction Interface causes no overhead.
Conclusions:
➢ The Memory Abstraction Interface eases the access of the NVRAM Manager to one or more
EEPROM and Flash devices
➢ SDU LayerN_Tx(*PDU);
➢ PCI
void LayerN+1_Tx(*SDU);
PCI is the abbreviation of “Protocol Control Layer N-1
Information”. his Information is needed to pass a
SDU from one instance of a specific protocol layer PCI data structure SDU
to another instance. E.g. it contains source and
target information.
The PCI is added by a protocol layer on the
transmission side and is removed again on the
receiving side. TP
PCI data structure SDU
➢ PDU
PDU is the abbreviation of “Protocol Data Unit”. PCI data structure PDU
The PDU contains SDU and PCI.
On the transmission side the PDU is passed from
the upper layer to the lower layer, which interprets CAN IF
this PDU as its SDU.
PCI data structure
The bus prefix and layer prefix are described in the following table:
ISO Layer Layer AUTOSAR PDU Name CAN / LIN prefix FlexRay
Prefix Modules TTCAN prefix
prefix
Layer 6: I COM, DCM I-PDU N/A
Presentation
I PDU router, PDU I-PDU N/A
(Interaction)
multiplexer SF:
Single Frame
Layer 3: N TP Layer N-PDU CAN SF LIN SF FR SF FF:
Network Layer CAN FF LIN FF FR FF First Frame
CAN CF LIN CF FR CF CF:
Consecutive
CAN FC LIN FC FR FC
Frame
Layer 2: L Driver, Interface L-PDU CAN LIN FR FC:
Data Link Layer Flow Control
Examples:
➢I-PDU or I-SDU For details on the frame types, please refer to the
AUTOSAR Transport Protocol specifications for CAN,TTCAN, LIN and FlexRay.
➢CAN FF N-PDU or FR CF N-SDU
➢LIN L-PDU or FR L-SDU
Components
➢ PDU Router:
◼ Provides routing of PDUs between different abstract communication controllers and upper layers
◼ Scale of the Router is ECU specific (down to no size if e.g. only one communication controller exists)
◼ Provides TP routing on-the-fly. Transfer of TP data is started before full TP data is buffered
➢ COM:
◼ Provides routing of individual signals or groups of signals between different I-PDUs
➢ NM Coordinator:
◼ Synchronization of Network States of different communication channels connected to an ECU via the
network managements handled by the NM Coordinator
➢ Communication State Managers:
◼ Start and Shutdown the hardware units of the communication systems via the interfaces
◼ Control PDU groups
RTE
Communication
Signals
Manager
FlexRay TTCAN
Secure Diagnostic Eth State CAN State LIN State Generic
Diagnostic State State
SOME/IP Onboard IPDU AUTOSAR Communi- Manager Manager Manager NM interface
Log and Manager Manager
TP Communi- Multiplexer COM cation
Trace
cation Manager
NM
Coordinator
I-PDU I-PDU I-PDU I-PDU I-PDU I-PDU
XCP
PDU Router
Ethernet Protocol
I-PDU 1 I-PDU 1 NM
I-PDU I-PDU 1 I-PDU I-PDU NM
NM
Module
See description Module
NM
CAN Tp Module
on next slide FlexRay Tp Module
J1939Tp
N-PDU N-PDU N-PDU
Communication
HW
Eth Interface FlexRay Interface LIN Interface
CAN Interface2 Abstraction
(incl. LIN TP)
Communication Drivers
Eth Driver FlexRay Driver CAN Driver 2 LIN Low Level Driver
Note: This image is not complete with 1 The Interface between PduR and Tp differs significantly compared to the interface between PduR and the Ifs.
respect to all internal communication In case of TP involvement a handshake mechanism is implemented allowing the transmission of I-Pdus > Frame size.
paths. 2 CanIf with TTCAN serves both CanDrv with or without TTCAN. CanIf without TTCAN cannot serve CanDrv with TTCAN.
Sd DoIP
I-PDUs I-PDUs
UDP NM
Socket Adaptor
TCP/IP Communication
Messages Streams
DHCP
UDP TCP
Services
Packet Segment
IPv4/v6
ARP/ND ICMP
Datagram
Communication HW
Eth Interface Abstraction
Eth. Frame
Communication Drivers
Eth Driver
RTE
Complex Drivers
Communication
Signals
Manager
PDU Router
CAN Tp NM
Module
J1939Tp
N-PDU N-PDU
Communication HW Abstraction
Communication Drivers
CAN XL Driver
Architecture Description
SW-C
The RTE uses the transformer which are located in
the System Service Layer.
Rte_Write(data)
Interface Description
The transformers in this example have the following Transformer Coordination
interfaces: RTE
Buffer 1 Buffer 2
SomeIpXf_SOMEIP_Signal1
(
uint8 *buffer1, SomeIpXf_SOMEIP_Signal1
SafetyXf_Safety_Signal1
(
Com_SendDynSignal
( (
uint16 *buffer1Length, buffer1,
buffer2,
Signal1,
&buffer2Length,
<type> data &buffer1Length,
data
buffer1,
buffer2,
buffer2Length
buffer1Length
) )
)
)
SafetyXf_Safety_Signal1
(
uint8 *buffer2,
uint16 *buffer2Length,
uint8 *buffer1,
uint16 buffer1Length SOME/IP AUTOSAR
E2E Transformer
) Transformer COM
Goal
The COM Based Transformer provides serialization
functionality to the transformer chain based on a fixed SW-C Application Layer
communication matrix.
The fixed communication matrix allows an optimized placement
of signals into PDUs (e.g. a boolean data can be configured
to only occupy one bit in the PDU). This enables the usage Transformer Coordination
of transformer chains in low payload networks like Can or RTE
Buffer 1 Buffer 2
Lin.
Functionality
➢ The COM Based Transformer is the first transformer
(serializer) and gets the data from the application via the
RTE. Com Based Other AUTOSAR
➢ Based on the COM configuration (communication matrix) Transformer Transformer COM
the data is serialized exactly in the same way as the COM
module would have done it (endianess, sign extension).
➢ Other transformers may enhance the payload to have
CRCs and sequence counters (SC).
➢ The transformer payload is passed to the COM module as
one array of byte via the Com_SendSignalGroupArray API.
➢ The COM module can be configured to perform CRC SC D D D D
transmission mode selection based on the communication 1 2 3 4
matrix definition.
Signal Pdu
Goal
Adaptive Platform restricts communication to Service-oriented communication, the rest of the vehicle however
still uses Signal-based communication means - therefore a translation of these two approaches has to be
performed in order to allow an interaction between Classic and Adaptive Platform.
Functionality
➢ The definition and implementation of the Classic platform signal-service-translation shall be done inside an
Application Software Component, the so called Translation Software Component.
➢ The Translation Software Component has Ports defined and the payload is described using PortInterfaces
◼ Signal-to-service: Ports for incoming signals and Ports for outgoing events
◼ Service-to-signal: Ports for incoming events and Ports for outgoing signals
Functionality
➢ For the signal-based part the full functionality of the Classic platform COM-Stack is available and may be
configured such that the signal-based ISignalIPdus may originate from a variety of sources (Can, Lin, Flexray)
and the ISignalIPdus may be safety and security protected.
➢ For the service-oriented part it has to be guaranteed that the defined SOME/IP Service actually is compatible to
the Adaptive platform. This applies for the payload part (e.g. the SOME/IP serializer has to be used) as well as
for the control path using BswM and ServiceDiscovery.
➢ The behavioral part of the Translation Software Component itself defines how the data from signal-based side is
transported to the service-oriented side, and vice versa.
COM-Stack
SOME/IP Serialized Bytes Com Pdu
SOME/IP
Header a b c d a d c b
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces: General Rules
7. Interfaces: Interaction of Layers
8. Overview of CP Software Clusters
2. Configuration
3. Integration and Runtime Aspects
AUTOSAR
Interface
AUTOSAR
Interface
AUTOSAR
Interface ➢ Each CP Software Cluster is separately
Runtime Env ironment
buildable
Services CDDs
Component Component
Application
Software
Application
Software
Component
Application
Software
AUTOSAR
Interface
AUTOSAR
Interface
Application
Software
Application
Software
➢ Connections between Software Clusters
Component Component Component Component
AUTOSAR
Interface
AUTOSAR
Interface
AUTOSAR
Interface
Runtime Env ironment AUTOSAR
Interface
AUTOSAR
Interface
are created on basis of Binary Objects
Runtime Env ironment
Software Cluster Connection
Services CDDs
Application Application
Software Software Binary Manifest
controller architectures, e.g. no address
communication
Cross SwCluC
Cross SwCluC
OS NvM Dem Dcm xxx ➢ Abstraction of non-software cluster-local
High High High High High BSW modules and their APIs in the
Proxy Proxy Proxy Proxy Proxy
corresponding proxy modules
Binary Manifest ◼ High Proxies substitute non-local BSW and
provide the according APIs
Host Software Cluster ◼ Lower Proxy modules connect to regular
Binary Manifest
Application Application
communication
Cross SwCluC BSW modules of the Host Software Cluster
Software Software
Component Component
RTE
SwCluC_Xcc
RTE-Plugin
4
SwCluC
➢ Cross Software Cluster Communication
Binary Manifest
(SwCluC_Xcc) implements the communication
pattern and the interface to the RTE
◼ RTE interface: RIPS-Plugin 4
1. Architecture
1. Overview of Software Layers
2. Content of Software Layers
3. Content of Software Layers in Multi-Core Systems
4. Content of Software Layers in Mixed-Critical Systems
5. Overview of Modules
6. Interfaces
1. General
2. Interaction of Layers (Examples)
2. Configuration
3. Integration and Runtime Aspects
1. Pre-compile time
◼ Preprocessor instructions
◼ Code generation (selection or synthetization)
2. Link time
◼ Constant data outside the module; the data can be configured after the module has been
compiled
3. Post-build time
◼ Loadable constant data outside the module. Very similar to [2], but the data is located in a
specific memory segment that allows reloading (e.g. reflashing in ECU production line)
Independent of the configuration class, single or multiple configuration sets can be provided by means
of variation points. In case that multiple configuration sets are provided, the actually used configuration
set is to be chosen at runtime in case the variation points are bound at run-time.
In many cases, the configuration parameters of one module will be of different configuration classes.
Example: a module providing Post-build time configuration parameters will still have some parameters
that are Pre-compile time configurable.
Note: Multiple configuration sets were modeled as a sub class of the Post-build time configuration class
up to AUTOSAR 4.1.x.
Use cases
Pre-compile time configuration would be chosen for
➢ Enabling/disabling optional functionality
This allows to exclude parts of the source code that are not needed
➢ Optimization of performance and code size
Using #defines results in most cases in more efficient code than
access to constants or even access to constants via pointers.
Generated code avoids code and runtime overhead.
Restrictions
➢ The module must be available as source code
➢ The configuration is static and it may consist of one or more
configuration sets identified by means of variation points. To update
any configuration set (e.g. change the value of certain parameters),
the module has to be recompiled.
Nm_Cfg.c Nm_Cfg.h
Required implementation
Pre-compile time configuration shall be done via the module‘s two uses includes
configuration files (*_Cfg.h, *_Cfg.c) and/or by code generation: (optional)
◼ *_Cfg.h stores e.g. macros and/or #defines
Nm.c
◼ *_Cfg.c stores e.g. constants
File Spi_Cfg.c:
const uint8 myconstant = 1U;
Note: The Memory Abstraction (as specified by AUTOSAR) is not used to keep the example simple.
#define DemConf_DemEventParameter_FLS_E_ERASE_FAILED_0 1U
Example for a multiple
#define DemConf_DemEventParameter_FLS_E_ERASE_FAILED_1 2U
instance driver (e.g. internal
#define DemConf_DemEventParameter_FLS_E_WRITE_FAILED_0 3U
and external flash module)
#define DemConf_DemEventParameter_FLS_E_WRITE_FAILED_1 4U
#define DemConf_DemEventParameter_NVM_E_REQ_FAILED 5U
#define DemConf_DemEventParameter_CANSM_E_BUS_OFF 6U
...
File Dem.h:
#include "Dem_Cfg.h" /* for providing access to event symbols */
Dem_SetEventStatus(DemConf_DemEventParameter_NVM_E_REQ_FAILED, DEM_EVENT_STATUS_PASSED);
Use cases
Link time configuration would be chosen for
➢ Configuration of modules that are only available as object code
(e.g. IP protection or warranty reasons)
➢ Creation of configuration after compilation but before linking.
Required implementation
1. One configuration set, no runtime selection
Configuration data shall be captured in external constants. These external constants are
located in a separate file. The module has direct access to these external constants.
2. 2..n configuration sets, runtime selection possible
Configuration data shall be captured within external constant structs. The module gets a
pointer to one of those structs at initialization time. The struct can be selected at each
initialization.
Example 1: Event IDs reported to the Dem by a multiple instantiated module (Flash Driver) only available as object code
XML configuration file of the Flash Driver:
Specifies that it needs the event symbol FLS_E_WRITE_FAILED for production error reporting.
#define DemConf_DemEventParameter_FLS_E_ERASE_FAILED_0 1U
#define DemConf_DemEventParameter_FLS_E_ERASE_FAILED_1 2U
#define DemConf_DemEventParameter_FLS_E_WRITE_FAILED_0 3U
#define DemConf_DemEventParameter_FLS_E_WRITE_FAILED_1 4U
#define DemConf_DemEventParameter_NVM_E_REQ_FAILED 5U
#define DemConf_DemEventParameter_CANSM_E_BUS_OFF 6U
...
File Fls_Lcfg.c:
#include "Dem_Cfg.h" /* for providing access to event symbols */
Dem_SetEventStatus(Fls_WriteFailed[instance], DEM_EVENT_STATUS_FAILED);
Note: the complete include file structure with all forward declarations is not shown here to keep the example simple.
Example 2: Event IDs reported to the Dem by a module (Flash Driver) that is available as object code only
Problem
Dem_EventIdType is also generated depending of the total number of event IDs on this ECU. In this example it is represented
as uint16. The Flash Driver uses this type, but is only available as object code.
Solution
In the contract phase of the ECU development, a bunch of variable types (including Dem_EventIdType) have to be fixed and
distributed for each ECU. The object code suppliers have to use those types for their compilation and deliver the object code
using the correct types.
Use cases
Post-build time configuration would be chosen for
➢ Configuration of data where only the structure is defined but the contents not known during ECU-build time
➢ Configuration of data that is likely to change or has to be adapted after ECU-build time
(e.g. end of line, during test & calibration)
➢ Reusability of ECUs across different car versions (same application, different configuration), e.g. ECU in a low-cost car
version may transmit less signals on the bus than the same ECU in a luxury car version.
Restrictions
➢ Implementation requires storing all possibly relevant configuration items in a flashable area and requires pointer dereferencing
upon config access. Implementation precludes generation of code, which has impact on performance, code and data size.
Required implementation
Example 1
If the configuration data is fix in memory size and position, the module has direct access to these external structs.
Direct access
(via reference as given by
Linker control file the pointer parameter of
PduR’s initialization function)
Required implementation 2: Configuration of CAN Driver that is available as object code only; a configuration set can be
selected out of multiple configuration sets during initialization time.
File Can_PBcfg.c:
#include “Can.h” /* for getting Can_ConfigType */
const Can_ConfigType MySimpleCanConfig [2] =
{
{
Can_BitTiming = 0xDF,
Can_AcceptanceMask1 = 0xFFFFFFFF,
Can_AcceptanceMask2 = 0xFFFFFFFF,
Can_AcceptanceMask3 = 0x00034DFF, Compiler
Can_AcceptanceMask4 = 0x00FF0000
},
{ … }
};
File EcuM.c:
#include “Can.h“ /* for initializing the CAN Driver */
Can_Init(&MySimpleCanConfig[0]); Linker
Different use cases require different kinds of configurability. Therefore the following configuration variants are
provided:
➢ VARIANT-PRE-COMPILE
Only parameters with "Pre-compile time" configuration are allowed in this variant.
➢ VARIANT-LINK-TIME
Only parameters with "Pre-compile time" and "Link time" are allowed in this variant.
➢ VARIANT-POST-BUILD
Parameters with "Pre-compile time", "Link time" and "Post-build time" are allowed in this variant.
To allow the implementation of such different use cases in each BSW module, up to 3 variants can be
specified:
➢ A variant is a dedicated assignment of the configuration parameters of a module to configuration
classes
➢ Within a variant a configuration parameter can be assigned to only ONE configuration class
➢ Within a variant a configuration class for different configuration parameters can be different (e.g. Pre-
Compile for development error detection and post-build for reprogrammable PDU routing tables
➢ It is possible and intended that specific configuration parameters are assigned to the same
configuration class for all variants (e.g. development error detection is in general Pre-compile time
configurable).
132 Document ID 53 : AUTOSAR_EXP_LayeredSoftw areArchitecture
Document ID 53 : 132
R22-11
AUTOSAR_EXP_LayeredSoftwareArchitecture of 193
page id: y000n
Configuration
Memory Layout Example: Post-build configuration
EcuM defines the index: Description where to find what is an overall agreement:
1. EcuM needs to know all addresses including index
0x8000 &index (=0x8000)
2. The modules (xx, yy, zz) need to know their own
0x8000 &xx_configuration = 0x4710
start address: in this case: 0x4710, 0x4720 …
0x8002 &yy_configuration = 0x4720
3. The start addresses might be dynamic i.e. changes
0x8004 &zz_configuration = 0x4730
with new configuration
…
4. When initializing a module (e.g. xx, yy, zz), EcuM
passes the base address of the configuration data (e.g.
Xx defines the modules configuration data: 0x4710, 0x4720, 0x4730) to the module to allow for
0x4710 &the_real_xx_configuration variable sizes of the configuration data.
0x4710 lower = 2
0x4712 upper =7 The module data is agreed locally (in the module) only
0x4714 more_data 1. The module (xx, yy) knows its own start address
… (to enable the implementer to allocate data section)
2. Only the module (xx, yy) knows the internals of
Yy defines the modules configuration data:
its own configuration
0x4720 &the_real_yy_configuration
0x4720 Xx_data1=0815
0x4722 Yy_data2=4711
0x4724 more_data
…
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
VFB-
active parts of
view
SW-C Runnable
Software Components
➢ They can be executed 0..* 0..*
concurrently, by
Implementation/ECU-view
1
mapping them to
different Tasks. Task
➢ The figure shows
further entities like OS- 0..*
applications, Partitions, 1 1
µC-Cores and BSW-
Resources which have 1 1
Partition OS-Application
to be considered for
this mapping. 0..*
1
0..* 1
BSW-Ressource µC-Core
(E.g., NV-block)
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
➢ Protection Hook
◼ Executed on protection violation (memory or timing)
◼ Decides what the action is (Terminate, Restart, Shutdown, Nothing)
◼ Provided by integrator
◼ OS acts on decision by inspecting return value
➢ OsRestartTask
◼ Started by OS in case Protection Hook returns Restart
◼ Provided by integrator
◼ Runs in the OS-Application’s context and initiates necessary cleanup and restart activities, such as:
▪ Stopping communication (ComM)
▪ Updating NvM
▪ Informing Watchdog, CDDs etc.
➢ RTE
◼ Functions for performing cleanup and restart of RTE in OS-Application
◼ Triggers init runnables for restarted OS-Application
◼ Handles communication consistency for restarting/terminated OS-Applications
➢ Operating System
◼ OS-Applications have states (APPLICATION_ACCESSIBLE, APPLICATION_RESTART,
APPLICATION_TERMINATED)
◼ OS provides API to terminate other OS-Applications (for other errors than memory/timing)
sd TerminateRestartPartition
Os-Application
state for the OS ProtectionHook OSRestartTask RTE BSW modules
considered
Partition.
APPLICATION_ACTIVE
ProtectionHook
inform the RTE
APPLICATION_RESTARTING ActivateTask
AllowAccess
APPLICATION_ACTIVE
TerminateTask
➢ Termination
◼ An OS-Application can be terminated directly
◼ Also for termination, some cleanup may be needed, and this shall be performed in the
same way as when restarting an OS-Application
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
◼ the synchronized triggering of both, Runnable Entities and BSW Main Functions by the
same External Trigger Occurred Event.
Centralize the BSW schedule in the BSW Scheduler configured by the ECU/BSW integrator and generated by the RTE
generator together with the RTE
➢ Eases the integration task
➢ Enables applying different scheduling strategies to schedulable objects
◼ Preemptive, non-preemptive, ...
➢ Enables applying different data consistency mechanisms
➢ Enables reducing resources (e.g., minimize the number of tasks)
➢ Enables interlaced execution sequences of Runnable Entities and BSW Main functions
Zzz_MainFunction_Aaa
BSW Events
➢ BswTimingEvent
➢ BswBackgroundEvent
➢ BswModeSwitchEvent
➢ BswModeSwitchedAckEvent
➢ BswInternalTriggerOccuredEvent
Yyy_MainFunction_Aaa
➢ BswExternalTriggerOccuredEvent
➢ BswOperationInvokedEvent
Triggers
➢ Main functions can be triggered in all layers by
Xxx_Isr_Yyy
the listed BSW Events
Transformation
Task1 {
Zzz_MainFunction_Bbb();
Zzz_MainFunction_Bbb(); Yyy_MainFunction_Aaa();
Yyy_MainFunction_Aaa(); glue code
Xxx_MainFunction_Aaa(); Xxx_MainFunction_Aaa();
glue code
...
}
Transformation
Xxx_MainFunction_Bbb();
...
Xxx_MainFunction_Bbb(); }
Yyy_MainFunction_Bbb(); Task3 {
...
Yyy_MainFunction_Bbb();
...
}
Transformation
Xxx_Module
Xxx_MainFunction();
Yyy_ AccessResource();
XYZ resource
?
Yyy_MainFunction();
Yyy_Module
Transformation
Transformation
Transformation
➢ The mode dependent scheduling of BSW Modules is identical to the mode dependent
scheduling of runnables of software components.
➢ A mode manager defines a Provide ModeDeclarationGroupPrototype in its Basic
Software Module Description, and the BSW Scheduler provides an API to communicate mode
switch requests to the BSW Scheduler
➢ A mode user defines a Required ModeDeclarationGroupPrototype in its Basic Software
Module Description. On demand the BSW Scheduler provides an API to read the current
active mode
➢ If the Basic Software Module Description defines Mode Disabling Dependencies, the BSW
Scheduler suppresses the scheduling of BSW Main functions in particular modes.
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
3
2
Modes
➢ Every system contains Modes at
Influence each other
different levels of granularity. As shown
in the figure, there are vehicle modes Application
1
1
2
2
3 1 2
Therefore:
➢ Depending on vehicle modes, applications may be active or inactive and thus be in different
application modes.
➢ Vice versa, the operational state of certain applications may cause vehicle mode changes.
➢ Depending on vehicle and application modes, the BSW modes may change, e.g. the
communication needs of an application may cause a change in the BSW mode of a
communication network.
➢ Vice versa, BSW modes may influence the modes of applications and even the whole
vehicle, e.g. when a communication network is unavailable, applications that depend on it
may change into a limp-home mode.
Mode Mode
Mode Mode Mode
Request Switch
Requester Manager User
Mode
Mode Mode
Switch
Manager User
System Services
➢ The distribution of mode requests is performed by the RTE and the RTE also implements
the handling of mode switches.
➢ E.g. for vehicle modes, a mode request originates from one central mode requestor SW -C
and has to be received by the BswMs in many ECUs. This is an exception of the rule that
SW-Cs may only communicate to local BSW.
➢ BswMs running in different OS-Applications can propagate mode requests by Sender-
Receiver communication (SchMWrite, SchMRead).
Applications
Mode Processing Cycle
Mode requesting Mode using
➢ The mode requester SW-C requests mode
SW-C SW-C
A through its sender port. The RTE
distributes the request and the BswM 3: switch
receives it through its receiver port. 1: request mode A´
mode A
➢ The BswM evaluates its rules and if a
rule triggers, it executes the corresponding
action list. RTE
➢ When executing the action list, the BswM Mode request Local mode
may issue a (configurable optional) RTE distribution handling
call to the mode switch API as a last action
to inform the mode users about the
arbitration result, e.g. the resulting mode A’. BswM
➢ Any SW-C, especially the mode Mode Mode
requester can register to receive the 2: execute Arbitration Control
mode switch indication. associated
action list
Action list
➢ The mode requests can originate from Action 1
Mode arbitration
local and remote ECUs or OS-Applications.
overrides the Action 2
➢ Note that the mode requestor can only request for mode
receive the mode switch indications from …
the local BswM, even if the requests are A with mode A´. RteSwitch(mode A´)
sent out to multiple OS-Applications.
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
Types of errors
Software errors
◼ Root cause: Wrong software or system design, because software itself can never fail.
◼ Example 1: wrong API parameter (EEPROM target address out of range)
◼ Example 2: Using not initialized data
System errors
◼ Example 1: CAN receive buffer overflow
◼ Example 2: time-out for receive messages
Error Classes
➢ Development Errors
Development errors are software errors. They shall be detected like assertions and fixed during
development phase. The detection of errors that shall only occur during development can be switched off
per module for production code (by static configuration namely preprocessor switches). The according API
is specified within AUTOSAR, but the functionality can be chosen/implemented by the developer according
to specific needs.
➢ Runtime Errors
Runtime errors are systematic software errors. They indicate severe exceptions that hinder correct
execution of the code. The monitors may stay in code even for a deployed systems. Synchronous handling
of these errors can be done optionally in integrator code.
➢ Transient Faults
Transient faults occur in hardware e. g. by passage of particles or thermal noise. Synchronous handling of
these faults can be done optionally in integrator code. The detecting module may offer behavioral
alternatives selectable by this integrator code.
There are several alternatives to report an error (detailed on the following slides):
Via API
Inform the caller about success/failure of an operation.
Each application software component (SW-C) can report errors to Diagnostic Event Manager (Dem).
Diagnostic
Log End to End
and Trace Communication
(Dlt) Application Layer (E2E)
Basic Software
Diagnostic Event
Manger (Dem)
and Function
Inhibition
Manager (FiM)
The Diagnostic Event Manager is a standard AUTOSAR module which is always available in production code
and whose functionality is specified within AUTOSAR.
The detection and reporting of development errors to the Default Error Tracer can be statically switched on/off
per module (preprocessor switch or different object code builds of the module) but not for Runtime errors.
API
The Diagnostic Event Manager has the following API:
Dem_SetEventStatus(EventId, EventStatus)
Problem: the error IDs passed with this API have to be ECU wide defined, have to be statically defined and have to occupy a
compact range of values for efficiency reasons. Reason: The Diagnostic Event Manager uses this ID as index for accessing
ROM arrays.
Process:
◼ Each BS odule declares all production code relevant error variables it needs as “extern”
◼ Each BSW Module stores all error variables that it needs in the ECU configuration description (e.g. CANSM_E_BUS_OFF)
◼ The configuration tool of the Diagnostic Event Manager parses the ECU configuration description and generates a single
file with global constant variables that are expected by the SW modules (e.g.
const Dem_EventIdType DemConf_DemEventParameter_CANSM_E_BUS_OFF=7U; or
#define DemConf_DemEventParameter_CANSM_E_BUS_OFF ((Dem_EventIdType)7))
◼ The reaction to the errors is also defined in the Error Manager configuration tool. This configuration is project specific.
API
The Default Error Tracer has the following API for reporting development errors (runtime errors and transient faults use identical
APIs with different names):
Det_ReportError(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId)
InstanceId (uint8)
The Instance ID represents the identifier of an indexed based module starting from 0. If the module is a single instance
module it shall pass 0 as an instance ID.
ApiId (uint8)
The API-IDs are specified within the software specifications of the BSW modules. They can be #defines or constants
defined in the module starting with 0.
ErrorId (uint8)
The Error IDs are specified within the software specifications of the BSW modules. They can be #defines defined in the
module‘s header file.
If there are more errors detected by a particular software module which are not specified within the AUTOSAR module
software specification, they have to be documented in the module documentation.
The module Diagnostic Log and Trace (Dlt) collects log messages and converts them into a
standardized format. The Dlt module forwards the data to the PduR, which sends it to the
configured communications bus.
Therefore the Dlt provides the following functionalities:
➢ Logging
◼ logging of errors, warnings and info messages from AUTOSAR SW-Cs, providing a
standardized AUTOSAR interface,
◼ gathering all log and trace messages from all AUTOSAR SW-Cs in a centralized
AUTOSAR service component (Dlt) in the BSW,
◼ logging of messages from Det and
◼ logging of messages from Dem.
➢ Tracing
◼ of RTE activities
➢ Control
◼ individual log and trace messages can be enabled/disabled and
◼ Log levels can be controlled individually by back channel.
➢ Generic
◼ Dlt is available during development and production phase,
◼ access over standard diagnosis or platform specific test interface is possible and
◼ security mechanisms to prevent misuse in production phase are provided.
CAN / Flexray /
4 Ethernet / Serial
API
The Diagnostic Log and Trace has syntactically the following API:
Dlt_SendLogMessage(Dlt_SessionIDType session_id, Dlt_MessageLogInfoType log_info, uint8
*log_data,
uint16 log_data_length)
log_info contains:
Application ID / Context ID
Application ID is a short name of the SW-C. It identifies the SW-C in the log and trace message. Context ID is a user
defined ID to group log and trace messages produced by a SW-C to distinguish functionality. Each Application ID can
own several Context IDs. Context ID’s are grouped by Application ID’s. Both are composed by four 8 bit ASCII
characters.
Message ID
Messaged ID is the ID to characterize the information, which is transported by the message itself. It can be used for
identifying the source (in source code) of a message and shall be used for characterizing the payload of a message. A
message ID is statically fixed at development or configuration time.
log_data
Contain the log or trace data it self. The content and the structure of this provided buffer is specified by the Dlt
transmission protocol.
Description File
Normally the log_data contains only contents of not fixed variables or information (e.g. no static strings are transmitted).
Additionally a description file shall be provided. Within this file the same information for a log messages associated with t he
Message ID are posted. These are information how to interpret the log_data buffer and what fixed entries belonging to a log
message.
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
RTE
XCP within AUTOSAR provides
the following basic features:
Signals
I-PDU
development purposes AUTOSAR Tp
N-PDU N-PDU
Communication HW Abstraction
Bus Interface(s)
(or Socket Adaptor on ethernet)
L-PDU
Communication Drivers
Bus Driver(s)
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
H1 H2
Microcontroller 2
Microcontroller 1 / ECU 1
/ ECU 2
Receiver 1 Sender 1
Application logic Application logic
9. Consume safe data elements 1. Produce safe data elements
Notes:
➢ For each RTE Write or Read function that transmits safety-related data (like Rte_Write_<p>_<o>()), there is the
corresponding E2E protection wrapper function.
➢ The wrapper function invokes AUTOSAR E2E Library.
➢ The wrapper function is a part of Software Component and is preferably generated.
➢ The wrapper function has the same signature as the corresponding RTE function, just instead of Rte_ there is E2EPW_.
➢ The E2EPW_ function is called by Application logic of SW-Cs, and the wrapper does the protection/checks and calls
internally the RTE function.
➢ For inter-ECU communication, the data elements sent through E2E Protection wrapper are be byte arrays. The byte
arrays are put without any alterations in COM I-PDUs.
NOTE:
➢ The E2E wrapper approach involves technologies that are not subjected to the AUTOSAR
standard and is superseded by the superior E2E transformer approach (which is fully
standardized by AUTOSAR). Hence, new projects (without legacy constraints due to carry-
over parts) shall use the fully standardized E2E transformer approach.
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
RTE RTE
Last rcv
full MAC counter
Monotonic (128 Bit)
FV
counter
FV MAC Monotonic
counter
Truncation sync
MAC
MAC
FV
FV
Authentic Authentic Authentic Authentic
I-PDU I-PDU I-PDU I-PDU
Communication Services
SecOC BSW:
AUTOSAR COM ➢ adds/verifies authentication information
(for/from lower layer)
➢ realizes interface of upper and lower
layer modules
➢ is addressed by PduR routing
configuration
PDU Router SecOC ➢ maintains buffers to store and modify
Routing Table BSW secured I-PDUs
SecOC
PDUR (Secure Onboard
Com munication)
FrIf CanIf
Secured I-PDU
Authentication
Authentic I-PDU Inf ormation
PDU-Routing
SW-C Key & Counter Management SW-C
Cryptographic
Services
RTE
Key & Counter
Management
Communication Services Crypto Services System Services Services
TP
FrTp CanTp
FrIf CanIf
RTE
Communication Services Crypto Services System Services Memory
Services
Com. Manager
Diagnostic Log
Generic NM
Large Data
Diagnostic
AUTOSAR
and Trace
Interface
COM
COM
IPDU Multiplexer
Manager
Communication
PDU Router
Socket Adaptor
TCP/IP Communication Services
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
The goal of efficient energy management in AUTOSAR is to provide mechanisms for power
saving, especially while bus communication is active (e.g. charging or clamp 15 active).
AUTOSAR R3.2 and R4.0.3 support only Partial Networking.
Partial Networking
➢ Allows for turning off network communication across multiple ECUs in case their provided
functions are not required under certain conditions. Other ECUs can continue to
communicate on the same bus channel.
➢ Uses NM messages to communicate the request/release information of a partial network
cluster between the participating ECUs.
ECU Degradation
➢ Allows to switch of peripherals.
Initial situation:
➢ ECUs “A” and “B” are members of Partial Network Cluster (PNC) 1.
1
➢ A significant part of energy management is about mode handling. For the terms
◼ Vehicle Mode,
◼ Application Mode and
◼ Basic Software Mode
see chapter 3.4 of this document.
➢ Virtual Function Cluster (VFC): groups the communication on port level between SW -
components that are required to realize one or more vehicle functions.
This is the logical view and allows for a reusable bus/ECU independent design.
➢ VFC-Controller: Special SW-component that decides if the functions of a VFC are required at
a given time and requests or releases communication accordingly.
➢ Partial Network Cluster (PNC): is a group of system signals necessary to support one or
more vehicle functions that are distributed across multiple ECUs in the vehicle network.
This represents the system view of mapping a group of buses to one ore more VFCs.
* All nodes connected to the slave buses are always activated. It is not possible only to activate a subset of the nodes.
SW-C
SW-C SW-C SW-Component of VFC1
4 6
2
SW-C SW-Component of VFC2
1 SW-C
5
SW-C SW-C SW-Component of VFC3
3 7
CompositionType Communication Port
System Services
Communication Services ComM_UserRequest
BswM ComM
PNC states
Network
I-PDU GroupSwitch
PNC request/release Request Request
information ComMode
• Exchange PNC request / release COM NmIf
information between NM and
ComM via NM user data
• Enable / disable I-PDU-groups
Trigger Transmit
PduR CanNm CanSM
Mode
RTE
request
OS BswM
Control core HALT
Adc Pwm
➢ ECU Degradation is currently supported only on MCAL drivers Pwm and Adc.
➢ Core HALT and ECU sleep are considered mutually exclusive modes.
➢ Clock modifications as a means of reducing power consumption are not in the scope of the
concept (but still remain available as specific MCU driver configurations).
1. Architecture
2. Configuration
3. Integration and Runtime Aspects
1. Mapping of Runnables
2. Partitioning
3. Scheduling
4. Mode Management
5. Error Handling, Reporting and Diagnostic
6. Measurement and Calibration
7. Functional Safety
8. Security
9. Energy Management
10. Global Time Synchronization
Global Time Synchronization provides synchronized time base(s) over multiple in-vehicle
networks.
RTE
StbM provides the following features:
➢ Time provision
Signals
➢ Time base status
➢ Time gateway
Sychronized Timebase Manager IPDU Diagnostic
Multi- AUTOSAR Communi-
plexer COM cation
CanTSyn / FrTSyn / EthTSyn provides Manager
I-PDU
NM
Datagram
CanTSyn FrTSyn EthTSyn AUTOSAR Module
Tp
GeneralPurpose- GeneralPurpose- N-PDU N-PDU
Use-case examples: PDU PDU
Communication HW Abstraction
➢ Sensor data fusion
CanIf FrIf EthIf
➢ Cross-ECU logging
L-PDU
Communication Drivers
Can Fr Eth GPT
Driver Driver Driver Driver
Secure Global Time Synchronization ensures integrity and authenticity of synchronized time
base(s) over in-vehicle networks.
Application Layer Application Layer
Master Slave
KeyM KeyM
COM COM
services Crypto Crypto services
services services
Synchronized Time- Synchronized Time-
Crypto Crypto
base Manager base Manager
Service Service
Manager Manager
Authentic
Authentic global time FV ICV
global time FV
EthTSyn EthTSyn
OK
FrTSyn ICV NOK FrTSyn
CanTSyn CanTSyn
Truncated Truncated
ICV
ICV
FV
FV
Authentic Authentic
global time global time