Autosar
Autosar
Autosar
AUTOSAR Consortium
AUTOSAR
What is AUTOSAR?
AUTOSAR AUTomotive Open Systems ARchitecture
Middleware and system-level standard, jointly developed by
automobile manufacturers, electronics and software suppliers
and tool vendors.
More than 100 members
Motto: cooperate on standards, compete on implementations
Reality: current struggle between OEM and Tier1 suppliers
Target: facilitate portability, composability, integration of SW
components over the lifetime of the vehicle
Level of decomposition
Low degree of decomposition of the functional domain
High degree of decomposition of the functional domain
Terminology
Standardized data-types
Partial description of interfaces (without semantics)
Complete description of interfaces (without semantics)
Complete description of interfaces (with semantics)
Partial definition of the functional domain
Complete definition of the functional domain
Functional domains
The specification of functional interfaces is divided into 6
domains:
Body/Comfort
Powertrain
Chassis
Safety
Multimedia/Telematics
Man-machine-interface
AUTOSAR Architecture
SW-C
Description
SW-C
Description
SW-C
Description
SW-C
Description
AUTOSAR
SW-C n
AUTOSAR
SW-C 3
AUTOSAR
SW-C 2
AUTOSAR
SW-C 1
ECU
Descriptions
System
Constraint
Description
Deployment tools
ECU1
ECU1
ECU1
AUTOSAR
SW-C n
AUTOSAR
SW-C 3
AUTOSAR
SW-C 2
AUTOSAR
SW-C 1
RTE
RTE
RTE
Basic Software
Basic Software
Basic Software
Gateway
AUTOSAR Architecture
AUTOSAR SWSW-C
The AUTOSAR Software Components encapsulate an
application which runs on the AUTOSAR infrastructure. The
AUTOSAR SW-C have well-defined interfaces, which are
described and standardized.
SWSW-C Description
For the interfaces as well as other aspects needed for the integration of
the AUTOSAR Software Components, AUTOSAR provides a standard
description format (SW-C Description).
SW-C Description
AUTOSAR
SW-C 1
AUTOSAR Architecture
Virtual Functional Bus (VFB)
The VFB is the sum of all communication mechanisms (and
interfaces to the basic software) provided by AUTOSAR on an
abstract (technology independent) level. When the connections
for a concrete system are defined, the VFB allows a virtual
integration in an early development phase.
SW-C
Description
SW-C
Description
SW-C
Description
AUTOSAR
SW-C n
AUTOSAR
SW-C 3
AUTOSAR
SW-C 2
AUTOSAR
SW-C 1
SW-C
Description
AUTOSAR Architecture
System Constraint and ECU Descriptions
In order to integrate AUTOSAR SW-Components into a
network of ECUs, AUTOSAR provides description formats for
the system as well as for the resources and the configuration of
the ECUs.
ECU
Descriptions
Deployment tools
System
Constraint
Description
ECU1
AUTOSAR
SW-C 3
AUTOSAR
SW-C 2
RTE
Basic Software
AUTOSAR Architecture
Basic Software
The Basic Software provides the infrastructure for execution
on an ECU.
ECU1
AUTOSAR
SW-C 3
AUTOSAR
SW-C 2
RTE
Basic Software
AUTOSAR Architecture
A fundamental concept of AUTOSAR is the separation between:
application and
infrastructure.
An application in AUTOSAR consists of Software Components
interconnected by connectors
AUTOSAR Component
The generic AUTOSAR Component
Component concept
AUTOSAR Software Component
Sensor/Actuator Software Component (special case).
Composition
ECU Abstraction
Complex Device Driver
AUTOSAR Services.
AUTOSAR Component
Each AUTOSAR Software Component encapsulates part of
the functionality of the application.
AUTOSAR does not prescribe the granularity of Software
Components. Depending on the requirements of the application
domain an AUTOSAR Software Component might be a small,
reusable piece of functionality (such as a filter) or a larger block
encapsulating an entire sybsystem.
AUTOSAR Components
Implementing an AUTOSAR Software Component
AUTOSAR does not prescribe HOW an AUTOSAR
Software Component should be implemented
a component may be handwritten or generated from a model
AUTOSAR Components
Shipping an AUTOSAR Software Component
A shipment of an AUTOSAR Software Component consists
of
a
complete
and
formal
Software
Component
Description which specifies
how the infrastructure must be
configured for the component,
and
an implementation of the
component, which could be
provided as "object code" or
"source code".
Software
Component
Description
Component
Implementation
Software
Component
Description
AUTOSAR Components
A source code component implementation is independent
from
the type of microcontroller of the ECU and the
type of ECU on which the component is
mapped
The AUTOSAR infrastructure takes
providing the software component
standardized view on the ECU hardware
care
with
of
a
Component
Implementation
AUTOSAR Components
Description of components on
RTE level: The middle level allows
for behavior description of a given
component. This behavior is
expressed through RTE concepts,
e.g. RTE events and in terms of
schedulable units. For instance,
for an operation defined in an
interface on the VFB, the behavior
specifies which of those units is
activated as a consequence of the
invocation of that operation.
Runnables
Events
Interaction with the Run
Time Environment
AUTOSAR Components
Descriptions of components on
implementation level: The lowest
(most concrete) level of
description specifies the
implementation of a given
behavior. More precisely, the
schedulable units of such a
behavior are mapped to code.
The two layers above constrain
the RTE API that a component is
offered, the implementation now
utilizes this API.
Component
implementation
Resource consumption of
SW-Components
Component-oriented design
What is a SW component?
A reusable self-contained artefact implementing a function with
given properties
Resource and
non-functional
requirements
SW Component
Structure
Behavior
Component-oriented design
Component structure
Key concepts: information hiding and encapsulation
SW
Component
Resource
and nonfunctional
requirements
Data
Dataports
ports
SW Component
Method
signature(s)
As in OO (C++)
Method
signature(s)
Asynchronous,
no
transfer
What
Asynchronous,
notype/style?
transferof
ofcontrol
control
Synchronous
call,
of
port_out
double
GetRotSpeed
Synchronous
call,transfer
transfer
ofcontrol
control
Classes
port_out
double
GetRotSpeed
double
GetRotSpeed(int
wheel_index)
double
GetRotSpeed(int
wheel_index)
port_in
port_in int
int wheel_index)
wheel_index)
Provided interface
Structure
Behavior
SW Component
Required interface
SW Component
Component-oriented design
Component structure
Key concepts: information hiding and encapsulation
SW
Component
Structure
Resource
and nonfunctional
requirements
SW Component
Method
Methodsignature(s)
signature(s)
Synchronous
Synchronouscall,
call,transfer
transferof
ofcontrol
control
double
GetRotSpeed(int
double GetRotSpeed(int wheel_index)
wheel_index)
Behavior
+
Data
Dataports
ports
Asynchronous,
Asynchronous,no
notransfer
transferof
ofcontrol
control
port_out
double
GetRotSpeed
port_out double GetRotSpeed
port_in
port_in int
int wheel_index)
wheel_index)
g(.)
Internal behavior
SW Component
f(.)
synchronous
synchronous
model
model (FSM)
(combinatorial)
SW Component
Component-oriented design
Component structure
Key concepts: information hiding and encapsulation
SW
Component
Structure
Resource
and nonfunctional
requirements
SW Component
Method
Methodsignature(s)
signature(s)
Synchronous
Synchronouscall,
call,transfer
transferof
ofcontrol
control
double
GetRotSpeed(int
double GetRotSpeed(int wheel_index)
wheel_index)
Behavior
PRECONDITIONS
Internal behavior
POSTCONDITIONS
SW
Component
INVARIANTS
design by
program code
contract
SW Component
Component-oriented design
Component structure
Key concepts: information hiding and encapsulation
SW Component
SW
Component
Structure
Resource
and nonfunctional
requirements
Communication
behavior
Behavior
SW Component
SW Component
Component-oriented design
Component structure
Key concepts: information hiding and encapsulation
SW Component
SW
Component
Structure
Resource
and nonfunctional
requirements
Behavior
SW Component
SW Component
AUTOSAR Components
Components dependencies are described in form of interfaces
and ports, no internal, hidden dependencies may exist.
Therefore, components are in theory exchangeable as long as
they implement the same logic and provide the same public
communication interface to the remaining system.
Once a component is defined with the help of the software
component template, a new component type has been defined.
Such a component can be used an arbitrary number of times
within the system as well as in different systems.
Components are developed against the virtual functional bus, an
abstract communication channel without direct dependency on
ECUs and communication busses and they must not directly call
the operating system or the communication hardware.
As a result, they are transferable and can be deployed to ECUs very
late in the development process.
Client-server communication
The server is a provider and the client is a user of a service.
The client initiates the communication, requesting that the server
performs a service, transferring a parameter set if necessary.
The server waits for incoming communication requests from a
client, performs the requested service and dispatches a
response to the clients request.
The direction of initiation is used to categorize whether an
AUTOSAR Software Component is a client or a server. A single
component can be both a client and a server depending on the
software realization.
After the service request is initiated and until the response of the
server is received The client can be
blocked (synchronous communication)
non-blocked (asynchronous communication).
Sender-receiver communication
Model for the asynchronous distribution of information
where a sender distributes information to one or several
receivers.
The sender is not blocked (asynchronous communication)
and neither expects nor gets a response from the receivers
(data or control flow), the sender just provides the
information and the receivers decides autonomously when
and how to use it
It is the responsibility of the communication infrastructure to
distribute the information.
The sender does not know the identity or the number of
receivers
Sender-receiver communication
an example of how sender-receiver communication is
modeled in AUTOSAR
ECU SW Architecture
Application layer
Services layer
Complex Drivers
Communication Drivers
Drivers for ECU onboard (e.g. SPI, I2C) and vehicle
communication (e.g. CAN). OSI-Layer: Part of Data Link
Layer.
Memory Drivers
Drivers for on-chip memory devices (e.g. internal Flash, internal
EEPROM) and memory mapped external memory devices
(e.g. external Flash).
Microcontroller Drivers
Drivers for internal peripherals (e.g. Watchdog, Clock Unit) and
functions with direct C access (e.g. RAM test, Core test).
Services layer
Complex Drivers
Service layer
The service layer consists out of 3 different parts:
Communication Services
Memory Services
System Services
Service layer
Communication Services
The communication services are a group of modules for
vehicle network communication (CAN, LIN, FlexRay and
MOST). They are interfacing with the communication
drivers via the communication hardware abstraction. The
task of this group of modules is
to provide a uniform interface to the vehicle network for
communication between different applications,
to provide uniform services for network management,
to provide a uniform interface to the vehicle network for
diagnostic communication, and
to hide protocol and message properties from the
application.
Service layer
Generic structure
Service layer
An example
(CAN bus):
Service layer
Memory Services
A group of modules responsible for the management of non
volatile data (read/write from different memory drivers). The
NVRAM manager provides a RAM mirror as data interface to the
application for fast read access.
The task of this group of modules is
to provide non volatile data to the application in a uniform way,
to abstract from memory locations and properties, and
to provide mechanisms for non volatile data management like
saving, loading, checksum protection and verification, reliable
storage etc.
Service layer
System Services
The system services are a group of modules and functions which
can be used by modules of all layers.
Examples are real-time operating system, error manager and
library functions (like CRC, interpolation etc.).
Some of these services are C dependent (like OS), ECU
hardware and/or application dependent (like ECU state
manager, DCM) or hardware and C independent.
The task of this group of modules is to provide basic services for
application and Basic Software modules.
Service layer
Structure
Complex Drivers
Complex Drivers
Complex Drivers
The Complex Device Driver is a loosely coupled container,
where specific software implementations can be placed. The
only requirement to the software parts is that the interface to the
AUTOSAR world has to be implemented according to the
AUTOSAR port and interface specifications.
Complex Drivers
Non-Standardized Drivers
Further on the Complex Device Drivers will be used to
implement drivers for hardware which is not supported by
AUTOSAR.
If for example a new communication system will be introduced in
general no AUTOSAR driver will be available controlling the
communication controller. To enable the communication via this
media, the driver will be implemented proprietarily inside the
Complex Device Drivers. In case of a communication request via
that media the communication services will call the Complex
Device Driver instead of the communication hardware
abstraction to communicate.
Another example where non-standard drivers are needed is to
support ASICs that implement a non-standardized functionality.
Complex Drivers
Migration Mechanism
Last but not least the Complex Device Drivers are to some
extend intended as a migration mechanism. Due to the fact that
direct hardware access is possible within the Complex Device
Drivers already existing applications can be defined as Complex
Device Drivers. If interfaces for extensions are defined according
to the AUTOSAR standards new extensions can be implemented
according to the AUTOSAR standards, which will not force the
OEM nor the supplier to reengineer all existing applications.
AUTOSAR Methodology
AUTOSAR requires a common technical approach for some
steps of system development. This approach is called the
AUTOSAR Methodology, which describes all major steps of the
development of a system, from the system-level configuration to
the generation of an ECU executable.
The AUTOSAR Methodology is neither a complete
process description nor a business model and roles and
responsibilities are not defined.
Furthermore, it does not prescribe a precise order in
which activities should be carried out. The methodology
is a mere work-product flow: it defines the dependencies
of activities on work-products.
AUTOSAR Methodology
Design steps go from the system-level configuration to the
generation of an ECU executable.
AUTOSAR Methodology
Design steps go from the system-level configuration to the
generation of an ECU executable.
Firstly,
Firstly,the
theSystem
System Configuration
Configuration Input
Inputmust
mustto
tobe
be
defined.
defined.The
Thesoftware
softwarecomponents
componentsand
andthe
thehardware
hardwareare
are
selected,
selected,and
andthe
theoverall
overallsystem
systemconstraints
constraintsidentified.
identified.
AUTOSAR
AUTOSARprovides
providesaaformat
formatfor
forthe
theformal
formaldescription
descriptionvia
via
the
theinformation
informationexchange
exchangeformat
formatand
andthe
theuse
useofofthe
thefollowing
following
templates.
templates.
Software
SoftwareComponents:
Components:each
eachsoftware
softwarecomponent
component
requires
a
description
of
the
software
API
requires a description of the software APIe.g.
e.g.data
datatypes,
types,
ports,
interfaces.
ports, interfaces.
ECU
ECUResources:
Resources:each
eachECU
ECUrequires
requiresspecifications
specifications
regarding
regardinge.g.
e.g.the
theprocessor
processorunit,
unit,memory,
memory,peripherals,
peripherals,
sensors
sensorsand
andactuators.
actuators.
System
SystemConstraints:
Constraints:regarding
regardingthe
thebus
bussignals,
signals,topology
topology
and
mapping
of
belonging
together
software
components.
and mapping of belonging together software components.
AUTOSAR Methodology
Design steps go from the system-level configuration to the
generation of an ECU executable.
Firstly
Firstlythe
theSystem
System Configuration
Configuration Input
Inputmust
mustto
tobe
be
defined.
defined.The
Thesoftware
softwarecomponents
componentsand
andthe
thehardware
hardwareare
are
selected,
selected,and
andthe
theoverall
overallsystem
systemconstraints
constraintsidentified.
identified.
AUTOSAR
AUTOSARprovides
providesaaformat
formatfor
forthe
theformal
formaldescription
descriptionvia
via
the
theinformation
informationexchange
exchangeformat
formatand
andthe
theuse
useofofthe
thefollowing
following
templates.
templates.
Software
SoftwareComponents:
Components:each
eachsoftware
softwarecomponent
component
requires
a
description
of
the
software
API
requires a description of the software APIe.g.
e.g.data
datatypes,
types,
ports,
interfaces.
ports, interfaces.
ECU
ECUResources:
Resources:each
eachECU
ECUrequires
requiresspecifications
specifications
regarding
regardinge.g.
e.g.the
theprocessor
processorunit,
unit,memory,
memory,peripherals,
peripherals,
sensors
sensorsand
andactuators.
actuators.
System
SystemConstraints:
Constraints:regarding
regardingthe
thebus
bussignals,
signals,topology
topology
and
mapping
of
belonging
together
software
components.
and mapping of belonging together software components.
System Configuration
The System Configuration Input includes or references various
constraints. These constraints can force or forbid certain
components to be mapped to certain ECUs or requires certain
implementations to be used for components.
In addition, these constraints can contain resource estimations
describing the net availability of resources on ECUs and thereby
limiting the possible mappings.
The activity Configure System contains complex algorithms
and/or engineering work. There is a strong need for experience
in system architecture to map all the software components to the
ECUs. The tool AUTOSAR System Configuration Tool supports
the configuration.
An important output of the activity is the design of the System
Communication-Matrix. This System Communication-Matrix
completely describes the frames running on the networks
described in the topology and the contents and timing of those
frames.
The
TheConfigure
ConfigureSystem
Systemactivity
activitymaps
mapsthe
thesoftware
software
components
componentsto
tothe
theECUs
ECUswith
withresources
resourcesand
and
timing
timingrequirements.
requirements.The
Theoutput
outputof
ofthis
thisactivity
activityisis
the
theSystem
System Configuration
Configuration Description
Description
including
includingsystem
systeminformation
information(e.g.
(e.g.bus
busmapping,
mapping,
topology)
topology)and
andthe
themapping
mappingof
ofsoftware
software
components
componentsto
toECUs.
ECUs.
AUTOSAR
More on RTE, component integration and
runnables
Runnable 2a
SW-Component 3
Runnable 2b
Runnable 3a
Runnable 1b
Runnable 2c
Runnable 3b
Runnable 1c
Runnable 1d
Runnable 1a
Runnable 1a
Runnable 1b
Runnable 2a
Runnable 2c
Task 1
Runnable 2b
Runnable 1c
Task 3
Runnable 3a
Runnable 3b
Runnable 2a
Task 4
Task 5
Task 6
Runnable 1d
Task 2
Resource consumption
AUTOSAR SW-Components need to be mapped on ECUs at some
point during the development. The mapping freedom is limited by
the System Constraints and the available resources on each ECU.
The SW-Component description provides information about the
needed resources concerning memory and execution time for each
AtomicSoftwareComponentType. The hardware resources are
going to be used by all software on that ECU, including OS, Basic
SW, RTE, ECU abstraction, CCD, Services.
The resource consumption of the other software on an ECU (OS,
RTE, Basic SW,...) is not covered by the AUTOSAR SWComponent template explicitly although the template might be
used to capture the memory and execution time consumption of a
specific configuration of the Basic SW.
Some of these resources are highly dependent on the configuration
actually mapped on the ECU. So an iterative resource description and
estimation is needed to cover the RTE and Basic SW resource needs.
Resource consumption
Resources can be divided into static and dynamic resources. Static
resources can only be allocated by one entity and stay with this
entity. If the required amount of resources is bigger than the
available resources the mapping does not fit physically. ROM is an
example of a spare resource where obviously only the amount of
data can be stored that is provided by the storage capacity.
Dynamic resources are shared and therefore can be allocated
dynamically to different control threads over time. Processing time
is an example, where different "RunnableEntities" are given the
processor for some time.
If some runnable entity uses more processing time than originally
planned, it can lead to functional failure. Also some sections of
RAM can be seen as dynamic resources (e.g. stack, heap which
grow and shrink dynamically).
Resource consumption
The resource consumption is attached to an Implementation of an
AtomicSoftwareComponentType. For each Implementation, there
can be one ResourceConsumption description.
Resource consumption
All resources are described within the ResourceConsumption
meta-class.
ExecutionTime and StackUsage are used to provide information on
the implementation-specific resource usage of the runnables
defined in the InternalBehavior.
PerInstanceMemorySize provides information regarding the
actual size (in bytes) of the PerInstanceMemory defined in the
InternalBehavior.
ObjectFileSection documents the resources needed to load the
object-file containing the implementation on the ECU.
HeapUsage describes the dynamic memory usage of the
component.
Resource consumption
Relation to the hardware description
In this section the relationships between the description methods of
the ECU Resource template and the SW-Component resource
needs are discussed. Only the memory description and the
processing time description are covered.
Memory
The ECU resource template describes the total available memory
due to the hardware characteristics, not the actual implementation
technology. Therefore memory implementation names like
EEPROM, FLASH or DRAM are not used in the description of an
ECU.
The main criteria distinguishing memory is the volatile - non volatile
category. First the attributes for volatile memory are discussed,
then the additional attributes for non volatile memory will be
introduced.
Resource consumption
Execution time
The description mechanism is defined how actual execution times
for specific hardware can be provided.
The ECU Resource template description document introduces a
different description mechanism which is based on some
benchmarking technology.
The execution time is an ASSERTION: a statement about the
duration of the execution of a piece of code in a given situation.
The execution time is NOT A REQUIREMENT on the softwarecomponent, on the hardware or on the scheduling policy.
Resource consumption
A description of the execution time of a runnable entity of an
implementation of an atomic software-component should include:
the nominal execution time (0.000137 s) or a range of times
a description of the entire context in which the execution-time
measurement or analysis has been made
some indication of the quality of this measurement or estimation
Resource consumption
The execution time can be described for a specific sequence of
assembly instructions. It does not make sense to describe the
execution time of a runnable provided as source-code.
In addition, the execution-time of such a sequence of assembly
instructions depends on:
the hardware-platform
the hardware state
the logical (software) context
execution-time of external pieces of code called from the
runnable
These dependencies are discussed in detail in the following.
Resource consumption
Dependency of the execution time on hardware
The execution-time depends both on the CPU-hardware and on
certain parts of the peripheral hardware:
The execution time depends on a complete description of
the processor, including:
kind of processor (e.g. PPC603)
the internal Processor frequency (100 MHz)
amount of processor cache
configuration of CPU (e.g. power-mode)
Aspects of the periphery that need to be described include:
external bus-speed
Resource consumption
MMU (memory management unit)
configuration of the MMU (data-cache, code-cache, writeback,...)
external cache
memory (kind of RAM, RAM speed)
In addition, when other devices (I/O) are directly accessed as
memory, the speed of those devices has a potentially large
influence.
On top of this, the ECU might provide several ways to store the
code and data that needs to be executed. This might also have a
large influence on the execution time.
For example:
execution of assembly instructions stored in RAM vs.
execution out of ROM may have different execution times
when caching is present, the relative physical location of
data accessed in memory influences the execution time
Resource consumption
Dependency on hardware state
In addition to the static configuration of the hardware and location
of the code and data on this hardware, the dynamically changing
state of the hardware might have a large influence on the
execution time of a piece of code : some examples of this
hardware state are:
which parts of the code are available in the executioncache and what parts will need to be read from external
RAM
what part of the data is stored in data-cache versus must
be fetched from RAM
potentially, the state of the processor pipeline
Despite the potential importance of this initial hardware-state when
caching is present, it is almost impossible and definitely impractical
to describe this hardware state.
Therefore it is important and clear that AUTOSAR does not
provide explicit attributes for this purpose.
Resource consumption
Dependency on logical context
This logical context includes:
the input parameters with which the runnable is called
the logical state of the component to which the runnable
belongs (or more precisely: the contents of all the memory
that is used by the runnable)
While a description of the input-parameters is relatively straightforward to specify, it might be very hard to describe the entire
logical state that the runnable depends on.
In addition, in certain cases, one wants to provide a specific (e.g.
measured or simulated) execution time for a very specific logical
context; whereas in other cases, one wants to describe a worstcase execution time over all valid logical contexts or over a subset
of logical contexts.
Resource consumption
Dependency on external code
Things get very complex when the piece of code whose execution
time is described makes calls into (jumps into) external libraries.
To deal with this problem, we could take one of the following
approaches:
Do not support this case at all
Support a description of the execution time for a very specific version
(again at object-code level) of the libraries. The exact versions would be
described together with the execution time.
Conceptually, it might be possible to explicitly describe the dependency
on the execution-times of the library. This description would include:
the execution time of the code provided by the component itself
a specification of which external library-calls are made
Resource consumption
Description-model for the execution time
The description of the implementation of a component references
the description of the internal behavior of the atomic softwarecomponent that is implemented The description of the internal
behavior describes all the "runnable entities" of the component.
Each description of such a runnable entity (of a specific
implementation) can include an arbitrary number of execution-time
descriptions. Thereby this execution time description may also
depend on code or data variant of the implementation.
It is expected that many runnable entities will not have executiontime descriptions. For runnable-entities that do have executiontime descriptions, the componentimplementor could provide
several execution-time descriptions: for example one per specific
ECU on which the implementation can run and on which the time
was measured or estimated.
Resource consumption
How the execution time is part of the overall description of the
implementation of a component.
Resource consumption