automotive 04 proto2

44
[C2X] Summer 2014 Protocols: FlexRay and MOST 1 PROTOCOLS: FLEXRAY AND MOST Part 1: InCar Networking

Upload: estraj1954

Post on 29-Jan-2016

220 views

Category:

Documents


0 download

DESCRIPTION

Prototyping hardware

TRANSCRIPT

Page 1: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   1  

PROTOCOLS:  FLEXRAY  AND  MOST  Part  1:  In-­‐Car  Networking  

Page 2: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   2  

FlexRay  

²  MoGvaGon  ª  Drive/Brake/Steer-­‐by-­‐Wire  ª  CAN  bus  is  prone  to  failures  

§  Line  topology  §  No  redundant  links  

ª  CAN  bus  is  slow  ª  Need  for  short  bus  lines  ⇨  deployment  expensive,  complicated  ª  Non-­‐determinism  for  all  but  one  message  class  

§  Worst  case  delay  unacceptably  high  

ª  Early  soluGons  by  OEMs  proprietary  §  TTCAN,  TTP/TTA,  Byteflight,  ...  

ª  FoundaGon  of  consorGum  to  develop  new  bus:  FlexRay  §  BMW,  VW,  Daimler,  GM,  Bosch,  NXP,  Freescale  

ª  First  series  deployment  at  end  of  2006  (BMW  X5)  

Page 3: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   3  

FlexRay  

²  Bus  topology  ª  Line,  Star  with  bus  terminaGon  ª  Max.  distance  per  line:  24m  ª  OpGonal  use  of  second  channel  

§  Higher  redundancy  or(!)  higher  speed  §  Up  to  10  MBit/s  for  single  channel,  20  MBit/s  for  dual  channel  

ECU ECU

ECU ECU

S

ECU ECU

ECU ECU

S

24m 24m 24m

Page 4: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   4  

FlexRay  

²  Bit  transmission  ª  Need  synchronized  clocks  in  sender  and  receiver  ª  Thus,  need  addiGonal  bits  for  synchronizing  signal  sampling  at  

receiver  (done  with  each  1⇨0  flank)  ª  Don’t  use  bit  stuffing  

otherwise:  message  length  becomes  non-­‐determinisGc  (cf.  CAN)  ª  New  concept:  frame  each  transmission,  each  frame,  each  Byte  

§  Bus  idle  (1)  §  Transmission  Start  Signal  (0)  

•  Frame  Start  Signal  (1)  »  Byte  Start  Signal  (1)  »  Byte  Start  Signal  (0)  »  8  Bit  Payload  (…)  

•  Frame  End  Signal  (0)  

§  Transmission  End  Signal  (1)  

Page 5: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   5  

FlexRay  

²  Bus  access  ª  Bus  cycle  (ca.  1  μs  ..  7  μs)  

§  StaGc  Segment  §  Dynamic  Segment  (opt.)  §  Symbol  Window  (opt.)  §  Network  Idle  Time  

ª  Global  Cycle  Counter  keeps  track  of  bus  cycles  passed  

²  StaGc  Segment  ª  Slots  of  fixed  length  (2  ..  1023)  ª  One  Message  per  Slot  ª  StaGc  assignment  (of  slot  and  channel)  to  ECUs  (i.e.,  TDMA)  

 ⇨  bus  access  is  collision  free,  determinisGc  

Page 6: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   6  

FlexRay  

²  Dynamic  Segment  ª  Split  into  minislots  (also  staGcally  assigned  to  ECUs)  ª  Messages  (usually)  take  up  more  than  one  minislot  ª  Slot  counter  pauses  while  message  is  being  transmijed  

(thus,  slot  counters  of  channels  A  and  B  soon  desynchronize)  ª  Lower  priority  messages  have  higher  slot  number  

(thus  sent  later,  or  not  at  all)  

²  Example:  

Static Segment Dynamic Segment Sym Net Idle (mini)slots Channel A 1 2 3 4 5 6 7 8 9

