+ All Categories
Home > Documents > Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A...

Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A...

Date post: 24-Dec-2015
Category:
Upload: ernest-carroll
View: 217 times
Download: 1 times
Share this document with a friend
Popular Tags:
41
Setha Pan-ngum
Transcript
Page 1: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Setha Pan-ngum

Page 2: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

IntroductionEmbedded & Real-time systems could be

standalone or connectedA real-time system is often composed from a

number of periodic (time triggered) and sporadic (event triggered) tasks which communicate their result by passing messages.

In a distributed real-time systems these messages are sometimes sent between processors across a communication device. (from Urban Bilstrup)

Page 3: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Introduction (cont.)To guarantee that the timing requirements of

all tasks are met, the communications delay between a sending task and a receiving task being able to access that message must be bounded.

For examples Control systems: between sensors and

actuators via central computer Multiprocessors: between processors, tasks

communicating

Page 4: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Open System Interconnection•Intended for computers

•Designed to solve compatibility problem

•Layers provide standard interface and services

•Embedded systems use some standardisation ideas

•Higher layers require lower layers to work

Page 5: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

OSILayersApplication – user interface e.g. Internet explorerPresentation – data formatting e.g. compression

and encodingSession – handle overall connection e.g. OS,

scheduling programsTransport – ensures data transfer, error checking

e.g. TCPNetwork – logical addressing, routing e.g. IP

(from TCP/IP)

Page 6: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

OSI cont.Data link – prepares data for transfer,

physical addressing such as Media Access Control (MAC)

Physical – wires and cables, hubs, repeaters.

Page 7: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Embedded CommunicationPoint-to-point networks

Each node connected to every nodeSimple and reliableDedicated links make it easy to meet real-time

deadlinesCostly due to many wires required

Shared media networksNodes are connected via bus or other topologiesLess wiring and hence cheaperEasily extendable by adding new nodes to networkComplex network protocolBeing the system of focus from now on

Page 8: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Basic network architectures

P1 P2

P3 P4

P1 P2

P3 P4

P1 P2

P3 P4

memory Internet

P1 P2

P3 P4

From Urban Bilstrup

Page 9: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Complex distributed architecture

HMI

Tuners Playback

External Wireless Communication System

Audio modulesAudio modules

Audio modulesAudio module

GatewayMOST

GREEN CANInternal Wireless Communication System

RED CAN

LIN

From Urban Bilstrup

Page 10: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

ConceptsEvent based communication

E.g. alarm, user inputs, requests for data from other systems

State based communicationE.g. regular sensor readingsPredictability

Page 11: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Network resources & qualitative parametersNetwork resources

BandwidthBuffer spaceProtocol efficiency (data bits/bandwidth).

Depends on Message overhead Media access overhead

Determinacy (ability to calculate worst-case response time)

Robustnesscost

Page 12: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Event based systemEfficient use of network resourceNeeds high reliability (event based data

comes once in a while) May need acknowledgementHard to predict delay in case of overloading

(e.g. alarm)

Page 13: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

State based systemMessages sent at predefined, regular

intervals.Less efficient due to regular occupation of

communication channel by nodes.More tolerance. Missed message may be ok,

since the next one will be coming.Transient data problem. Sending node has to

keep data long enough for other to see. E.g. button pressed may need to be repeated.

Page 14: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Protocol No best protocol, depends on applications.Embedded systems tends to focus on level 1

and 2 of OSI model, for simplicity and overhead reduction.

Physical link (Layer 1) – transmission mediumData link (Layer 2) provides Media Access

Control (MAC)

Page 15: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

15

Advanced communication principles [6]Layering

Break complexity of communication protocol into pieces easier to design and understand

Lower levels provide services to higher level Lower level might work with bits while higher level might work with

packets of data Physical layer

Lowest level in hierarchy Medium to carry data from one actor (device or node) to another

Parallel communication Physical layer capable of transporting multiple bits of data

Serial communication Physical layer transports one bit of data at a time

Wireless communication No physical connection needed for transport at physical layer

Page 16: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

16

Parallel communication [6]Multiple data, control, and possibly power wires

One bit per wire

High data throughput with short distancesTypically used when connecting devices on same

IC or same circuit boardBus must be kept short

long parallel wires result in high capacitance values which requires more time to charge/discharge

Data misalignment between wires increases as length increases

Higher cost, bulky

Page 17: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

17

Serial communication [6]Single data wire, possibly also control and power

wiresWords transmitted one bit at a timeHigher data throughput with long distances

Less average capacitance, so more bits per unit of time

Cheaper, less bulkyMore complex interfacing logic and communication

protocolSender needs to decompose word into bitsReceiver needs to recompose bits into wordControl signals often sent on same wire as data increasing

protocol complexity

Page 18: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

18

Wireless communication [6]Infrared (IR)

Electronic wave frequencies just below visible light spectrumDiode emits infrared light to generate signal Infrared transistor detects signal, conducts when exposed to

infrared lightCheap to buildNeed line of sight, limited range

Radio frequency (RF)Electromagnetic wave frequencies in radio spectrumAnalog circuitry and antenna needed on both sides of

transmissionLine of sight not needed, transmitter power determines

range

Page 19: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Media Access Control (MAC)Many protocols are taken from computer

networks

Connection oriented protocolsCSMA/CDCSMA/CAPollingToken passingTDMABinary countdown (Bit dominance)

