Académique Documents
Professionnel Documents
Culture Documents
1: In-Car Networking
Architecture
Communication, Diagnosis
Transceiver
Sensor
Drivers
ECU
Core
( next slide)
Power
Supply
Actor
Drivers
Actors
Sensors
ECU
Architecture
ECU
Core
Personal
Computer
addiKonal
external
guard
hardware
(e.g.,
watchdog)
for
safety
criKcal
applicaKons
I/O drivers
watchdog
Microcontroller
(MCU)
ext. memory
( next slide)
address bus
ASIC
...
opt.
Co-Processors,
DSPs,
...
ext. memory
data bus
communication
diagnosis
Architecture
External Bus
Program
Memory
Data
Memory
CPU
DMA
Sys. Timer
Bus Ctrl.
Bus Ctrl.
Interface to
other controllers
Ports
Interfaces
(CAN, serial,
JTAG, ...)
Interrupt
Handler
Serial Bus
Timers
System Ctrl.
A/D
Converter(s)
Architecture
Microcontroller (MCU)
8,
16,
32
Bit
Inneon,
Freescale,
Fujitsu,
...
Memory
VolaKle
memory
SRAM
(some
kByte)
Typically
integrated
into
microcontroller
Non-volaKle
memory
Flash
(256
kByte
..
some
MByte)
Serial
EEPROM
(some
kByte,
e.g.,
for
error
log)
Power supply
Architecture
Clock
Watchdog
Expects
periodic
signal
from
MCU
Resets
MCU
on
Kmeout
ASIC
guard
For
more
complex
/
criKcal
ECUs
ASIC
sends
quesKon,
MCU
must
send
correct
answer
before
Kmeout
Resets
(or
disables)
ECU
on
Kmeout
or
error
Internal Buses
Low-cost
ECUs
can
use
shared
bus
for
address
and
data
Parallel
Architecture
Sensor drivers
Actor drivers
Further requirements
Hardware abstracKon
Sofware safeguards
Process States
running
wait
terminate
preempt
waiting
suspended
start
release
ready
activate
10
Scheduling
suspended
Activation
time or event based
ready
Scheduler
Priority
Dispatcher
running
[C2X]
Summer
2014
Task executed
11
Scheduling
Feasible
schedule:
all
Kme
constraints
fullled,
no
deadline
violated
Dispatcher
coordinates
context
switches
Context
switches
For
one
process
to
change
state
to
running,
another
process
may
need
to
be
preempted
CPU
registers
etc.
will
now
be
occupied
by
new
process,
operaKng
system
takes
care
of
persisKng
informaKon
12
Latency
Jijer
ExecuKon Kme
13
End
Execution Time
Task
Time
Latency (Response Time)
Leeway
Activation
Deadline
14
Firm deadline
Soft
Firm
Deadline
-1
Delivering
result
afer
rm
deadline
useless
(no
benet)
e.g.,
incoming
trac
bulleKn
SatNav
powered
up
Hard
deadline
Delivering
result
afer
hard
deadline
causes
damage
or
harm
(negaKve
benet)
e.g.,
brake
pedal
is
pushed
car
decelerates
15
Hard
16
OSEK/VDX
1993
Founded
as
OSEK
Oene
Systeme
und
deren
Schni7stellen
fr
die
Elektronik
im
Kra>fahrzeug
BMW,
Bosch,
Daimler
Chrysler,
Opel,
Siemens,
VW,
Univ.
Karlsruhe
1994
Today
More
than
50
partners
(Parts)
standardized
as
ISO
17356
series
Standardizes
common
communicaKons
stack,
network
management,
opera;ng
system
(
next
slides),
Many
free
implementaKons
(freeOSEK,
openOSEK,
nxtOSEK,
)
17
OSEK/VDX
OSEK Operating System
Application
OSEK COM
Interaction Layer
OSEK/VDX
Network
Management
Network Layer
18
OSEK/VDX
ProperKes
19
OSEK/VDX
ConguraKon
OperaKng
system
congured
at
compile
Kme
CPU OSEK_Demo
{
OSEK_Example_OS
{
MICROCONTROLLER = Intel80x86;
};
OSEK
ImplementaKon
Language
(OIL)
Scheduling
strategy
Task
prioriKes
TASK Sample_TASK
{
PRIORITY = 12;
SCHEDULE = FULL;
AUTOSTART = TRUE;
ACTIVATION = 1;
};
};
20
OSEK/VDX
*.c
*.h
Generator
os.c
os.h
Compiler
*.obj
Linker
os.elf
21
OSEK/VDX
Tasks
StaKc
priority
RelaKonships
of
tasks
SynchronizaKon
Message
exchange
Signaling
DeclareTask(SampleTask);
TASK(SampleTask) {
/* read sensors, trigger actors */
TerminateTask();
}
[C2X]
Summer
2014
22
OSEK/VDX
Scheduling
Priority
suspended
running
running
ready
suspended
running
suspended
Task 2
Task 1
23
AUTOSAR
TradiKonal
paradigm:
one
funcKon
one
ECU
(incl.
sofware
and
OS,
supplied
by
OEM)
IntegraKon
at
manufacturer
In-house
development
of
sofware
at
manufacturer
Independence
of/from
OEM
24
AUTOSAR
Data
Data
Data
Data
Data
Software
Software
Software
Software
Software
Software
AUTOSAR RTE
OS
Services
Comms
Hardware Abstraction
OS
ECU 1
Services
Comms
Hardware Abstraction
ECU 2
25
AUTOSAR
Application Layer
AUTOSAR Runtime Environment
CAN XCP
FlexRay XCP
Generic NM
CAN NM
FlexRay NM
Communication
Gateway
CAN
Transport
Protocol
ECU
Abstraction Layer
FlexRay
Interface
CAN
Interface
Microcontroller
Abstraction Layer
FlexRay
Driver
CAN
Driver
Complex Drivers
XCP
Services
Diagnostic
Comm.
Manager
Microcontroller
[C2X]
Summer
2014
26
Main Takeaways
ECUs
OSEK/VDX
Principles
Architecture
Real-Kme
properKes
(hard,
rm,
sof
deadlines)
MoKvaKon
StaKc
conguraKon
Scheduling
AUTOSAR
MoKvaKon
Run
Time
Environment
Component
Principle
27