Channel B 1 2 3 4 5 6 7

Page 7: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   7  

FlexRay  

²  Message  format  ª  Control  Bits  

§  Bit  0:  Reserved  •  Unused,  always  0  

§  Bit  1:  Payload  Preamble  Indicator  •  In  staGc  segment:    

first  0  ..  12  Byte  payload  for  management  informaGon  •  In  dynamic  segment:  

first  2  Byte  payload  contains  Message  ID  (cf.  UDP  Port)  

5 Bit 11 Bit 7 Bit 11 Bit 6 Bit 24 Bit

Control Bits Frame ID Length Header CRC

Cycle Counter Payload CRC

Page 8: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   8  

FlexRay  

²  Message  format  ª  Control  Bits  

§  Bit  2:  Null  Frame  Indicator  •  Indicates  frame  without  payload  •  Allows  sending  “no  message”  also  in  staGc  segment  (fixed  slot  lengths!)  

§  Bit  3:  Sync  Frame  Indicator  •  Indicates  frame  may  be  used  for  synchronizing  clock  •  To  be  sent  by  2  ..  15  “reliable”  ECUs  

§  Bit  4:  Startup  Frame  Indicator  •  Used  for  synchronizaGon  during  bootstrap  •  Sent  by  cold  start  node  (⇨  later  slides)  

5 Bit 11 Bit 7 Bit 11 Bit 6 Bit 24 Bit

Control Bits Frame ID Length Header CRC

Cycle Counter Payload CRC

Page 9: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   9  

FlexRay  

²  Message  format  ª  Frame  ID  

§  IdenGfies  message  (≜  slot  number)  

ª  Length  §  Length  of  payload  (in  16  Bit  words)  

ª  Header  CRC  ª  Cycle  Counter  

§  Global  counter  of  passed  bus  cycles  ª  Payload  

§  0  ..  127  16  Bit  words  (≜    0  ..  254  Byte  of  payload)  ª  CRC  

5 Bit 11 Bit 7 Bit 11 Bit 6 Bit 24 Bit

Control Bits Frame ID Length Header CRC

Cycle Counter Payload CRC

Page 10: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   10  

FlexRay  

²  Time  synchronizaGon  ª  Need  synchronized  bit  clock  +  synchronized  slot  counter  ª  Want  no  dedicated  Gme  master  ⇨  Distributed  synchronizaGon  ª  Configure  (typically)  three  nodes  as  “cold  start  nodes”  

ª  Cold  start  procedure  (followed  by  all  cold  start  nodes):  §  Check  if  bus  idle  

•  if  bus  not  idle  ⇨  abort  (cold  start  already  proceeding  or  unneeded)  

§  Transmit  wakeup  (WUP)  pajern  •  if  collision  occurs  ⇨  abort  •  if  no  collisions  occurred  ⇨  this  is  the  leading  cold  start  node  

ª  Cold  start  procedure  (leading  cold  start  node):  §  Send  Collision  Avoidance  Symbol  (CAS)  §  Start  regular  operaGons  (cycle  counter  starts  at  0)    

•  Set  Bits:  Startup  Frame  Indicator  ⊕  Sync  Frame  Indicator  

Page 11: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   11  

FlexRay  

²  Time  synchronizaGon  ª  Cold  start  procedure  (other  cold  start  nodes)  

§  Wait  for  4  Frames  of  leading  cold  start  node  §  Start  regular  operaGons  

•  Set  Bits:  Startup  Frame  Indicator  ⊕  Sync  Frame  Indicator  

ª  Cold  start  procedure  (regular  ECUs)  §  Wait  for  2  Frames  of  2  cold  start  nodes  §  Start  regular  operaGons  

*1* WUP WUP CAS 0 1 2 3 4 5 6 7 8 ...

*2* WUP ↯ 4 5 6 7 8 ...

*3* ↯ 4 5 6 7 8 ...

