communication (i)communication in statically allocated time slots synchronization among all nodes...

34
Kai Huang Communication (I)

Upload: others

Post on 07-Apr-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Kai Huang

Communication (I)

Page 2: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

The drones, called Octocopters, could deliver packages weighing up to 2.3kg to customers within 30 minutes of them placing the order (Jeff Bezos)

12/3/2013 Kai.Huang@tum 2

Amazon testing drones for deliveries

http://www.bbc.co.uk/news/technology-25180906

Page 3: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Bus basics

Multiple Master Bus

o Centralized arbitration

o Distributed arbitration

Network-on-Chip

Examples

12/3/2013 Kai.Huang@tum 3

Outline

Page 4: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

12/3/2013 Kai.Huang@tum 4

Communication

A/D converter Sample-and-hold

Information processing

D/A converter

Display

Sensors Actuators Environment

Is everywhere …

Bus

Network

Page 5: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

A bus is a shared communication link, connecting I/O to processor and memory

It uses one set of wires to connect multiple subsystems

What is Bus?

Control

Datapath

Memory

Processor

Input

Output

12/3/2013 5 Kai.Huang@tum

Page 6: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Pros

o Versatility:

• New devices can be added easily

• Peripherals can be moved between computer systems that use the same bus standard

o Low Cost:

• A single set of wires is shared in multiple ways

Cons

o It creates a communication bottleneck

12/3/2013 Kai.Huang@tum 6

Why Bus ? Control

Datapath Me

mo

ry

Processor Input

Output

Page 7: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Set of wires o Control wires:

• Signal requests and acknowledgments • Indicate what type of information is on the data lines

o Data/ address Wires: • carry information between the source and the destination: • Complex commands

A bus transaction includes two parts: o Sending the address o Receiving or sending the data

12/3/2013 Kai.Huang@tum 7

Generic Bus Structure

m

n

c

Address wires: Data wires:

Control wires:

Page 8: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

A bus transaction includes two parts: o Sending the address o Receiving or sending the data

Master is the one who starts the bus transaction by: o Sending the address

Salve is the one who responds to the address by: o Sending data to the master if the master ask for data o Receiving data from the master if the master wants to send data

Master versus Slave

Bus Master

Bus Slave

Master send address

Data can go either way

12/3/2013 8 Kai.Huang@tum

Page 9: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Typical Bus Access Protocol

clock

time

R/W

address enable

address

data ready

data

Read Write

1

2

3

3

4

4

5

5

12/3/2013 9 Kai.Huang@tum

Page 10: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Processor-Memory Bus (design specific) o Short and high speed o Only need to match the memory system

• Maximize memory-to-processor bandwidth

o Connects directly to the processor

I/O Bus (industry standard) o Usually is lengthy and slower o Need to match a wide range of I/O devices o Connects to the processor-memory bus or backplane bus

Backplane Bus (industry standard) o Backplane: an interconnection structure within the chassis o Allow processors, memory, and I/O devices to coexist o Cost advantage: one single bus for all components

Types of Buses

12/3/2013 10 Kai.Huang@tum

Page 11: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

A photo of Sicomm

12/3/2013 Kai.Huang@tum 11

SECOCQ7-Xboard

Page 12: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Synchronous Bus: o Includes a clock in the control lines o A fixed protocol for communication that is relative to the

clock o Advantage: involves very little logic and can run very fast o Disadvantages:

• Every device on the bus must run at the same clock rate • To avoid clock skew, they cannot be long if they are fast

Asynchronous Bus: o It is not clocked o It can accommodate a wide range of devices o It can be lengthened without worrying about clock skew o It requires a handshaking protocol

Synchronous and Asynchronous Bus

12/3/2013 12 Kai.Huang@tum

Page 13: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Synchronous Bus:

12/3/2013 Kai.Huang@tum 13

Generic Fixed-delay Access Protocol

Page 14: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Asynchronous Bus:

