Physical Layer Data Encoding Transmission 1 Network Interface

  • Slides: 21
Download presentation
Physical Layer: Data Encoding & Transmission 1

Physical Layer: Data Encoding & Transmission 1

Network Interface Card (NIC) Link Interface CPU cache Link interface Bus interface NIC Memory

Network Interface Card (NIC) Link Interface CPU cache Link interface Bus interface NIC Memory I/O Bus Link I/O Bus Interface PCI Link Interface • LL in part, PL in total are implemented in NIC – Ethernet card, 802. 11 card, … – NIC is semi-autonomous • Listens to the link independent of the CPU • Talks to CPU after reception of a new frame • CPU talks to the card to send a frame – Has connectivity to both the I/O bus and the network link 2

Steps in Transmission of a Datagram to a Neighbor Datagram H Y LL Datagram

Steps in Transmission of a Datagram to a Neighbor Datagram H Y LL Datagram LL H Datagram Encode Bits to the Link Datagram All bits in D’ OK? Detected error D’ EDC PL PL N EDC‘ Decode Bits from the Link Bit error prone link 3

Encoding - Definitions • Data: Something which carries meaning – Can be analog, e.

Encoding - Definitions • Data: Something which carries meaning – Can be analog, e. g. , radio, TV signals or digital such as data files etc. – For this course, we are ONLY interested in digital data encoding • Signal: Encoded data, i. e. , what is transferred on the link (wired or wireless) – Analog: Represents data with continuously varying electromagnetic waves – Digital: Represents data with a sequence of voltage pulses Datagram H Datagram LL Frame EDC Add Framing Information LL Encode Bits to the Link PL Link 4

Encoding Digital Data • Digital Data (0 s and 1 s) can be encoded

Encoding Digital Data • Digital Data (0 s and 1 s) can be encoded as an Analog Signal – Signal on the link is an electromagnetic wave of some frequency – Signal can also be photonic pulses of a given wavelength over optical fiber • 3 general methods – Amplitude Shift Keying – Frequency Shift Keying – Phase Shift Keying 5

Digital Data to Analog Signal: ASK Digital Data = m(t) Modem Analog Signal =

Digital Data to Analog Signal: ASK Digital Data = m(t) Modem Analog Signal = s(t) = A cos(2*PI*fc*t) – binary 1 s(t) = 0 – binary 0 6

Digital Data to Analog Signal: FSK Digital Data = m(t) Modem Analog Signal =

Digital Data to Analog Signal: FSK Digital Data = m(t) Modem Analog Signal = s(t) = A cos(2*PI*f 1*t) – binary 1 s(t) = A cos(2*PI*f 2*t) – binary 0 7

FDM + FSK on Voice Grade Line • Full-duplex FSK transmission on a Voice-Grade

FDM + FSK on Voice Grade Line • Full-duplex FSK transmission on a Voice-Grade Line: – The frequency band 300 Hz-3400 Hz is divided into to halves: • 300 Hz-1850 Hz & 1850 -3400 Hz – Frequency Division Multiplexing – Then – Frequencies 2025 & 2225 are used to encode 1 and 0 in one direction – Frequencies 1070 & 1270 are used to encode 1 and 0 in the other direction 8

Digital Data to Analog Signal: PSK Digital Data Analog Signal Modem s(t) = A

Digital Data to Analog Signal: PSK Digital Data Analog Signal Modem s(t) = A cos(2*PI*fc*t + PI) – binary 1 s(t) = A cos(2*PI*fc*t) – binary 0 QPSK uses s(t) = A cos(2*PI*fc*t + PI/4) – binary 11 s(t) = A cos(2*PI*fc*t + 3*PI/4) – binary 10 s(t) = A cos(2*PI*fc*t + 5*PI/4) – binary 00 s(t) = A cos(2*PI*fc*t + 7*PI/4) – binary 01 • Each signaling element carries 2 data elements – – Signaling element rate: Baud-rate Data element rate: Bit-rate 9

Encoding Digital Data • Digital Data (0 s and 1 s) can also be

Encoding Digital Data • Digital Data (0 s and 1 s) can also be encoded as a “Digital Signal” – – Signal on the link are discrete, discontinuous voltage pulses Each pulse is a signal element Binary data encoded into signal elements E. g. , 2 voltage levels, one of them representing digital 0, the other one representing digital 1 • Lots of different encoding methods – – – – Non-Return to Zero (NRZ) Manchester Encoding 4 B/5 B NRZ-I NRZ-M Bi-Phase-Mark, Bi-Phase-Space Differential Bi-Phase-Space, Differential Bi-Phase-Mark … 10

Digital Data to Digital Signal: NRZ Digital Data Digital Signal Encoder • Non-Return to

Digital Data to Digital Signal: NRZ Digital Data Digital Signal Encoder • Non-Return to Zero (NRZ) – 1=high signal (+5 V), 0=lower signal (-5 V) – One-to-one correspondence between data & signal 0 1 0 0 1 1 0 0 0 1 1 Digital Data Digital Signal 11