4 6 7 8 ...

5 6 7 8 ...

Page 12: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   12  

FlexRay  

²  Example  configuraGon  of  Gming  ª  Use  fixed  payload  length  of  16  Byte  

(with  header  and  trailer:  24  Bytes;  with  FSS,  BSS,  FES:  ca.  250  Bits)  ª  10  Mbps  data  rate  ⇨  25  µs  message  duraGon  ª  Add  5  µs  guard  to  care  for  propagaGon  delay  and  clock  driq  ⇨  35  µs  slot  length  in  staGc  segment  

ª  One  macro  Gck:  1  µs  (can  use  1  ..  6  µs)  ª  One  minislot:  5  macro  Gcks:  5  µs  ª  Tbit  =  100  ns,  sample  rate  of  bus  =  Tbit/8  =  12.5  ns  

FlexRay frame with 16 Byte payload

Slot Starts

Slot Ends

Channel Idle

static slot length = Tstatic,slot = 35 macro ticks = 35 µs

Action Point Offset TAP,Offset

frame duration TF ≈ 25 µs

Page 13: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   13  

FlexRay  

²  Example  configuraGon  of  Gming  (contd.)  ª  Use  64  disGnct  communicaGon  cycles  ª  CommunicaGon  cycle  duraGon:  5  ms  ª  Use  3  ms  for  staGc  segment  ª  Remaining  2  ms  used  for  dynamic  segment,  symbol  window,  

network  idle  Gme  

²  Message  repeGGon  interval  fully  customizable,  e.g.:  §  2.5  ms  (one  slot  each  at  start  and  end  of  staGc  segment)  §  5  ms  (one  slot  each  in  every  communicaGon  cycle)  §  10  ms  (one  slot  in  every  second  communicaGon  cycle)  §  …  

Page 14: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   14  

FlexRay  

²  Example  configuraGon  of  Gming  (contd.)  

0.5ms . . . . . .

10ms

. . .

20ms

10ms

40ms

10ms

20ms

0.5ms . . . . . .

Static Segment

Dynamic Segment

SYM +NIT

Cycle 00

Cycle 01

Cycle 02

Cycle 03

Cycle 04

Cycle 05

Cycle 63

2.5ms Slots

5ms Slots

Cycle Multiplexing Slots

2.5ms Slots

5ms 2ms

1,9ms 3ms

2.5ms

100 µs Every…

Every…

Page 15: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   15  

FlexRay  

²  Error  prevenGon  ª  Integrate  bus  guard  ª  Implement  separately  from  communicaGon  controller  ª  Follows  protocol  steps  in  communicaGon  controller  ª  Can  only  enable  bus  driver  when  allowed  to  communicate,  

or  permanently  disable  in  case  of  errors  (babbling  idiot  problem)  

Enable Bus Guard Enable

Application Logic

Comm Controller

Bus Driver

Flex

Ray

Bus

Page 16: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   16  

FlexRay  

²  Error  handling  ª  MulGple  measures  for  error  detecGon  

§  Check  cycle  counter  value  §  Check  slot  counter  value  §  Check  slot  Gming  §  Check  header  CRC  §  Check  CRC  

ª  ReacGon  to  Gming  errors  §  Do  not  automaGcally  repeat  messages  (⇨  non-­‐determinism)  §  Switch  to  passive  state  instead  

•  Stop  transmisng  messages  •  Keep  receiving  messages  

(might  allow  re-­‐synchronizaGon  to  bus)  

ª  ReacGon  to  severe,  non-­‐recoverable  errors  §  Completely  switch  off  bus  driver  

Page 17: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   17  

FlexRay  

²  AUTOSAR  TP  ª  Transport  protocol  of  FlexRay  ª  Upwards  compaGble  to  ISO  15765-­‐2  (ISO  TP  for  CAN)  ª  Adjusted  and  extended  for  FlexRay  ª  Difference  in  addressing  

