Download presentation
Presentation is loading. Please wait.
1
Distributed Embedded Systems
2
Class Goals At the conclusion of this class, the student should be able to: Understand differences between co-processors and accelerators Understand how to interface an accelerator to a CPU Compare accelerated single-threaded and multi-threaded applications Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
3
Topic Outline Networking Embedded Systems Networking Fundamentals
The I2C Bus Ethernet Internet Protocol (IP) Networks Analyses of Networks Summary Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
4
Networking Embedded Systems
5
Network Elements ES Each embedded system (ES) may communicate with any other ES in the network. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
6
Networks in embedded systems
initial processing more processing PE sensor PE PE actuator Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
7
Why distributed? Resource constrained platforms cannot perform the entire application Automated application updates Functionality is widely varied among a set of embedded platforms Timing constraints Centralized control of resources may increase network traffic loading Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
8
Embedded System in a Bakery
App Server PE1 PE3 PE4 PE2 PE5 Network Measure Temp Adjust Mix Dough Muffin Throughput Cook Time Recipes Orders … Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
9
Networking Fundamentals
10
The OSI Seven Layer Model
International Standards Organization (ISO) developed the Open Systems Interconnection (OSI) model to describe networks: Provides a standard way to classify network components and operations. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
11
OSI model application end-use interface presentation data format
session application dialog control transport connections network end-to-end service data link reliable data transport physical mechanical, electrical Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
12
Links Sources Network protocols. Files Files HTTP TCP IP packets
Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
13
Distributed Network Architectures
Many different types of networks: topology; scheduling of communication; routing. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
14
Point-to-point networks
One source, one or more destinations, no data switching (serial port): PE 3 PE 1 PE 2 link 1 link 2 Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
15
Bus networks Common physical connection: PE 1 PE 2 PE 3 PE 4
packet format header address data ECC EOT Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
16
Bus arbitration Fixed: Same order of resolution every time.
Fair: every PE has same access over long periods. round-robin: rotate top priority among Pes. fixed A B C A B C round-robin A B C B C A t A,B,C A,B,C Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
17
Message-based programming
Transport layer provides message-based programming interface: send_msg(adrs,data1); Data must be broken into packets at source, reassembled at destination. Data-push programming: make things happen in network based on data transfers. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
18
The I2C Bus
19
I2C Bus Serial communications bus
Kbps operation (100 Kbps typical) SDA – Serial DAta Line SCL – Serial CLock Line Loosely-defined electrical specification Low implementation cost Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
20
I2C bus Characteristics:
Supports multiple bus masters fixed-priority arbitration. Several microcontrollers come with built-in I2C controllers Each I2C device is given a unique bus address Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
21
I2C physical layer master A master B SDA SCL slave 1 slave 2
Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
22
I2C data format u u /V t/s /V t/s MSB LSB Y. Williams/J. Hoenig
Csci-339/HFU, Spring 2007
23
I2C electrical interface
Open collector interface: + SDA + SCL Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
24
I2C signaling Sender pulls down bus for 0.
Sender listens to bus---if it tried to send a 1 and heard a 0, someone else is simultaneously transmitting. Transmissions occur in 8-bit bytes. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
25
I2C data link layer Every device has an address (7 bits in standard, 10 bits in extension) LSB of address signals read or write General call address allows broadcast Address is the indicator for a “general call” or broadcast Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
26
I2C bus arbitration Sender listens while sending address.
When sender hears a conflict, if its address is higher, it stops signaling. Low-priority senders relinquish control early enough in clock cycle to allow bit to be transmitted reliably. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
27
I2C transmissions (multi-) byte write S Adrs Word-adr Data P Start
Write (LSB of address) Stop (multi-) byte write S Adrs Word-adr Data P Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
28
I2C transmissions Write addreses, then read S Adrs Word-adr S Adrs 1
Start Write (LSB of address) Read (LSB of address) Stop Write addreses, then read S Adrs Word-adr S Adrs 1 Data P Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
29
Ethernet
30
Ethernet Dominant LAN technology Typical: 10/100 Mb/s and 1 Gb/s
Future: 10 Gbps and 40 Gbps Goal: reliable communication over an unreliable medium. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
31
Ethernet topology Bus-based system, several possible physical layers:
Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
32
CSMA/CD Carrier sense multiple access with collision detection:
sense collisions; exponentially back off in time; retransmit. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
33
Ethernet packet format
preamble start frame source adrs dest adrs length data payload padding CRC Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
34
Ethernet performance Quality-of-service tends to non-linearly decrease at high load levels. Can’t guarantee real-time deadlines. However, may provide very good service at proper load levels. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
35
Internet Protocol (IP) Networks
36
Internet Protocol Internet Protocol (IP) is basis for Internet.
Provides an internetworking standard: between two Ethernets, Ethernet and token ring, etc. Higher-level services are built on top of IP. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
37
IP in communication application application presentation presentation
session session IP transport transport network network network data link data link data link physical physical physical node A router node B Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
38
IP packet Includes: Maximum data payload is 65,535 bytes.
version, service type, length time to live, protocol source and destination address data payload Maximum data payload is 65,535 bytes. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
39
IP addresses 32 bits in early IP, 128 bits in IPv6.
Typically written in form xxx.xx.xx.xx. Names (foo.baz.com) translated to IP address by domain name server (DNS). Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
40
Internet routing Best effort routing: Routing can vary:
doesn’t guarantee data delivery at IP layer. Routing can vary: session to session; packet to packet. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
41
Higher-level Internet services
Transmission Control Protocol (TCP) provides connection-oriented service. Quality-of-service (QoS) guaranteed services are under development. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
42
The Internet service stack
FTP HTTP SMTP telnet SNMP TCP UDP User Datagram Protocol IP Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
43
Analyses of Networks
44
Networks Network-based design. Internet-enabled systems.
Communication analysis. System performance analysis. Internet-enabled systems. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
45
Communication analysis
First, understand delay for single message. Delay for multiple messages depends on: network protocol; devices on network. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
46
Message delay Assume: Delay: single message; no contention.
tm = tx + tn + tr = xmtr overhead + network xmit time + rcvr overhead Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
47
Example: I2C message delay
Network transmission time dominates. Assume 100 kbits/sec, one 8-bit byte. Number of bits in packet: npacket = start + address + data + stop = = 18 bits Time required to transmit: 1.8 x 10-4 sec. 20 instructions on 8 MHz controller adds 2.5 x 10-6 delay on xmtr, rcvr. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
48
Multiple messages If messages can interfere with each other, analysis is more complex. Model total message delay: ty = td + tm = wait time for network + message delay Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
49
Arbitration and delay Fixed-priority arbitration introduces unbounded delay for all but highest-priority device. Unless higher-priority devices are known to have limited rates that allow lower devices to transmit. Round-robin arbitration introduces bounded delay proportional to N. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
50
Example: adjusting messages to reduce delay
Task graph: Network: 3 4 execution time Transmission time = 4 allocation P1 P2 M1 M2 M3 d1 d2 P3 Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
51
Initial schedule M1 P1 M2 P2 M3 P3 network d1 d2 Time = 15 time 5 10
time 5 10 15 20 Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
52
New design Modify P3: reads one packet of d1, one packet of d2
computes partial result continues to next packet Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
53
New schedule M1 P1 M2 P2 M3 P3 P3 P3 P3 network d1 d2 d1 d2 d1 d2 d1
Time = 12 time 5 10 15 20 Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
54
Hardware platform design
Need to choose: number and types of PEs; number and types of networks. Evaluate a platform by allocating processes, scheduling processes and communication. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
55
I/O-intensive systems
Start with I/O devices, then consider computation: inventory required devices; identify critical deadlines; chooses devices that can share PEs; analyze communication times; choose PEs to go with devices. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
56
Computation-intensive systems
Start with shortest-deadline tasks: Put shortest-deadline tasks on separate PEs. Check for interference on critical communications. Allocate low-priority tasks to common PEs wherever possible. Balance loads wherever possible. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
57
Internet-enabled embedded system
Internet-enabled embedded system: any embedded system that includes an Internet interface (e.g., refrigerator). Internet appliance: embedded system designed for a particular Internet task (e.g. ). Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
58
Examples Laser printer. Personal digital assistant (PDA).
Home automation system. Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
59
Summary Resource constrained embedded systems may require communication with other systems to complete a job The selected networking strategy determines the overall performance of a set of networked embedded systems The designer must consider system performance as well as the cost to implement Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
60
Assignment Work on final projects and term papers
Complete remaining class presentations Schedule to present final projects/papers Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
61
Questions ? Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
62
Acknowledgements Some of the presentation materials were provided by Morgan Kaufmann Publishers Additional material was developed by the GWU Computer Science course instructors Y. Williams/J. Hoenig Csci-339/HFU, Spring 2007
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.