2. Content
Autosar Layered Architecture.
Virtual Function Bus and Run Time Environment.
Virtual Function Bus Vs RTE.
ECU Communication.
3. Autosar Layered Architecture
What is layered architecture ?
An architecture in which data moves from one defined level of processing to another.
E.g. Communication protocols use ISO OSI(Open Systems Interconnection) 7 layer model in computer network. Autosar
ECU software is abstracted and sub divided into basic software, runtime environment and application layer.
4.
5.
6. Virtual Function Bus & Autosar RTE layer
ASW layer consist of SWC’s. RTE implements virtual function Bus Through which swc’s communicate with each other
and also with BSW modules.
The communication can be possible in between SWC’s of same ECU as well as SWCs of other ECUs in a system.
To achieve this functionality ,Virtual Function Bus or VFB , it is implemented in RTE layer of AUTOSAR.
Its called “virtual” because there is no physical connection between SWCs, instead the SWCs of a ECU communicate
with SWCs of other ECUs in a system(vehicle) using low level communication bus like CAN or FlexRay.
Because of this SWC is independent of actual underlying hardware and hence relocate ability of SWCs is possible i.e.
the same SWCs can be used on any ECU with any hardware platform.
7. VFB provides mechanisms for following services which are used by SWCs :
Communication to other SWCs in the system.
Communication with Sensors or actuators in the system.
Providing access to standard services such as reading/ writing to memory.
Responding to mode changes.
Communication with external calibration and measurement instruments.
Each ECU has customized RTE layer which implements the VFB for its respective SWCs.
10. ECU Communication
Communication is between different SWC’s and ECU’s.
Intra-ECU communication is realized virtually by defined function calls in RTE.
Inter-ECU communication is realized by using the underlying communication bus like CAN or FlexRay
through COM Stack along with RTE.
Communication between the SWC’s can be done either by sender-receiver or client server communication.
11. Sender-Receiver Communication
1.Queued S/R communication:
If the sender-receiver communication is configured as queued, then the sent data is processed
using a first-in-first-out (FIFO) queue with a specified length.
2.Non-queued S/R communication:
If the sender-receiver communication is configured as non-queued, then the receiver always has
access to the last sent data.
13. Implicit Communication- Implicit which means the runnable entity works on a local copy of an inter runnable variable.
A copy of read inter runnable variables is created on entry of the runnable. Changes are written back when the
runnable entity completes. This avoids concurrent access to inter runnable variables during runnable entity execution.
Explicit Communication- Explicit which means the runnable entity can directly access an inter runnable variable. Changes
are immediately visible to other runnable entities with explicit access to the inter runnable variable.
14. Client-Server Communication
Client-server communication can be realized by synchronous communication (blocked) or asynchronous
communication(non-blocked).
The client initiates the communication and requests a service from the server
The client could be locked while it is waiting for an answer from the server
The Client/server roles are defined by who is initiating the communication and could be switched
A SWC can at the same time act as both client and server in different communications
15. Communication between Software Components mapped to different ECUs and is therefore concurrent and
involves potentially unreliable communication.
The communication mechanisms for the RTE are provided by the Communication Stack.
Inter ECU Communication via RTE & BSW
• Communication of Software components across ECUs in the network
• RTE will invoke AUTOSAR COM to transmit/receive signals
Inter ECU Communication
16. Communication between Software Components mapped to the same ECU.
Intra ECU Communication via RTE
•Communication among AUTOSAR Software components in the same ECU
•Communication between AUTOSAR Software component and BSW module
Intra ECU Communication
17. Communication between Software Components mapped to different partitions of the same ECU. It involves a context
switch and crossing a protection boundary (memory protection, timing protection, isolation on a core).
The communication mechanisms for the RTE are provided by the IOC. Inter-Core communication is used for multi-core
architectures and is similar to Inter-Partition communication.
Inter Partition Communication via RTE and IOC
•Communication between SWCs present in different partitions of the same core of the same ECU
• Communication between SWCs present in different cores of the same ECU
• RTE will use IOC (Inter O.S-Application Communication)
Inter-Partition ECU Communication
18. References
[1] Introduction to Autosar Lectures By Prof. Venkatesh Mane, available on YouTube
[2] Autosar official documentation, https://www.autosar.org/
[3] AUTOSAR Runtime Environment and Virtual Function Bus By Nico Naumann ,Department for
System Analysis and Modeling Hasso-Plattner Institute for IT-Systems Engineering ,Prof.-Dr.-
Helmert-Str. 2-3, D-14482 Potsdam
[4] AUTOSAR Handbook KPIT Technologies Ltd.
[5] https://automotivetechis.wordpress.com/autosar-concepts/
[6] https://autosartutorials.com/autosar-basics/
[7] https://www.rfwireless-world.com/Tutorials/AUTOSAR-tutorial.html
[8] https://sandeeptiwari.com/basics-of-autosar/
[9] https://www.embitel.com/product-engineering-2/automotive/autosar/
[10] https://www.einfochips.com/blog/autosar-in-automotive-industry/
Editor's Notes
What is layered architecture ?
An architecture in which data moves from one defined level of processing to another.
E.g. Communication protocols use ISO OSI(Open Systems Interconnection) model in computer network.
Autosar ECU software is abstracted and sub divided into basic software, runtime environment and application layer.
Application Layer: This layer has the application code which resides in top. It can have different application blocks called as Software Components(SWCs) for each feature which the ECU needs to support according to application. For example, the functions like power window and temperature measurement will have separate SWC. This is not a norm, but it depends on the Designer.
AUTOSAR RTE: This is one of the important layers of AUTOSAR, it provides communication between different SWCs and also between ECUs. Application layer uses this layer while communicating with other layers below using ports. For more information on RTE, I request you to read this article.
Services Layer: This layer provides different services for application to use. Services like: System Services, Memory Services, Crypto Services, Off board communication services, Communication services.
ECU Abstraction Layer: This layer provides ECU related abstractions. It contains different abstracted layers like I/O Hardware Abstraction layer, On board device abstraction, Memory hardware Abstraction, Crypto hardware abstraction, etc. to make applications hardware independent.
MCAL: This is Micro Controller Abstraction Layer it has drivers using which the above layers communicate with Micro controller hardware peripherals.
RTE:
ASW layer consist of SWCs
RTE implements virtual function Bus Through which swc’s communicate with each other and also with BSW modules.
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 standardize-able (operating system, timers, error memory) and ECU specific (ECU state management, watchdog manager) services and library functions
Virtual function Bus:
AUTOSAR is based on layered architecture in which SWCs laying in application layer communicate with each other.
The communication can be possible not only in same ECU but also SWCs of other ECUs in a system (vehicle).
The communication mechanism to achieve this functionality is basically called as Virtual Function Bus or VFB in short, it is implemented in RTE layer of AUTOSAR.
Its called “virtual” because there is no physical connection between SWCs, instead the SWCs of a ECU communicate with SWCs of other ECUs in a system(vehicle) using low level communication bus like CAN or FlexRay.
AUTOSAR handles all the low level matters to let the ECUs talk with each other as if there is a virtual link between them.
Because of this SWC is independent of actual underlying hardware and hence relocate ability of SWCs is possible i.e. the same SWCs can be used on any ECU with any hardware platform.
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 client’s 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)
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.