§  In  CAN:  CAN  message  ID  assigned  arbitrarily  §  In  FlexRay:  Frame  ID  ≜  Slot  Number  (i.e.,  not  arbitrary)  ⇨  cannot  use  source/desGnaGon  addresses  as  IDs  in  lower  layer  

§  Address  encoded  only  (and  completely)  in  TP  header  

ª  Also:  §  New  message  types  

1 .. 2 Byte 1 .. 2 Byte 1 .. 5 Byte Target Address Source Address PCI Payload

Page 18: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   18  

FlexRay  

²  AUTOSAR  TP  ª  Frame  types:  Single  Frame  Extended  /  First  Frame  Extended  ª  Larger  data  length  (DL)  field  allows  for  longer  payload  

§  Four  kinds  of  first  frames  can  indicate  payloads  of  up  to  4  GiB  

PCI Byte 0 PCI Byte 1 PCI Byte 2 PCI Byte 3 PCI Byte 4

Single Frame 0 DL

Single Frame Extended* 5 0 DL

First Frame 1 DL

First Frame Extended* 4 1 DL

“ 4 2 DL

“ 4 3 DL

“ 4 4 DL

Page 19: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   19  

FlexRay  

²  AUTOSAR  TP  ª  Extended  flow  control  

§  FS  values  allow  triggering  abort  of  ongoing  transmission  •  FS=2:  Overflow  •  FS=5:  Cancel,  Data  Outdated  •  FS=6:  Cancel,  No  Buffer  •  FS=7:  Cancel,  Other  

§  ST  split  into  two  ranges  to  allow  shorter  separaGon  Gmes  •  0x00  ..  0x7F  SeparaGon  Time  in  ms  •  0xF1  ..  0xF9  SeparaGon  Time  in  μs  (new!)  

PCI Byte 0 PCI Byte 1 PCI Byte 2 PCI Byte 3 PCI Byte 4 Consecutive Frame 2 SN

Consecutive Frame 2* 6 SN

Flow Control Frame 3 FS BS ST

Acknowledge Frame* 7 FS BS ST ACK SN

Page 20: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   20  

FlexRay  

²  AUTOSAR  TP  ª  Extended  flow  control  

§  CAN:  Acknowledgement  by  transmisng  dominant  bit  in  ACK  field  §  FlexRay:  New  Acknowledge  Frame  (AF)  §  Use  aqer  single  frame  or  aqer  all  consecuGve  frames  (as  ACK)  or  immediately  (as  NACK)  

§  FuncGons  idenGcal  to  Flow  Control  Frame,    but  adds  ACK  and  SN  nibbles  

•  ACK  is  1  or  0;  SN  indicates  slot  number  of  first  defecGve  frame  

§  Sender  may  repeat  failed  transmissions  at  earliest  convenience  (alternately  uses  CF  and  CF2  frames)  

PCI Byte 0 PCI Byte 1 PCI Byte 2 PCI Byte 3 PCI Byte 4 Consecutive Frame 2 SN

Consecutive Frame 2* 6 SN

Flow Control Frame 3 FS BS ST

Acknowledge Frame* 7 FS BS ST ACK SN

Page 21: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   21  

MOST  

²  Media  Oriented  Systems  Transport  ª  specifies  ISO  layers  1  through  7  ª  Does  not  focus  on  sensor/actor  tasks  

(e.g.,  delay,  fault  tolerance),  but  on  infotainment  (e.g.,  jijer,  data  rate)  

²  History  ª  DomesGc  Data  Bus  (D2B,  later:  DomesGc  Digital  Bus)  developed  

by  Philips,  later  standardized  as  IEC  61030  (sGll  in  the  90s)  ª  Lijle  adopGon  in  vehicles,  thus  SMSC  soon  develops  a  successor  ª  1998:  MOST  CooperaGon  standardizes  MOST  bus  

(Harman/Becker,  BMW,  DaimlerChrysler,  SMSC)  ª  December  2009:  MOST  3.0E1  published  ª  Today:    

