Скачать презентацию ECE 491 — Senior Design I Lecture 10 Скачать презентацию ECE 491 — Senior Design I Lecture 10

47dba421b97940dfd7f2f177fa79c453.ppt

  • Количество слайдов: 25

ECE 491 - Senior Design I Lecture 10 - Data Communications Fall 2008 Reading: ECE 491 - Senior Design I Lecture 10 - Data Communications Fall 2008 Reading: S&R Ch. 4 (System Design) Quiz 1: Wednesday, Sept. 24 (Verilog) Ch. E Brownbag: “Working in Industry” Evan O’Brien ‘ 06, Exxon-Mobil Friday 9/19 12 -1 pm AEC 314 Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania 18042 Data Communications, early 1800 s (French Semaphore) nestorj@lafayette. edu ECE 491 Fall 2008 Lecture 10 - Data Comm. 1

Where we are } Last Time: } Verification & Testbenches } Requirements Analysis } 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 ECE 491 Fall 2008 Lecture 10 - Data Comm. 2

Network Protocols } A protocol is a set of rules for communication } Network 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 ECE 491 Fall 2008 Lecture 10 - Data Comm. 3

Layers, Protocols, and Interfaces Host 1 Layer 5 Layer 4 Layer 3 Layer 2 Layers, Protocols, and Interfaces Host 1 Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Layer 5 Protocol Layer 4 Protocol Layer 3 Protocol Layer 2 Protocol Layer 1 Protocol Host 2 Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Physical Medium ECE 491 Fall 2008 Lecture 10 - Data Comm. 4

Open Systems Interconnection (OSI) Basic Reference Model } Developed by the International Standards Organization Open Systems Interconnection (OSI) Basic Reference Model } Developed by the International Standards Organization (ISO) in 1984 } A model protocol stack } Based on seven layers ECE 491 Fall 2008 Lecture 10 - Data Comm. 5

OSI Reference Model Design Principles } A layer should be created when a different 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, 3 rd ed. , Prentice-Hall, 2000. ECE 491 Fall 2008 Lecture 10 - Data Comm. 6

OSI Reference Model Application Protocol Application Presentation Protocol Presentation Session Protocol Session Transport Protocol OSI Reference Model Application Protocol Application Presentation Protocol Presentation Session Protocol Session Transport Protocol Transport Application Presentation Session Transport Network Data Link Physical Host-Router Protocol ECE 491 Fall 2008 Internal Subnet Protocol Lecture 10 - Data Comm. 7

A Quick Tour of the OSI Layers } Physical - transmitting raw bits over 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 ECE 491 Fall 2008 Lecture 10 - Data Comm. 8

A Quick Tour of the OSI Layers (cont’d) } Transport - Controls connections for 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 ECE 491 Fall 2008 Lecture 10 - Data Comm. 9

TCP / IP } Developed in early 1980 s for “networks of networks” } TCP / IP } Developed in early 1980 s for “networks of networks” } Connected original ARPANet with various LANs } Two key protocols } TCP - Transmission Control Protocol } IP - Internet Protocol ECE 491 Fall 2008 Lecture 10 - Data Comm. 10

TCP / IP ECE 491 Fall 2008 Lecture 10 - Data Comm. 11 TCP / IP ECE 491 Fall 2008 Lecture 10 - Data Comm. 11

TCP / IP } TCP: Transmission Control Protocol } Manages setup and termination of 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 ECE 491 Fall 2008 Lecture 10 - Data Comm. 12

TCP / IP Layers } Link - Combines physical and data link layers } 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 ECE 491 Fall 2008 Lecture 10 - Data Comm. 13

IEEE 802. x Protocols } Developed to support local area networks } IEEE 802. 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 ECE 491 Fall 2008 Lecture 10 - Data Comm. 14

Comparing OSI to TCP/IP and 802. x OSI TCP/IP Application Presentation Session Transport Network Comparing OSI to TCP/IP and 802. x OSI TCP/IP Application Presentation Session Transport Network Internet Data Link Physical ECE 491 Fall 2008 Host-tonetwork Lecture 10 - Data Comm. IEEE 802. x LLC MAC PHY 15

Physical Layer Protocols } How do we communicate bits from one module to another? 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 S ECE 491 Fall 2008 R Lecture 10 - Data Comm. 16

Asynchronous Communication } Use two voltages to represent space and mark } RS-232 Standard: Asynchronous Communication } Use two voltages to represent space and mark } RS-232 Standard: Voltage range + 5 V to - 15 V (we’ll work with standard logic levels on FPGA) S ECE 491 Fall 2008 R Lecture 10 - Data Comm. 17

Lab 4 - Asynchronous Transmitter DATA START Transmitter Tx. D READY CLK ECE 491 Lab 4 - Asynchronous Transmitter DATA START Transmitter Tx. D READY CLK ECE 491 Fall 2008 Lecture 10 - Data Comm. 18

Lab 4 Design Ideas } Assume clock rate == baud rate } Use a 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 == 000001 ECE 491 Fall 2008 Lecture 10 - Data Comm. 19

Other Lab 4 Tasks } Build a testbench to test the design } Build Other Lab 4 Tasks } Build a testbench to test the design } Build a clock divider to create a 9600 Hz clock from the 50 MHz clock on the S 3 board. } Modify s 3 board. v to instantiate your transmitter with data connected to slide switches, start connected to pushbutton (debounce pushbutton if necessary) } Test on S 3 board with serial cable and Hyper. Terminal on PC ECE 491 Fall 2008 Lecture 10 - Data Comm. 20

Debugging Lab 4 } } Make sure “txd” output constraint is un-commented Double-Check the 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 • Tx. D (copy) } Constrain using pins connected to “A 2 Connector” ECE 491 Fall 2008 Lecture 10 - Data Comm. 21

Detail - A 2 Expansion Connector FPGA Pins GND VDD D 5 1 3 Detail - A 2 Expansion Connector FPGA Pins GND VDD D 5 1 3 5 2 VU 4 E 6 6 C 5 D 6 7 E 7 9 8 C 6 10 C 7 FPGA Pins ECE 491 Fall 2008 Lecture 10 - Data Comm. 22

Debugging with the Oscillocope } Transmitter Clock - is frequency right? } READY - Debugging with the Oscillocope } Transmitter Clock - is frequency right? } READY - Does it appear while START is pressed? } Tx. D (copy) - is the value correct? • Use READY to sync the scope while START is pressed • Watch transmitted waveform - is it what is expected? ECE 491 Fall 2008 Lecture 10 - Data Comm. 23

Looking Ahead to Lab 5 - Receiver ECE 491 Fall 2008 Lecture 10 - Looking Ahead to Lab 5 - Receiver ECE 491 Fall 2008 Lecture 10 - Data Comm. 24

Coming Up } More about Physical Links } Serial Receiver } Signaling Conventions } Coming Up } More about Physical Links } Serial Receiver } Signaling Conventions } Manchester Codes ECE 491 Fall 2008 Lecture 10 - Data Comm. 25