12 Architecture & Methodology EN
12 Architecture & Methodology EN
Chapter overview
Architecture:
• Introduce the Layered Software Architecture and Basic software (BSW) Modules
Methodology
▪ Introduction to the AUTOSAR Configuration Concept
▪ Understand the Difference between System- and ECU-Configuration
▪ Understand the Complete Chain from System Description to Executable
In cooperation with
Architecture and Methodology - Layered Software Architecture
Application Layer
Runtime Environment
Services Layer
Complex
ECU Abstraction Layer Drivers
Microcontroller
• The Microcontroller Abstraction Layer is the lowest software layer of the Basic Software. It
contains internal drivers, which are software modules with direct access to the µC internal
peripherals and memory mapped µC external devices.
▪ Task:
– Make higher software layers independent of µC
▪ Properties:
– Implementation: µC dependent
– Upper Interface: Standardized and µC independent
▪ Task:
– Make higher software layers independent of ECU hardware layout, e.g. bus
types, memory devices
▪ Properties:
– Implementation: μC independent, ECU hardware dependent
– Upper Interface: μC and ECU hardware independent, dependent on signal type
Onboard Device Memory Crypto Hardware Wireless Communication
Abstraction Hardware Abstraction Communication Hardware
• ECU abstraction layer functional groups: Abstraction HW Abstraction Abstraction
Complex Drivers
▪ The Complex Drivers Layer spans from the hardware to the RTE.
▪ Task
▪ Provide the possibility to integrate special purpose functionality, e.g. drivers for devices:
▪ which are not specified within AUTOSAR,
▪ with very high timing constrains or
▪ for migration purposes etc.
▪ Properties:
– Implementation: might be application, µC and ECU hardware dependent
– Upper Interface: ECU specific modeling of AUTOSAR interface description
Task:
• Represent I/O signals as they are connected to the ECU hardware (e.g. current,
voltage, frequency).
• Hide ECU hardware and layout properties from higher software layers.
Properties:
• Implementation: µC independent, ECU hardware dependent
• Upper Interface: µC and ECU hardware independent, dependent on signal type
specified and implemented according to AUTOSAR (AUTOSAR interface)
RTE
SIGNAL
INTERFACE
ADC BOARD
HANDLER
SPI
CH0
HANDLER
CH1
CH2
SPI DRV T
CH3 Air temperature = 302 K
SPI (Physical value)
CH5
V V
Services Layer
• The Service Layer is the highest layer of the Basic Software
• While access to I/O signals is covered by the ECU Abstraction Layer, the Services
Layer offers:
– Operating system functionality
– Vehicle network communication and management services
– Memory services (NVRAM management)
– Diagnostic Services (including UDS communication, error memory and fault treatment)
– ECU state management, mode management
– Logical and temporal program flow monitoring (Wdg manager)
▪ Task:
– Provide basic services for application, RTE and basic software modules.
▪ Properties:
– Implementation: Mostly μC, ECU hardware independent (Exception: Os)
– Upper Interface: μC and ECU hardware independent
▪ 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
Application Layer
• The Application Layer is a layer consisting of the application software:
– AUTOSAR Software Components and/or
– AUTOSAR Sensor/Actuator components).
• Above the RTE the software architecture style changes from “layered“ to
“component style“. The AUTOSAR Software Components communicate with
other components (inter and/or intra ECU) and/or services via the RTE.
▪ Task:
– Implement applications (runnables) that are executed by the RTE
▪ Properties:
– Applications completely ECU independent.
– Sensor/Actuator SW-Cs are dependent on the specifics of a sensor or
actuator.
In cooperation with
Architecture & Methodology - Methodology
Application
Interfaces Virtual Functional Bus
Methodology
ECU I ECU II ECU m
Application
System
Definition of ECU
ECU AUTOSAR Application (SWC)
SWC-D • Model Application Behaviour
• Define ports and data types
.arxml • Create SWC Description
• Export SWC Description
• Generate application code
BSW
AUTOSAR Configuration of
BSW- ECU Basic Software
Config
.epc,
.xdm
Configuration
SYSTEM LEVEL ECU LEVEL (FOR EACH ECU)
CONFIGURE
CONFIGURE ECU
SYSTEM
GENERATE
EXTRACT RTE
ECU EXTRACT
ECU-SPECIFIC
SYSTEM OF SYSTEM
INFORMATION
CONFIGURATION CONFIGURATION
INPUT
.h / .c
ECU
CONFIGURATION GENERATE BSW 1
SYSTEM DESCRIPTION
CONFIGURATION
DESCRIPTION
.h / .c
…
GENERATE BSW m
.h / .c
System Description
Map SW-Cs to ECUs
Defines SW-Cs
Defines ECUs
Defines Topology
A1 A2 A3 E2
E1
A4
A13 A14
A5 E3
E8
E7
A12 A8 A6
A9
E4
A11 A7 E6 E5
A10
Example: Topology
E1 E3 E4
CAN2
E2 E5 E8
CAN1
E6
LIN
E7
A13
A16 A14 A12 A11 A9 A7
E1 E2 E3 E4
A4
A2 A10 A15
A3 A8 A1 A4 A9 A5 A6
E5 E6 E7 E8
A13
A16 A14 A12 A11 A9 A7
E1 E2 E3 E4
A4
A2 A10 A15
A3 A8 A1 A4 A9 A5 A6
E5 E6 E7 E8
A4
A10 A15
A4 A9 A5
E7
Defines SW-Cs
Defines ECUs
Defines Topology
Defines SW-Cs
Defines ECUs
Defines Topology
Defines SW-Cs
Defines ECUs
Defines Topology
Generated code
CanIf.h CanIf.c
C-R1 S-P1
S-P2 S-P2
…
…
RTE
GENERATOR
In cooperation with
Architecture & Methodology - Migration & Integration Strategies
RTE
PROPRIETARY SOFTWARE
MICROCONTROLLER
AUTOSAR conformant bus behaviour
RTE
Ex.1: DIAGNOSTICS
Ex.3: CAN
DCM
DEM
FIM
CanIf CAN TP
PROPRIETARY SOFTWARE
CAN SM
CAN DRV
Ex.2: COM SERVICES
CANNM
COM
PDUR
MICROCONTROLLER
AUTOSAR conformant bus behaviour
RTE
Configuration Files
• Pre-compile time configuration
• Preprocessor instructions
Module.c Module_Cfg.h Module.h
• Link-time configuration
• Constant data outside the module
Module_Lcfg.c Module_Lcfg.h
Module_PBcfg.c Module_PBcfg.h
Note! The configuration parameters in one module could belong to different configuration
classes.
Summary
Architecture
• Introduce the Layered Software Architecture and Basic software (BSW) Modules
Methodology
▪ Understand the Difference between System- and ECU-Configuration
▪ Understand the Complete Chain from System Description to Executable
[email protected]
www.elektrobit.com