MOST  cooperaGon  numbers  60  OEMs,  15  vehicle  manufacturers  

Page 22: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   22  

MOST  

²  Medium  ª  PlasGc  OpGc  Fiber  (POF)  

alternaGve  (copper)  variant  specified,  but  lijle  used  ª  Data  rates  specified  from  25  (MOST25)  to  150  MBit/s  (MOST150)  ª  Manchester  coded  bit  transmission  ª  Dedicated  Gming  master  ECU  (slaves  adopt  bit  Gming)  ª  Logical  bus  topology:  ring  of  up  to  64  ECUs  ª  Physical  bus  topology  can  differ  

Master ECU

ECU

ECU ECU

POF ECU

Page 23: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   23  

MOST  

²  Link  Layer  ª  Synchronous  bit  stream;  all  clocks  synchronized  to  Gming  master  ª  Stream  divided  into  blocks;  each  block  traverses  ring  exactly  once  ª  Blocks  divided  into  16  Frames  

§  Frame  size:  64  Byte  (MOST25)  to  384  Byte  (MOST150)  §  Frame  rate  staGc  but  configurable;  recommended:  48  kHz  (DVD)  

ª  Frame  divided  into  §  Header  (with  boundary  descriptor)  and  Trailer  §  Data:  Synchronous  Channel,  Asynchronous  Channel,  Control  Channel  

22,67µs Header 1 Byte

Data Field 60 Byte Synchronous Asynchronous

Trailer 1 Byte

Control Data 2 Byte

Boundary Descriptor

1 Frame = 64 Byte

Page 24: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   24  

MOST  

²  Link  Layer  ª  Synchronous  Channel  

§  Use  case:  audio  or  video  §  TDMA  divides  frame  into  streaming  channels  

⇨  determinisGc  

§  Reserved  by  messages  on  control  channel  §  Thus,  no  addressing  required  §  Maximum  number  of  streaming  channels  limited  by  frame  size  

Streaming Channel 1 Streaming Channel 2 Streaming Channel 3 unused CD-Audio, Device A DVD-Video, Device B ...

Page 25: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   25  

MOST  

²  Link  Layer  ª  Asynchronous  Channel  

§  Use  case:  TCP/IP  §  Random  access  with  arbitraGon  (based  on  message  priority)  

⇨  non-­‐determinisGc  

§  Single  message  may  take  more  than  one  frame  §  Short  addiGonal  header  contains  source/desGnaGon  address,  length  §  Short  addiGonal  trailer  contains  CRC  §  No  acknowledgement,  no  automaGc  repeat  on  errors  

1 Byte 2 Byte 1 Byte 2 Byte 4 Byte Arbitration Target Address Len Source Address ... CRC

Page 26: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   26  

MOST  

²  Link  Layer  ª  Control  Channel  

§  Management  and  control  data  §  Random  access  with  arbitraGon  (based  on  message  priority)  §  Message  length  32  Byte  

•  MOST25  control  channel  uses  2  Bytes  per  frame  ⇨  each  message  takes  16  Frames  =  1  Block  

§  Message  recepGon  is  acknowledged  by  recipient  §  Failed  transmissions  are  automaGcally  repeated  

1 Byte 2 Byte 2 Byte 1 Byte 17 Byte 2 Byte 1 Byte

Arbitration Target Address

Source Address Type Data CRC Trailer

Page 27: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   27  

MOST  

²  Link  Layer  ª  Control  Channel  messages  

§  Resource  AllocaGon,  Resource  De-­‐allocaGon:  

•  manage  streaming  channels  in  synchronous  segment  

§  Remote  Read,  Remote  Write  

•  accesses  registers  and  configuraGon  of  ECUs  

§  Remote  Get  Source  •  query  owner  of  streaming  channels  in  synchronous  segment  

§  …  •  Other  message  types  are  transparently  passed  to  upper  layers  

