Download presentation
Presentation is loading. Please wait.
1
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania 18042 nestorj@lafayette.edu ECE 491 - Senior Design I Lecture 10 - Data Communications Fall 2008 Reading:S&R Ch. 4 (System Design) Quiz 1:Wednesday, Sept. 24 (Verilog) ChE Brownbag: “Working in Industry” Evan O’Brien ‘06, Exxon-Mobil Friday 9/19 12-1pm AEC 314 Data Communications, early 1800s (French Semaphore)
2
ECE 491 Fall 2008Lecture 10 - Data Comm.2 Where we are Last Time: Verification & Testbenches Requirements Analysis Today: Network Protocols - Overview Data Communication - Physical Layer Asynchronous Serial Communication (RS-232) Manchester Codes Discuss Lab 4
3
ECE 491 Fall 2008Lecture 10 - Data Comm.3 Network Protocols A protocol is a set of rules for communication Network protocols specify how communication takes place between computers over a network Network protocols are divided into layers that form a protocol stack
4
ECE 491 Fall 2008Lecture 10 - Data Comm.4 Layers, Protocols, and Interfaces Layer 1 Layer 2 Layer 3 Layer 4 Layer 5 Physical Medium Layer 5 Protocol Host 2 Layer 1 Layer 2 Layer 3 Layer 4 Layer 5 Host 1 Layer 4 Protocol Layer 3 Protocol Layer 2 Protocol Layer 1 Protocol
5
ECE 491 Fall 2008Lecture 10 - Data Comm.5 Open Systems Interconnection (OSI) Basic Reference Model Developed by the International Standards Organization (ISO) in 1984 A model protocol stack Based on seven layers
6
ECE 491 Fall 2008Lecture 10 - Data Comm.6 OSI Reference Model Design Principles A layer should be created when a different level of abstraction is needed Each layer should perform a well-defined function The function of each layer should help define internationally standardized protocols Layer boundaries should be chosen to minimize information flow across interfaces Source: A. Tannenbaum, Computer Networks, 3rd ed., Prentice-Hall, 2000.
7
ECE 491 Fall 2008Lecture 10 - Data Comm.7 OSI Reference Model Physical Data Link Network Transport Session Host-Router Protocol Presentation Application Physical Data Link Network Transport Session Presentation Application Transport Protocol Session Protocol Presentation Protocol Application Protocol Physical Data Link Network Physical Data Link Network Internal Subnet Protocol
8
ECE 491 Fall 2008Lecture 10 - Data Comm.8 A Quick Tour of the OSI Layers Physical - transmitting raw bits over a communication channel Electrical and physical specification of devices Data Link - transform raw transmission facility into one that appears error-free. Data frames Acknowledgement Frames Error Detection and Correction Network Layer - Controls subnet operation Packet routing Congestion Control
9
ECE 491 Fall 2008Lecture 10 - Data Comm.9 A Quick Tour of the OSI Layers (cont’d) Transport - Controls connections for Session Layer Session - Establishes sessions between users on different machines Presentation - performs common functions warranting general solution Application - High-level, commonly needed protocols
10
ECE 491 Fall 2008Lecture 10 - Data Comm.10 TCP / IP Developed in early 1980s for “networks of networks” Connected original ARPANet with various LANs Two key protocols TCP - Transmission Control Protocol IP - Internet Protocol
11
ECE 491 Fall 2008Lecture 10 - Data Comm.11 TCP / IP
12
ECE 491 Fall 2008Lecture 10 - Data Comm.12 TCP / IP TCP: Transmission Control Protocol Manages setup and termination of connections Ensures “error-free” transmission Sent packets must be acknowledged Unacknowledged packets are resent Manages out-of-order packets IP: Internet Protocol Uses globally unique addresses i.e. 139.147.205.3 Sends packets from source to target IP address Delivery of packets not guaranteed
13
ECE 491 Fall 2008Lecture 10 - Data Comm.13 TCP / IP Layers Link - Combines physical and data link layers Internet - Transfers data from source network to destination network Transport - Handles end-to-end connections Application - High-level, commonly needed protocols
14
ECE 491 Fall 2008Lecture 10 - Data Comm.14 IEEE 802.x Protocols Developed to support local area networks IEEE 802.3 - Ethernet (1983-) IEEE 802.11 - Wireless (1997-) Implements only lower levels of stack Logical Link Control (LLC) - Multiplexes protocols & supports flow control Media Access Control (MAC) - Transfers data frames Physical (PHY) - Physical connection
15
ECE 491 Fall 2008Lecture 10 - Data Comm.15 Comparing OSI to TCP/IP and 802.x Physical Data Link Network Transport Session OSI Presentation Application Host-to- network Internet Transport TCP/IP Application PHY MAC LLC IEEE 802.x
16
ECE 491 Fall 2008Lecture 10 - Data Comm.16 Physical Layer Protocols How do we communicate bits from one module to another? Physical Wiring Modulation Scheme Communication Protocol We’ll look at one alternative today: Async. Serial SR
17
ECE 491 Fall 2008Lecture 10 - Data Comm.17 Asynchronous Communication Use two voltages to represent space and mark RS-232 Standard: Voltage range + 5V to - 15V (we’ll work with standard logic levels on FPGA) SR
18
ECE 491 Fall 2008Lecture 10 - Data Comm.18 Lab 4 - Asynchronous Transmitter Transmitter DATA START READY TxD CLK
19
ECE 491 Fall 2008Lecture 10 - Data Comm.19 Lab 4 Design Ideas Assume clock rate == baud rate Use a 10-bit “shift register” Start bit (always 0) Data (8 bits) Stop bit (always 1) General Operation Load when START==1 Stop shifting when shift register == 0000000001
20
ECE 491 Fall 2008Lecture 10 - Data Comm.20 Other Lab 4 Tasks Build a testbench to test the design Build a clock divider to create a 9600Hz clock from the 50MHz clock on the S3 board. Modify s3board.v to instantiate your transmitter with data connected to slide switches, start connected to pushbutton (debounce pushbutton if necessary) Test on S3 board with serial cable and HyperTerminal on PC
21
ECE 491 Fall 2008Lecture 10 - Data Comm.21 Debugging Lab 4 Make sure “txd” output constraint is un-commented Double-Check the Code Double-Check the Simulation Check outputs on the oscilloscope Add output ports for: Transmitter Clock READY TxD (copy) Constrain using pins connected to “A2 Connector”
22
ECE 491 Fall 2008Lecture 10 - Data Comm.22 Detail - A2 Expansion Connector GND 1 2 VU 4 E6 VDD 3 D5 5 6 C5 D6 7 8 C6 10 C7 E7 9 FPGA Pins
23
ECE 491 Fall 2008Lecture 10 - Data Comm.23 Debugging with the Oscillocope Transmitter Clock - is frequency right? READY - Does it appear while START is pressed? TxD (copy) - is the value correct? Use READY to sync the scope while START is pressed Watch transmitted waveform - is it what is expected?
24
ECE 491 Fall 2008Lecture 10 - Data Comm.24 Looking Ahead to Lab 5 - Receiver
25
ECE 491 Fall 2008Lecture 10 - Data Comm.25 Coming Up More about Physical Links Serial Receiver Signaling Conventions Manchester Codes
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.