12/3/2013 Kai.Huang@tum 14

Generic Variable-delay Access Protocol

Page 15: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Bus basics

Multiple Master Bus

o Centralized arbitration

o Distributed arbitration

Network-on-Chip

Examples

12/3/2013 Kai.Huang@tum 15

Outline

Page 16: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Arbiter is used o Controls access to the shared bus o Uses arbitration policy to select master to grant access to bus

Bus arbitration schemes usually try to balance two factors: o Bus priority: The highest priority device should be serviced first o Fairness: Even the lowest priority device should never be completely

locked out from the bus

Arbitration policy o Random Access o Centralized Arbitration

• Round Robin policy • Priority policy • TDMA policy

o Distributed Arbitration • Carrier Sense Multiple Access (CSMA) / Collision Detection (CD) / Collision

Avoidance (CA) / Collision Resolution (CR)

12/3/2013 Kai.Huang@tum 16

Multiple Masters Simultaneously Access

Page 17: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Random access to communication medium o no access control; requires low medium utilization

o improved variant: slotted random access

o What is the optimal sending rate p in case of n stations? • probability that a slot is not taken by others: • probability that a station transmits successfully: • determine maximum with respect to p:

12/3/2013 Kai.Huang@tum 17

Random Access

access conflict

Page 18: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Two important control signals per MASTER, i.e., o bus_request – from MASTER to ARBITER o bus_granted – from ARBITER to MASTER

Minimal change is required if new components are added to the system

Centralized Arbitration with a Bus Arbiter

ReqA

Arbiter Highest priority: ReqA Lowest Priority: ReqB

Clk

ReqB

ReqC

GrantA

GrantB

GrantC

Clk

ReqA

ReqB

GrA

GrB

12/3/2013 18 Kai.Huang@tum

Page 19: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Communication in statically allocated time slots Synchronization among all nodes necessary:

o periodic repetition of communication frame or

o master node sends out a synchronization frame

Examples: TTP, static portion of FlexRay, satellite networks

12/3/2013 Kai.Huang@tum 19

Time Division Multiple Access (TDMA)

Page 20: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Priority based Pros: simple Cons:

o Cannot assure fairness: • A low-priority device may be locked out indefinitely

o The use of the daisy chain grant signal also limits the bus speed

The Daisy Chain Bus Arbitrations Scheme

Bus Arbiter

Device 1

Highest Priority

Device N Lowest Priority

Device 2

Grant Grant Grant

Release

Request

12/3/2013 20 Kai.Huang@tum

Page 21: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Requires fewer signals compared to the centralized approach

More hardware duplication, more logic/area, less scalable

12/3/2013 Kai.Huang@tum 21

Distributed Arbitration

Page 22: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

A probabilistic media access control (MAC) protocol

Carrier sense means that a transmitter uses feedback from a receiver to determine whether another transmission is in progress before initiating a transmission

Sense before transmit / listen before talk o Transmitter tries to detect the presence of a carrier

wave from another station before attempting to transmit

12/3/2013 Kai.Huang@tum 22

Carrier Sense Multiple Access (CSMA)

Page 23: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Carrier Sense Multiple Access / Collision Detection o Try to avoid and detect collisions:

• before starting to transmit, MASTER checks whether the bus is idle

• if a collision is detected (several MASTERS started almost simultaneously), wait for some time (back-off timer)

o Repeated collisions result in increasing back-off times

o Examples: Ethernet, IEEE 802.3

12/3/2013 Kai.Huang@tum 23

CSMA/CD

Page 24: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Carrier Sense Multiple Access / Collision Avoidance Operation:

o Reserve s slots for n nodes; note: slots are normally idle – they are (short) time intervals, not signals; if slot is used it becomes a slice.

o nodes keep track of global communication state by sensing o nodes start transmitting a message only during the assigned slot o If s=n, no collisions; if s<n, statistical collision avoidance

Examples: 802.11, part of FlexRay

12/3/2013 Kai.Huang@tum 24