Page 28: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   28  

MOST  

²  Link  Layer  ª  Addressing  

§  16  Bit  addresses  §  physical  address  

•  According  to  relaGve  posiGon  in  ring  •  Master  gets  0x400  •  First  slave  gets  0x401  •  etc.  

§  logical  address  •  Assigned  by  master  •  Typically  upwards  of  0x100  (Master)  

§  groupcast  •  Typically  0x300  +  ID  of  funcGon  block  

§  broadcast  •  Typically  0x3C8  

Page 29: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   29  

MOST  

²  Ring  disrupGon  ª  Causes  

§  ECU  stops  working  §  PlasGc  opGc  fiber  gets  damaged  

ª  Symptoms  §  Messages  either  not  transmijed  to  recipient,  or  not  back  to  sender  thus:  total  failure  of  bus  

ª  Diagnosis  §  Ring  disrupGon  easily  detected  §  Reason  and  affected  ECUs  impossible  to  determine  

ª  Workarounds  §  Vendor  dependent,  proprietary  §  oqen:  use  addiGonal  single-­‐wire  bus  for  further  diagnosis  

Page 30: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   30  

MOST  

²  Higher  layers:  the  Logical  Device  Model  

Source: MOST Specification 3.0E1

NetBlock

Function Block

Function Block

Function Block

Application 1

Application 2

MOST Network Interface Controller

Network Service

Physical Interface

MOST Device

Page 31: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   31  

MOST  

²  Higher  layers:  Object  oriented  MOST  Network  Services  ª  FuncGon  block  (=  class)  

§  e.g.  audio  signal  processing  (0x21),  audio  amplifier  (0x22),  ...  §  MulGple  classes  per  device,  mulGple  devices  per  class  §  Every  device  implements  funcGon  block  0x01  (MOST  Netw.  Services)  

ª  Instance  §  Uniquely  idenGfies  single  device  implemenGng  certain  funcGon  block  

ª  Property/Method  §  Property  (get/set  value)  §  Method  (execute  acGon)  

ª  OperaGon  §  Set/Get/...  (Property),  Start/Abort/...  (Method)  

ª  22.00.400.0  (20)  ⇨  amplifier  number  0:  volume  set  to  20  

Page 32: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   32  

MOST  

²  Higher  layers:  System  boot  and  restart  ª  Master  node  announces  reset  of  global  state  

(all  devices  change  status  to  Not-­‐OK  and  cease  operaGons)  ª  Master  node  iniGates  system  scan  

§  IteraGvely  polls  all  physical  addresses  for  present  funcGon  blocks  §  Devices  answer  with  logical  address,  list  of  funcGon  blocks,  and  instance  numbers  

ª  Master  can  detect  ambiguous  combinaGons  of  funcGon  blocks  and  instance  numbers  ⇨  will  then  assign  new  instance  numbers  

ª  Master  keeps  table  of  all  device’s  operaGon  characterisGcs  ª  Master  reports  to  all  devices:  status  OK  ª  MOST  Bus  is  now  operaGonal  

Page 33: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   33  

MOST  

²  Higher  layers  –  MAMAC  and  DTCP  ª  Trend  towards  all-­‐IP  in  consumer  electronics  

addressed  in  MOST  by  introducing  MAMAC  (MOST  Asynchronous  Media  Access  Control)  §  Encapsulates  Ethernet  and  TCP/IP  for  transmission  on  MOST  bus  §  but:  not  supported  by  MOST  services;  needs  to  be  implemented  in  soqware    

ª  Concerns  of  music/film  industry  wrt.  digital  transmission  addressed  in  MOST  by  introducing  DTCP  (Digital  Transmission  Content  ProtecGon)  §  As  known  from  IEEE  1394  (FireWire)  §  BidirecGonal  authenGcaGon  and  key  exchange  of  sender/receiver  §  Encrypted  data  transmission  

Page 34: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   34  

In-­‐Car  Ethernet  

