Beruflich Dokumente
Kultur Dokumente
Introduction
Embedded & Real-time systems could be standalone
or connected A 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)
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
OSI
Layers Application user interface e.g. Internet explorer Presentation data formatting e.g. compression and encoding Session handle overall connection e.g. OS, scheduling programs Transport ensures data transfer, error checking e.g. TCP Network logical addressing, routing e.g. IP (from TCP/IP)
OSI cont.
Data link prepares data for transfer, physical
addressing such as Media Access Control (MAC) Physical wires and cables, hubs, repeaters.
Embedded Communication
Point-to-point networks Each node connected to every node Simple and reliable Dedicated links make it easy to meet real-time deadlines Costly due to many wires required Shared media networks Nodes are connected via bus or other topologies Less wiring and hence cheaper Easily extendable by adding new nodes to network Complex network protocol Being the system of focus from now on
P1
P2
P1 P3
P2 P4
P1
P2
P1
P2
memory P3 P4
Internet
P3
P4
P3
P4
GREEN CAN
LIN
HMI MOST Gateway
Tuners
Playback
Concepts
Event based communication E.g. alarm, user inputs, requests for data from other systems
State based communication E.g. regular sensor readings Predictability
a while) May need acknowledgement Hard to predict delay in case of overloading (e.g. alarm)
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.
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 medium Data link (Layer 2) provides Media Access Control (MAC)
Lower level might work with bits while higher level might work with packets of data Lowest level in hierarchy Medium to carry data from one actor (device or node) to another
Physical layer
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
15
High data throughput with short distances Typically used when connecting devices on same IC or
long parallel wires result in high capacitance values which requires more time to charge/discharge Data misalignment between wires increases as length increases
16
Cheaper, less bulky More complex interfacing logic and communication protocol
Sender needs to decompose word into bits Receiver needs to recompose bits into word Control signals often sent on same wire as data increasing protocol
complexity
17
requirements. Node with pass-through traffic can be fully occupied. E.g. telephone network service
Polling [5]
Consumes bandwidth
E.g. military aircraft communication Simple slave nodes, complex master
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.
TDMA cont.
Fixed length messages (inflexible) E.g. satellite communications
Similar to token ring Token is passed via bus simultaneously Cable break can be dealt with by reconfiguration (like
detecting broadcasting signal for unique identification Bus 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)
messages (no bound) Applied in industrial and automotive Controller Area Network (CAN) and SAE standard J 1850
Nodes wait for idle channel before transmitting. When simultaneously transmission is detected, each
CSMA/CD cont.
Easy to add or take off new nodes without
initialisation and configuration Low overhead at light traffic Unbound overhead at heavy traffic (messages keeps colliding) hence low determinacy and efficiency. Requires detection circuit
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 node Rotate time slot for fairness Network return to normal state when all slots are unused.
CSMA/CA cont.
Variations Reservation CSMA no. of slots equal to no. of nodes
slots to nodes.
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
References
1. 2. 3.
4.
5. 6. 7.
Upender B, Koopman P, Embedded communication protocol options, Proc. to the 5th annual embbeded system conference, 1993 Rollins L, Embedded communication Kopetz H, Real-time system design principles for distributed embedded applications, Kluver, 1997 Liu J, Real-time systems, Prentice-Hall, 2000 Upender B, Koopman P, Communication protocols for embedded systems, Embedded systems programming, Nov 1994. Vahid F, Givargis T, Embedded system design a unified hardware/software introduction, Wiley, 2002 Bilstrup U, Real-time communication