Ethernet Basic Software – What’s next? 8. Vector Congress – Nov. 30th 2016
V0.1 | 2016-09-05
Introduction – Automotive Ethernet
The dissemination of Automotive Ethernet increases 400% 350% 300% 250%
Ethernet: Growth rate (Basis: orders 2013 = 100%)
200% 150% 100% 50% 0%
>
2
2009
2010
2011
2012
2013
2014
2015
The use cases evolve High-speed diagnostic access (DoIP) Smart Charging (V2G) In-Vehicle Ethernet >
2008
Stream data (AVB, RTP, etc.) Control data (SOME/IP, Multi-PDU)
What’s next? Reliable control data with Time-Sensitive Networking Automotive Ethernet in POSIX-based systems Dynamic use of service-oriented communication
2016
3
1
Time-Sensitive Networking (TSN)
2
Automotive Ethernet in POSIX-Based Systems
3
Service-Oriented Communication
Time-Sensitive Networking
Motivation
Traffic convergence must be handled Control data Streaming data
ECU
ECU
Diverging transmission behavior & requirements Complex topology Independent, full-duplex links Several hops within one cluster Frame duplication (multi- and broadcast) Congestion at egress ports Complex timing & load analysis compared to CAN
4
Switch
µC
ECU
ECU
Switch
µC
ECU
ECU
ECU
Time-Sensitive Networking
Motivation
Traffic convergence must be handled Control data Streaming data
ECU
ECU
ECU
ECU
ECU
Switch
ECU
Diverging transmission behavior & requirements
µC
Complex topology Independent, full-duplex links Several hops within one cluster Frame duplication (multi- and broadcast) Congestion at egress ports Complex timing & load analysis compared to CAN
5
TSN provides mechanisms to target this: Some of which focus on the egress port and are based on existing standards (e.g. VLAN, QoS).
Prio 0
Shaper
Prio 1
Shaper
Prio 6 Prio 7
…
Scheduler
Switch
µC
ECU
Link
Time-Sensitive Networking
The Predecessor - Audio Video Bridging (AVB)
What are AVB’s main components? Credit based traffic shaper (FQTSS) Time synchronization (gPTP) Stream reservation (SRP) Transport Protocol (AVTP) What can be done with AVB? Provide latency guarantees Provide bandwidth guarantees Synchronize nodes and data
reduce bursts Prio 0
FQTSS
Prio 1
Link
without shaping with shaping t
correlate inputs
concert outputs
Src Src
Dst Ctrl
Src
Ctrl
Dst Dst
t 6
Sched.
What is AVB? A set of IEEE standards Provided by the AVB task group Predecessor of TSN (until Nov. 2012) A toolbox
t
Time-Sensitive Networking
Time Sensitive Networking (TSN)
7
What are TSN’s main components? Time-aware shaper (TDMA) latency Frame preemption Ingress policing Fault tolerant clocks reliability Redundant communication What can be done with TSN? Achieve stricter timing requirements Increase reliability through redundancy
Prio 0 Prio 1
T A S *
FQTSS
Prio 2
Sched
What is TSN? Extension of the AVB toolbox AVB focus: Streaming with real time guarantees TSN focus: Reliable control data with hard real time guarantees Is partly still under discussion
Link
t
scheduled time slots
t
guard band
t
t
t
*TAS – Time-aware shaper
Time-Sensitive Networking
Impact on Basic-Software
Which Basic-Software modules are impacted by AVB and TSN
Standard Stack
The standard Ethernet stack is mostly unaffected AVB/TSN is designed for interoperability AVB/TSN protocols have dedicated EtherTypes
AVB/TSN Protocols
AV Transport Protocol
The AVTP protocol is lower layer to media applications It supports media synchronization mechanisms, e.g. presentation time
There is a set of other protocols in the AVB/TSN world They are mostly for dynamically setting up the network
8
The hardware-related parts are most affected
Switch + Switch Driver
MAC + Ethernet Driver
AVB/TSN-related features
QoS
FQTSS shaper
Time-aware shaper
Hardware timestamping
Ingress policing
gPTP provides time synchronization It benefits from hardware timestamping
µController
Hardware Related Modules
gPTP
UDP
TCP IP
AvTp
AVB/TSN Protocols
Switch Driver
Ethernet Driver
SPI
Ethernet Controller (MAC)
Switch
gPTP
9
1
Time-Sensitive Networking (TSN)
2
Automotive Ethernet in POSIX-Based Systems
3
Service-Oriented Communication
Automotive Ethernet in POSIX-based Systems
Motivation
POSIX-based operating systems, especially Linux, provide: Support for high performance CPUs Support for dynamic programming and configuration Rich set of existing features (connectivity, infotainment, image recognition, …) POSIX-based systems are on the advance
But automotive ECUs require automotive-specific features Configuration Diagnostics Network Management Communication These are not included in the standard feature set of a POSIX-based system
10
This is also true for Automotive Ethernet!
Automotive Ethernet in POSIX-based Systems
What automotive-specific Ethernet functions are there? Ethernet Driver
It should support the required hardware-related features It runs in kernel-mode, extending it is difficult
Switch Driver
Is specific to typical automotive switches Can be added as separate user mode component
Network Management (UdpNm)
Allows ECU is to participate in network management May include partial networking
Service-oriented Middleware (SOME/IP)
Data serialization Service discovery
Standard Modules (ARP, IP, TCP, UDP, etc.)
Automotive Ethernet Stack
Standard components can typically be used Configuration parameters may differ (e.g. timeout times)
SOME/IP
AVB/TSN Modules (AvTp, SRP, BMCA, etc.)
UdpNm SoAd
Specific, but not automotive-specific Can be added as user-mode modules (if hardware-related features are provided)
TCP
UDP IP
Socket Adapter (SoAd)
Is not per se necessary Multi-PDU feature is most-likely needed
Diagnostics over IP (DoIP) 11
Required if ECU is directly accessible via tester
DoIP
AVB/TSN Modules
Switch Driver
Ethernet Driver
SPI
Ethernet Controller (MAC)
Kernel-Mode Modules
User-Mode Modules
Automotive Ethernet in POSIX-based Systems
Steps towards a native POSIX implementation AUTOSAR as a Guest
AUTOSAR as a Companion MCU 1
MCU 2
POSIX
AUTOSAR
MCU
Segregation
IPC
IPC
POSIX
AUTOSAR
IPC
IPC Shared Memory
Hypervisor
SPI/USB/ETH ECU Native POSIX Implementation
Application
vs.
ECU AUTOSAR as a Process
MCUc
MCU
POSIX
POSIX
Integration
Application
Application
AUTOSAR
IPC
IPC Shared Memory
Automotive Middleware
Operating System ECU
12
ECU
13
1
Time-Sensitive Networking (TSN)
2
Automotive Ethernet in POSIX-Based Systems
3
Service-Oriented Communication
Service-Oriented Communication
Motivation
Goals of a Service-Oriented Architecture (SOA) Loosen the coupling between interacting devices while maintaining their interoperability. Reduce broadcasting (compared to CAN or FlexRay)
Components of a SOA
14
Service Discovery
Offering, finding and subscribing to services
Addressing
Addressing of clients, servers and services
Service Description
Describing the capabilities of devices and how to use them
Method Invocation
Invoking methods on the server
Events
Subscribe for automatic change notifications
Ressources on most ECUs are highly limited
SOME/IP is statically used today Services are predefined Service description is shared via a design-time exchange format (e.g. .arxml) Service usage, however, is dynamic
Service-Oriented Communication
Dynamic use of service-oriented communication
Upcoming E/E-Architectures provide more ressources (POSIX-based ECUs)
Are there automotive use cases that require a dynamic service-oriented architecture? Reducing change impact
Cloud
High Performance ECU Client
Client
Client
Service-Oriented Communication S2S* Gateway PDU
15
Adding new Services via Cloud or OTA update
dbc
Server
High Performance ECU Client
Server
Service-Oriented Communication Server
Client
Server
CAN/LIN/FlexRay/Eth
Additional challenges System behavior becomes less deterministic Testability is reduced Potential surface area for attacks
driver
*S2S – Signal-to-Service
For more information about Vector and our products please visit www.vector.com
Author: Zimmer, Bastian Vector Germany
16
© 2016. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.1 | 2016-09-05