²  IEEE  802.3  ²  Bob  Metcalfe,  David  R.  Boggs  ²  1973,  Parc  CSMA/CD  Ethernet    

ª  3  Mbit/s,  256  nodes,  1  km  coax  cable  

²  1980-­‐  revised  to  become  IEEE  Std  802.3  ²  Next  big  thing?  

ª  “AutomoGve.  Cars  will  have  three  networks.    (1)  Within  the  car.    (2)  From  the  car  up  to  the  Internet.  And    (3)  among  cars.    IEEE  802  is  ramping  up  for  these  standards  now,  I  hope.”  -­‐-­‐/u/BobMetcalfe  on  hjp://redd.it/1x3fiq  

Page 35: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   35  

In-­‐Car  Ethernet  

²  Why?  ª  Old  concept:  

§  Strictly  separated  domains  §  Each  served  by  specialized  bus  §  Minimal  data  interchange  

ª  Current  trend:  §  Advanced  Driver  Assistance  Systems  (ADAS)  §  Sensor  data  fusion  

•  (in-­‐car,  between  cars)  §  Ex:  CooperaGve  AdapGve  Cruise  Control  (CACC)  

ª  Move  from  domain  specific  buses  ⇨  general-­‐purpose  bus  

Page 36: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   36  

Ethernet  

²  Physical  layers  ª  10BASE5  (aka  Thicknet,  aka  IEEE  Std  802.3-­‐1985)  

§  Manchester  coded  signal,  typ.  2  V  rise  §  10  Mbit/s  over  500m  coax  cable  §  Nodes  tap  into  core  (“vampire  tap”)  

ª  10BASE2  §  10  Mbit/s  over  “almost”  200m  coax  cable  §  BNC  connectors,  T-­‐shaped  connectors  

²  Medium  access:  CSMA/CD  ª  Carrier  sensed  ⇨  medium  busy  ª  Collision  ⇨  jam  signal,  binary  exponenGal  backoff  (up  to  16  Gmes)  

Page 37: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   37  

Ethernet  

²  Physical  layers  ª  1000BASE-­‐T  

§  1  Gbit/s  over  100m  §  Cat  5e  cable  with  8P8C  connectors,    4  twisted  pairs  of  wires,  mulG-­‐level  signal    (-­‐2,  -­‐1,  0,  +1,  +2),    scrambling,  …  

§  Medium  access  §  No  longer  shared  bus,  but  point  to  point  §  Auto-­‐negoGated  (Gming)  master/slave  

ª  100GBASE-­‐ER4  §  100  Gbit/s  over  40  km  §  PlasGc  OpGc  Fiber  (POF)  

ª  …  

Page 38: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   38  

Ethernet  

²  Link  layer  ª  Lightweight  frame  type  ª  OpGonal  extensions,  e.g.,  IEEE  802.1Q  (idenGfier  0x8100)  ª  Directly  encapsulates  higher  layer  protocols,  e.g.,  IPv6  (0x86DD)  ª  …or  IEEE  802.2  Logical  Link  Control  (LLC)  frame  (idenGfier  is  len)  

ª  Error-­‐checked,  but  only  best  effort  delivery  of  data  

0 7 8 15 Preamble (1010..11) Destination MAC

Source MAC (opt) 802.1Q tag Type/len

Payload (commonly 42-1500 Byte, max 1982 Byte)

Checksum (Idle time)

(in Byte)

Page 39: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   39  

In-­‐Car  Ethernet  

²  In-­‐car  Ethernet?  ª  Almost  all  “in-­‐car”  qualiGes  absent  

§  Heavy,  bulky  cabling  §  Huge  connectors  §  SensiGve  to  interference  §  Needs  external  power  §  No  delay/jijer/…  guarantees  §  No  synchronizaGon  §  Etc…  

ª  But:  §  …can  be  easily  extended:  §  New  physical  layers  §  Tailored  higher-­‐layer  protocols  