Page 20: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Protocol overview [1]

Page 21: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Connection oriented protocols [5]

2 nodes per each connection onlyIf nodes are not directly connected, data is relayedDeterministic delay between directly connected

nodes, high delay for indirectly connected nodes

Page 22: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Connection oriented protocols cont.Suitable to systems with low communication

requirements.Node with pass-through traffic can be fully

occupied.E.g. telephone network service

Page 23: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Polling [5]

Simple and deterministicNeeds a master nodeMaster periodically polls slave nodesConsumes bandwidthE.g. military aircraft communicationSimple slave nodes, complex master

Page 24: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Time Division Multiple Access (TDMA) [5]

Masters broadcasts sync signal to synchronise all clocks

Then each node sends data on its time slot.Similar but more efficient than polling (synchronise

once vs polling all nodes individually.more complex nodes due to timing requirements.

Page 25: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

TDMA cont.Fixed length messages (inflexible) E.g. satellite communications

Page 26: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Token ring [5]

Ring shape networkToken (signal) is passed from node to nodeNode can hold token, send message all the

way round the ring, and pass token onDeterministic under heavy load

.

Page 27: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Token ring cont.Some token overheadCan add priority by having extra field in

tokenMore complexity in detecting token lostCable break disrupts network (needs dual

ring)E.g. many Wide Area Networks (WANs)

Page 28: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Token bus [5]

Similar to token ringToken is passed via bus simultaneously Cable break can be dealt with by

reconfiguration (like when a node is added to or taken off the network.

Applied in manufacturing

Page 29: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Binary countdown (Bit Dominance)All nodes wait for channel to be free before sending. Simultaneous channel access (contention) resolved by

detecting broadcasting signal for unique identificationBus must provide dominance bit e.g. ‘1’ can override

‘0’ A node stop transmitting when seeing dominance bit

opposite to its own broadcasting.Hence messages require priority as IDs rather than

node IDs.Good throughput & high efficiency (no contention

loss)

Page 30: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Binary countdown cont. [5]

Page 31: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Binary countdown cont. Heavy load can cause long delay for low

priority messages (no bound)Applied in industrial and automotive

Controller Area Network (CAN) and SAE standard J 1850

Page 32: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Carrier Sense Multiple Access with Collision Dectection (CSMA/CD) [5]

Nodes wait for idle channel before transmitting.

When simultaneously transmission is detected, each node stops and waits for random time before resending.

Page 33: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

CSMA/CD cont.Easy to add or take off new nodes without

initialisation and configurationLow overhead at light trafficUnbound overhead at heavy traffic (messages

keeps colliding) hence low determinacy and efficiency.

Requires detection circuit

Page 34: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Carrier Sense Multiple Access with Collision Avoidance (SCMA/CA) [5]

Page 35: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

CSMA/CA cont.Hybrid between light traffic efficiency of

CSMA/CA and heavy traffic efficiency of token-based protocols.

Nodes waits for free network before sending. When collision happens, jam signal is sent to

notify all nodes, synchronises clocks and start contention time slot.

Unique time slot is assigned to each nodeRotate time slot for fairnessNetwork return to normal state when all slots are

unused.

Page 36: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

CSMA/CA cont.Variations

Reservation CSMA – no. of slots equal to no. of nodes Not practical if networks has many nodes.

No. of slots less than no. of nodes – randomly allocate slots to nodes.

Page 37: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Media access comparison [5]

Page 38: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Automotive standards [7]Controller Area Network (CAN)

Event triggered, Arbitration

Time Triggered Protocol (TTP) Time triggered, TDMA

Local Interconnect Network (LIN) Time triggered, master-slave

Media Oriented System Transport (MOST)

Page 39: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Manufacturing Automation Standards [7]

Controller Area Network (CAN) Arbitration

Process Network (P-NET) Token passing and master-slave

PROcess Field Bus (PROFIBUS) Token passing and master-slave

Factory Instrumentation Protocol (World FIP) Centralised arbitration

Page 40: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

Military Standards [7]MIL-STD 1553

The current 1553 data bus is widely used in military applications, with a nominal throughput of 1 Mb/s.

MIL-STD 1773 Mil-Std-1773 defines a fiber optic bus. This system is widely

used for on-board command and telemetry transfer between military spacecraft components, subsystems and instruments, and within complex components themselves. 1773 AS, has a dual rate of 1 Mb/s or 20 Mb/s.

ARINC 429 A commercial aircraft data bus. It is widely implemented in

the commercial aircraft avionics industry. Performance is 100Kb/s or 12.5Kb/s.

Page 41: Setha Pan-ngum. Introduction Embedded & Real-time systems could be standalone or connected A real-time system is often composed from a number of periodic.

References1. Upender B, Koopman P, Embedded communication

protocol options, Proc. to the 5th annual embbeded system conference, 1993

2. Rollins L, Embedded communication3. Kopetz H, Real-time system design principles for

distributed embedded applications, Kluver, 19974. Liu J, Real-time systems, Prentice-Hall, 20005. Upender B, Koopman P, Communication protocols for

embedded systems, Embedded systems programming, Nov 1994.

6. Vahid F, Givargis T, Embedded system design a unified hardware/software introduction, Wiley, 2002

7. Bilstrup U, Real-time communication


Recommended