CSMA/CA – Flexible TDMA (FTDMA)

Page 25: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Carrier Sense Multiple Access / Collision Resolution Operation:

o Before any message transmission, there is a global arbitration

o Each node is assigned a unique identification number o All nodes wishing to transmit compete by transmitting a binary signal

based on their identification value o A node drops out the competition if it detects a dominant state while transmitting a passive state o Thus, the node with the lowest identification value wins

Example: CAN Bus

12/3/2013 Kai.Huang@tum 25

CSMA/CR

Page 26: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Both Node A and Node B consider bus idle. Both nodes start transmit “SOF” (Start of frame) Node A transmits dominant bit and Node B recessive,

and Node A wins the arbitration.

12/3/2013 Kai.Huang@tum 26

CSMA/CR cont’d

Node A

Node B

recessive Bus idle

Bus idle

dominant

recessive

dominant

t 0 t 1 t 2

Arbitration lost by Node B

t 0

t 1

t 2

Page 27: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Bus basics

Multiple Master Bus

o Centralized arbitration

o Distributed arbitration

Network-on-Chip

Examples

12/3/2013 Kai.Huang@tum 27

Outline

Page 28: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Architectural paradigm shift o Replace wire spaghetti by an intelligent network infrastructure

Design paradigm shift o Busses and signals replaced by packets

Organizational paradigm shift o Create a new discipline, a new infrastructure responsibility

Evolution or Paradigm Shift?

Computing

module

Network

router

Network

link

Bus

12/3/2013 28 Kai.Huang@tum

Page 29: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Network-on-chip (NoC) is a packet switched onchip communication network

NoCs use packets to route data from the source to the destination PE via a network fabric that consists of

o network interfaces (NI)

o switches (routers)

o interconnection links (wires)

12/3/2013 Kai.Huang@tum 29

Network-On-Chip: Introduction

Page 30: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

NoCs are an attempt to scale down the concepts of large-scale networks, and apply them to the Embedded System-on-chip (SoC) domain

NoC Properties o Reliable and predictable electrical and physical

properties

o Regular geometry that is scalable

o Flexible QoS guarantees

o Higher bandwidth

o Reusable components • Buffers, arbiters, routers, protocol stack

12/3/2013 Kai.Huang@tum 30

NoC Properties

Page 31: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

12/3/2013 kai.huang@tum 31

Bus based interconnect

o Low cost

o Easier to Implement

o Flexible

Networks on Chip o Layered Approach o Buses replaced with

Networked architectures o Better electrical properties o Higher bandwidth o Energy efficiency o Scalable

Bus vs NoCs

Irregular architectures Regular Architectures Bus-based architectures

Page 32: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

12/3/2013 Kai.Huang@tum 32

NoC Topology

Page 33: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Scalability – Area and Power in NoCs For Same Performance, compare the:

n

n

d

d

n

n

d

dNoC: n

n

d

d Simple Bus:

Segmented Bus: Point-to Point:

3O n n

2O n n

O n

2O n n

E. Bolotin at al. , “Cost Considerations in Network on Chip”, Integration, special issue on Network on Chip, October 2004

O n n

O n n

O n

O n n

Wire-area and power:

12/3/2013 33 Kai.Huang@tum

Page 34: Communication (I)Communication in statically allocated time slots Synchronization among all nodes necessary: o periodic repetition of communication frame or o master node sends out

Very hot research topic at the moment

NO wide adoption in Industry because o Power

• complex NI and switching/routing logic blocks are power hungry

• several times greater than for current bus-based approaches

o Latency • additional delay to packetize/de-packetize data at NIs

• flow/congestion control and fault tolerance protocol overheads

• delays at the numerous switching stages encountered by packets

• even circuit switching at routers has overhead

• lags behind what can be achieved with bus-based/dedicated wiring

o Lack of tools and benchmarks

12/3/2013 Kai.Huang@tum 34

Network-On-Chip: Issues