Page 40: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   40  

In-­‐Car  Ethernet  

²  One-­‐Pair  Ether-­‐Net  (OPEN)  alliance  SIG  ª  Founded:  BMW,  Broadcom,  Freescale,    

Harman,  Hyundai,  NXP  ª  2014:  approx.  150  members  ª  100  Mbit/s  on  single  twisted  pair,  unshielded  cable  ª  Power  over  Ethernet  (IEEE  802.3at)  ª  Manufactured  by  Broadcom,  marketed  as  BroadR-­‐Reach  

²  Reduced  Twisted  Pair  Gigabit  Ethernet  (RTPGE)  task  force  ª  Working  on  IEEE  802.3bp  ª  1  Gbit/s  over  up  to  15m    

single  twisted  pair  cable  

Source: Rosenberger Hochfrequenztechnik GmbH & Co. KG

Page 41: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   41  

In-­‐Car  Ethernet  

²  Upper  layers:  TSN  ª  Many  soluGons  (e.g.,  SAE  AS6802  “Time  Triggered  Ethernet”)  ª  Current:  IEEE  802.1  Time  SensiGve  Networking  (TSN)  task  group  

(aka  Audio/Video  Bridging  AVB  task  group,  up  unGl  2012)  ª  Promoted  by  AVnu  Alliance  SIG    (cf.  IEEE  802.11  /  Wi-­‐Fi  Alliance)  

²  Concept  ª  Needs  TSN-­‐enabled  switches  /  end  devices  ª  Tight  global  Gme  synchronizaGon  ª  Dynamic  resource  reservaGon  on  streams  through  network  ª  IEEE  802.1AS…  extensions  

§  Layer  2  service  ª  IEEE  802.1Q…  extensions  

§  Frame  tagging  standard  

Page 42: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   42  

In-­‐Car  Ethernet  

²  IEEE  802.1AS  Time  Synchronizing  Service  ª  Subset  of  IEEE  1588  Precision  Time  Protocol  (PTP)  ª  Syncs  clock  value/frequency  of  all  nodes  ª  ElecGon  of  “master”  Gme  master  (grandmaster  clock),  

disseminates  sync  informaGon  along  spanning  tree  

²  IEEE  802.1Qat  Stream  ReservaGon  Protocol  (SRP)  ª  Talker  adverGses  stream  (along  with  parameters)  ª  AdverGsement  is  disseminated  through  network  ª  Intermediate  nodes  check,  block  available  resources,  update  

adverGsement  with,  e.g.,  newly  computed  worst  case  latency  ª  Listeners  check  (annotated)  adverGsement,  send  registraGon  

message  back  to  Talker  ª  Intermediate  nodes  reserve  resources,  update  mulGcast  tree  

Page 43: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   43  

In-­‐Car  Ethernet  

²  IEEE  802.1Qav  etc.  Traffic  Shaping  ª  PrioriGze  frames  according  to  tags  ª  Avoid  starvaGon,  bursts,  …  ª  e.g.,  Token  bucket,  with  many  more  proposed  

²  IEEE  802.1Qbu  Frame  PreempGon  ª  Can  cancel  ongoing  transmissions  

(if  higher  priority  frame  arrives)  

²  IEEE  802.1Qcb  Media  Redundancy  

²  …  

Page 44: Automotive 04 Proto2

[C2X]  Summer  2014   Protocols:  FlexRay  and  MOST   44  

Main  Takeaways  

²  FlexRay  ª  MoGvaGon  ª  Single  or  dual  channel  operaGon  ª  Distributed  operaGon  ª  StaGc  and  dynamic  segment  

²  MOST  ª  MoGvaGon  ª  Topology  and  implicaGons  ª  Centralized  operaGon  ª  Synchronous  and  asynchronous  channel  

²  Ethernet  ª  Concept  ª  Drawbacks  of  classic  standards  ª  New  PHY  layers  ª  New  upper  layers  (TSN)