Manchester Encoding • Manchester Encoding – Used in Ethernet – 0 is encoded as

Manchester Encoding • Manchester Encoding – Used in Ethernet – 0 is encoded as low to high transition – 1 is encoded as high to low transition – Not very efficient • Signaling rate (baud-rate) is twice the data rate (bit-rate) 0 1 0 0 1 1 0 0 0 1 1 Digital Data Clock Digital Signal 12

4 B/5 B • Attempts to address the inefficiency of the Manchester encoding without

4 B/5 B • Attempts to address the inefficiency of the Manchester encoding without suffering from the problem of having extended durations of high or low signals as was the case in NRZ • Idea is to insert extra bits into the bit stream so as to break up long sequences of 0 s and 1 s – Specifically, every 4 -bit of actual data is encoded into a 5 -bit code that is then transmitted to the receiver using NRZI 4 -bit Data Symbol 0000 0001 0010 0011 0100 0101 0110 0111 5 -bit Code 11110 01001 10100 101010 01011 01110 01111 4 -bit Data Symbol 1000 1001 1010 1011 1100 1101 1110 1111 5 -bit Code 10010 10011 10110 10111 11010 11011 11100 11101 13

Encoding Digital Data • Why use an analog signal to carry digital data? –

Encoding Digital Data • Why use an analog signal to carry digital data? – Because some mediums only propagate analog signals • Optical fiber, air (unguided media) – Because the network was designed to receive, switch and transmit analog signals • PSTN handles analog signals in the voice range of about 300 -3400 Hz. • Why do digital data-to-digital signal encoding? – Equipment for encoding digital data into digital signal is less complex and less expensive 14

Transmission of Encoded Data Sender Receiver Digital Signal NRZ • After encoding the digital

Transmission of Encoded Data Sender Receiver Digital Signal NRZ • After encoding the digital data, the sender simply puts the signal on the wire as shown above • How does the receiver decode this signal? – Receiver must sample on the middle of each signaling element as shown above • Problem: – How do you synchronize the sender & receiver clocks? 15

Sender/Receiver Clocking • Timing problems require a mechanism to synchronize the sender and the

Sender/Receiver Clocking • Timing problems require a mechanism to synchronize the sender and the receiver • Two mechanisms – Provide a separate line to send the clock signal from the sender to the receiver. The receiver then uses the same clock to decode the incoming signal • OK for short distances, but not practical for long distances • Way too $$ – Let the sender and receiver use independent clocks • Independent clocks can easily get out of sync. Then, • Have the receiver synch its clock from the incoming signal • Called Self-Clocking 16

Self-Clocking Transmission • Two ways to sync the sender and the receiver during self-clocking

Self-Clocking Transmission • Two ways to sync the sender and the receiver during self-clocking transmission – Asynchronous Transmission • Data transmitted one character at a time with start/stop bits – Each char is 5 to 8 bits • Timing only needs to be maintained within each character • Re-sync after each character – Synchronous Transmission • Data transmitted as a stream of bits with no start or stop bits • The receiver must synch itself using the incoming signal – Signal must have enough transitions to let the receiver sync itself from the signal 17

Asynchronous (diagram) 18

Asynchronous (diagram) 18

Asynchronous - Behavior • In a steady stream, interval between characters is uniform (length

Asynchronous - Behavior • In a steady stream, interval between characters is uniform (length of stop element) • In idle state, receiver looks for transition 1 to 0 – Start bit • Then samples next 7 or 8 intervals (char length) • Then looks for next 1 to 0 for next char • • • Simple Cheap Overhead of 2 or 3 bits per char (~20%) Good for data with large gaps (keyboard) Used in RS-232 Serial Port Communication 19

Synchronous Transmission • Block of data transmitted without start or stop bits • How

Synchronous Transmission • Block of data transmitted without start or stop bits • How to synchronize clocks? – Need to have enough transitions on the signal • Manchester encoding: a transition for every bit makes clock recovery easy • 4 B/5 B: Make sure there will be enough transitions within the signal regardless of the bit-stream, while keeping the overhead at 20% -- Used by some Ethernets • NRZ: Long stream of 0’s or 1’s make clock recovery almost impossible. So NRZ is almost never used in synchronous transmission 20

Summary • Covered Digital Data Encoding Methods – Digital Data-to-Analog Signal Encoding (Modulation) •

Summary • Covered Digital Data Encoding Methods – Digital Data-to-Analog Signal Encoding (Modulation) • ASK • FSK • PSK – Digital Data-to-Digital Signal Encoding • • NRZ Manchester 4 B/5 B … • Covered transmission of encoded data over the link – Asynchronous Transmission: Data transmitted one character at a time with start/stop bits – Synchronous transmission: Data transmitted as a stream of bits with no start or stop bits 21