REAL-TIME SYSTEMS ENGINEERING @ BOSCH · 2019. 7. 24. · IT software technology is entering...
Transcript of REAL-TIME SYSTEMS ENGINEERING @ BOSCH · 2019. 7. 24. · IT software technology is entering...
REAL-TIME SYSTEMS ENGINEERING @ BOSCHFROM RESEARCH TO INDUSTRY AND BACK
THOMAS KROPFPRESIDENT CORPORATE RESEARCH & ADVANCE DEVELOPMENT
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Bosch Product PortfolioReal-Time Systems Engineering @ Bosch
2
Bosch is a leading provider of Real-Time Cyber Physical Systems
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Bosch’s World-wide R&D PresenceReal-Time Systems Engineering @ Bosch
3
Bosch is one of the leading technology companies
Bosch
Research and development
Corporate Research & BCAI
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Ultra Short Pulse Laser
Real-Time Systems Engineering @ BoschBosch Corporate Research
America 130 associates
Europe 1,530 associates
Asia-Pacific 115 associates
4
Research that matters !
eBike System DesignSmart Spraying
Automatic Emergency Brake Trustworthy Computing
III
Master Electrification by
Virtual Product Engineering
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Modelling vs. RealityReal-Time Systems Engineering @ Bosch
5
Models are indispensable for increasing design
efficiency (front loading)
“All models are wrong, but some are useful”
(George Box, 1976)
A “useful model” for classical µC-based products
such as engine management and ABS:
WCET with Rate-Monotonic Scheduling
Why? Because it is “close enough” !
HW platform simple enough to derive tight WCET
Execution times rather static with cyclic triggering
Sporadic workloads can be approximated
It depends on the engineering task if a model is useful
Liu & Layland, Scheduling Algorithms for Multiprogramming
in a Hard-Real-Time Environment, 1973
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Real-Time Systems Engineering @ BoschIncreasing Complexity of ECU Hardware
6
Lo
ca
l
RA
M
Core1
Crossbar
Global RAM
e.g. memory contention
negligible memory contention
Recent years: Automotive has moved from single-
core µCs to multi-core µCs
Already big pain / effort due to real-time issues
Real-time theory was of big help startups out of
community helped industry with tooling
Mastering multi-core was the challenge of the past years
Lo
ca
l
RA
M
Core1
Crossbar
Global RAM
Lo
ca
l
RA
M
Core2
Single-Core µC
to Multi-Core µC
limited memory contention
Increasing demand of computing power
Mastering the heterogeneous system era is the new challenge
Now: Automotive is moving from multi-core µC to
multi-core µP with accelerators
Shift from multi-core era to heterogeneous era
New HW mechanisms with severe impact on timing
Will real-time theory again be of big help?
Interconnect (e.g. NoC)
DRAM
L2
Core1 Core2
L2
Core3 Core4
Multi-Core µC to
µP architecture
severe memory contention
GPU
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.7
What is the main problem?Real-Time Systems Engineering @ Bosch
WCET is one of the central abstractions in real-time research
The main idea of WCET is to abstract away the underlying HW
WCET abstraction is not adequate for heterogeneous
system era
Dynamic interference channels are dominating factors and are not
reflected (e.g. from accelerators or other cores )
Modern workloads are not static but vary heavily depending on
operation condition (e.g. video)
More dynamic shared resources like caches , DRAM
New abstractions or more detailed models needed: we are
facing a new HW/SW co-design problem
Heterogeneous µP hardware breaks WCET abstraction
L1D
L2
Interconnect
Memory Controller + DRAM
1
3
2
Core1
Bosch App
L1D
Core2
MemBench
L1D
Core3
MemBench
L1D
Core4
MemBench
GPU,
DMA,
…
1
2
3
21,4
76,85
0
10
20
30
40
50
60
70
80
90
Lo
ad
of
Bo
sch
Ap
p o
n C
ore
1 in
%
Bosch App on Core 1
other cores idle
Bosch App on Core 1
MemBench on Cores 2, 3, and 4
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Real-Time Systems Engineering @ BoschCurrent Bosch Research Approaches
Mechanisms bounding memory interference
Idea: enforce max memory access budget per
time interval and per core/task
Inspired by real-time research: MemGuard1
Abstract performance modeling & analysis of
hardware-software systems
Established inside Bosch for µC-based systems
Research extending it to upcoming µP-based
systems at Bosch
Also prominent in your community –
see WATERS challenges provided by Bosch
8
Need prediction as well as design for predictability1) MemGuard: Memory bandwidth reservation system for efficient performance isolation in multi-core platforms - H. Yun et al., University of Illinois at Urbana-Champaign
26,6
3641
71,5
0
10
20
30
40
50
60
70
80
90
100 MB/s 200 MB/s 300 MB/s 500 MB/sLo
ad
of
Bo
sch
Ap
p o
n C
ore
1 in
%
Max. bandwidth of contending applications(Bosch App unregulated)
Increased utilization of Bosch App
due to contention
Load of Bosch App w/o memory bandwidth regulation
Load of Bosch App executing alone on platform
t
t
Performance simulation
Core 0
Core 1
Abstract system model
Software Hardware HW/SW System
Discuss, change, refine, optimize
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Automotive Engineering Projects RealityReal-Time Systems Engineering @ Bosch
9
Dealing with incomplete information is key
Specification
... like last time,
change this…
…tbd…
start of
development
start of
production
change
request 1
change
request 2
change
request 3
Feature
creep!!!
HW is selected,
no SW available
yet…
If every change request
has global effects, I will
never finish the project
Global optimization based
on complete information –
fairytale or academic
paper…
M/NEE | 2019-05-03
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Centralized E/E Architecture
Modular
Each function has its ECU
(“Function Specific Control Units”)
Integration
Functional Integration
Domain Centralization
Domain specific
“Domain Control Units” / “Domain Computer”
Domain Fusion
Domain overlapping
“Cross Domain Control Units” / “Cross Domain Computer”
Vehicle Computer - VISION
Domain independent
“(Central) Vehicle Control Computer” & potential “Zone ECUs”
Vehicle Cloud Computing - VISION
Increasing number of vehicle
functions in the cloud
Performance ECUs e.g. (Cross-)Domain Control Unit,
(Cross-)Domain Computer, Vehicle Control Computer
Optional ECUs (e.g. Central Gateway)typ. state of the art automotive ECUs (function specific)
Domain independent Zone ECUs Domain specific Zone ECUs (e.g. todays Door ECU)
Sensors/Actuators ECU = Electronic Control Unit
Real-Time Systems Engineering @ Bosch
Distributed
E/E Architecture
mainly encapsulated
E/E architecture
structure
Vehicle ComputerVISION
Domain independent
“(Central) Vehicle Control Computer” with potential “Zone ECUs”
Vehicle Cloud
Computing
VISION
Increasing number of vehicle
functions in the cloud
Domain Fusion Domain overlapping
“Cross Domain Control Units” / “Cross Domain Computer”
Domain
Centralization Domain specific
“Domain Control Units” / “Domain Computer”
Integration Functional Integration
Modular Each function has its ECU
(“Function Specific Control Units”)
(Cross) Domain Centralized
E/E Architecture
to handle complexity of
increasing cross domain
functionsTO
MO
RR
OW
TO
DA
Y
Vehicle Centralized E/E Architecture
domain independent vehicle centralized
approach with central vehicle brain(s)
and neural network (zones): Logical
centralization and physical distribution
FU
TU
RE
VIS
ION
increasing SW amount
10
Centralization shifts integration effort from network to the ECU
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
non-
trustedtrusted
Consequences of a Centralized E/E ArchitectureReal-Time Systems Engineering @ Bosch
11
Integration challenges
Multi-supplier
Mixed criticality (safety, security, timing)
Can only be handled efficiently
if system parts can be tested in isolation
if local changes do not have global impact
Current Hypervisors:
Spatial isolation ✓
Temporal isolation
‒ No solution for bounding memory contention
‒ Inefficient scheduling
Compositionality is key for development efficiency
SoCCore 1 Core n… GPU
HypervisorShared resources, services, …
AUTOSAR POSIX GENIVI Android
Control Compute Infotainment Apps
Firew
all
safe
supplier 1 supplier 2
unsafe
supplier 3
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Automotive E/E Architecture Goes ConnectedReal-Time Systems Engineering @ Bosch
12
And it is even worse ! – SOTA1 requires integration to
be feasible after SOP2
Resources (computation, communication, memory,
etc.) must be provisioned in a compositional manner
Real-time guarantees of existing applications must not
be broken when adding new applications to the system
Scheduling mechanisms in most commercially
available OSes and hypervisors are not sufficient
TDMA: static resource provisioning w/o flexibility
Static priorities: no task isolation, no notion of QoS
Compositionality is key to master future automotive systems
A A A A A
Periodic task A:
wasted CPU time due to mismatch
slot sizes execution demand
B
Sporadic task B:
wasted CPU time due to wasted slots
that are reserved to ensure responsiveness
TDMA
1: Software Over The Air 2: Start of Production
Static Priority Preemptive
Prio High
T1
T1Processor time
Prio Med Prio Low
Adding T1 influences timing behaviour of
lower priority tasks – no QoS guarantees
T1
added
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Connected E/E ArchitectureReal-Time Systems Engineering @ Bosch
13
Safety-critical real-time cause-effect chains beyond vehicle boundary
Vehicle Computer
Vehicle Cloud
Computing
Infra-
structure
AD
X-Vehicle
Mobile Edge Computing
e.g. Tele-operated Driving
e.g. Highway Pilot
Infrastructure supported
Vehicle Cloud Computing
Vehicle
Control
Center
e.g. Truck/City Platooning
Connected
Automated
Mobility
Mobility
Service
ProviderPersonalized
Mobile Edge Computing
e.g. Battery Management
Digital
Twin
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
IT like SW Construction Principles Entering AutomotiveReal-Time Systems Engineering @ Bosch
14
To cater for the flexibility needed for new applications
IT software technology is entering automotive systems
High-flexibility, scalability, powerful abstractions, dynamic runtime
adaptation BUT little control over real-time behavior
Applications tightly interacting with physical world will still be
based on embedded technology (e.g. ABS, engine management)
Resource efficiency, timing predictability, low latency
BUT little flexibility, statically compiled
A successful automotive SW platform must combine technologies
from both worlds while ensuring real-time predictability
Of course, this has a huge impact on “model usefulness”
Richer models from dataflow community have a good fit
Can they be combined with real-time models?
Real-time models need to reflect convergence of embedded and IT
HW Platform
Operating System
Middleware
Edge / Cloud
Low latency
Predictable
Embedded
High latency
Flexible
IT-like
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Application Domain with Similar Characteristics: RoboticsReal-Time Systems Engineering @ Bosch
15
Same construction principles as we are facing in automotive
µP-based HW platforms
Same memory contention effects
POSIX-based operating system (often Linux)
Richer scheduling, larger kernel overheads
Robotic Operating System (ROS) as middleware
Service-orientation, marshalling, call-back queuing
… little to learn in terms of real-time
Real-time often neglected in Robotics
Real-time problems are solved taking more powerful controller…
… or by tweaking/optimizing manually
Same challenges … little to learn … yet
HW Platform
Operating System
Middleware
Edge / Cloud
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Real-Time Systems Engineering @ BoschCurrent Bosch Research Approaches
ROS2 on resource-constrained µCs
RTOS, DDS-XRCE, predictable execution
Response time analysis for ROS2
Bounding latencies of cause-effect chains in ROS2
framework
Revisiting ROS2 design choices from real-time
perspective
Joint paper by Bosch/MPI/Pisa presented after lunch
Real-time guarantees with QNX
QNX is one of the candidate operating systems for
vehicle computers
Adaptive partitioning scheduling (APS) in QNX
provides secure partitions with guaranteed CPU time
Unfortunately APS exhibits scheduling anomalies
16
Bosch research leverages synergies between robotics and automotive
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
Real-time Experts are Rare – Engineers are ManyReal-Time Systems Engineering @ Bosch
17
Results need to be applicable for non-experts
We feel
honored…
… but Bosch is
large and some
parts are here.
https://www.cse.wustl.edu/~cdgill/ngoscps2019/presentations/NGOSCPS2019_Brandenburg.pdf by Björn Brandenburg, MPI for SW Systems, Kaiserslautern
Corporate Research | 2019-06-22
© Robert Bosch GmbH 2019. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights.
There are many challenges ahead.
Solve them together with us.
18
THANK YOU