ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan...
-
Upload
lilian-pitts -
Category
Documents
-
view
215 -
download
1
Transcript of ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan...
ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Big Picture: Lab 3
Networks (OSI-view)
physicaldata linknetworktransport
presentationapplication
session
physicaldata linknetworktransport
presentationapplication
session
physicaldata linknetworkIP
2ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Networking for Embedded Systems
Why we use networks. Network abstractions, OSI. Embedded Networks and TCP/IP.
3ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Metcalfe’s Rule Metcalfe: the “value” of a network is proportional
to the square of the number of nodes• adding a node benefits existing nodes• the larger the network the larger the benefit
4ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Networks in embedded systems
Internet-enabled embedded system: any embedded system that includes an Internet interface (e.g., burglar alarm system).
Internet appliance: embedded system designed for a particular Internet task (e.g. email).• UMASS ECE SDP Internet-connected Refrigerator
Laser printer. Home automation system.
5ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Network abstractions
International Standards Organization (ISO) developed the Open Systems Interconnection (OSI) model to describe networks:• 7-layer model. Provides a standard way to classify network
components and operations. It is a conceptual model only.
6ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
OSI model
physical mechanical, electrical
data link reliable data transport
network end-to-end service
transport connections
presentation data format
session application dialog control
application end-user interface
7ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Hardware network architectures
Many different types of networks based on• topology;• scheduling of communication; and• routing.
8ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Point-to-point networks
One source, one or more destinations:
PE 1 PE 2 PE 3
link 1 link 2
9ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Bus networks
Common physical connection:
PE 1 PE 2 PE 3 PE 4
header address data ECC packet format
10ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Ethernet – a Physical Layer
Dominant non-telephone LAN. Versions: 10 Mb/s, 100 Mb/s, 1 Gb/s, 10 Gb/s,
100Gb/s. Goal: reliable communication over an unreliable
medium.
11ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Ethernet topology
Bus-based system
A B C
12ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Ethernet performance
Carrier sense multiple access with collision detection (CSMA-CD)• sense collisions;• exponentially back off in time;• retransmit.
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.
13ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Internet Protocol – a Network Layer
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.
14ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
IP in communication
physical
data link
network
transport
presentation
application
session
physical
data link
network
transport
presentation
application
session
physical
data link
network
node A router node B
IP
15ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
IP packet
Includes:• version, service type, length• time to live, protocol• source and destination address (IP addresses)• data payload
Maximum data payload is 65,535 bytes.
16ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
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).
17ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
TCP/IP Basics : Data Encapsulation
Application Data
TCP Header
IP Header
Ethernet Header
Application Data
Application Data
Application Data
TCP Header
TCP HeaderIP Header Ethernet Trailer
Application Data
App Header
App Header
App Header
App Header
18ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Software Abstractions - Message-based
Transport layer provides message-based programming interface:• send_msg(adrs,data1); Data must be broken into packets at source,
reassembled at destination.
19ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
What’s next ?
Lab 3 details
20ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Backup
21ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Ethernet packet format
preamblestart
framesourceadrs
destadrs
datapayload
length padding CRC
22ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Embedding TCP/IP – The Advantages
Internet
� Provides a universal, flexible, User Interface for the Device
� UI can be exposed using a standard browser� �Opens possibilities of remote diagnostics and software upgrade
23ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
Embedding TCP/IP – The issues
� Resource Limitations– Code Size– Data Size– CPU Processing capacity
� Operating System Services– Timer Services– Memory Management– Network Drivers
� Processing Latency– Layer to layer buffering
24ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
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.
A,B,C A,B,C
fixed
round-robin
A B C A B C
A B C AB C
25ECE 354 Copyright ECE Department, some slides modified from W. Wolf, Computers as Components, Morgan Kaufmann, 2005
To Sum Up
TCP/IP is close to 20 years old, but it has outlasted more modern protocols and has become the de - facto standard for the internet
Proliferation of internet enabled devices is predicted in the next wave of the internet
As developers try to get their embedded devices on the net, they face the issue of the networking problem may exceed the application problem
Practical solutions are currently available to connect embedded devices to the internet