T4-DLL Error Control
T4-DLL Error Control
1)Introduction
2)Error Detection and
Correction
1
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
OSI
Application
Presentation
Session
Transport
Network
Datalink
Physical
Responsibility of Data Link Layer:
OSI
Application
LOGICAL LINK
Presentation
Session sublayer
Transport Framing
Network
Error control
Data Link
Flow control
Physical
OSI
Application
Presentation Framing
Session
Group the physical layer bit
Transport
stream into units called frames.
Network
Data Link Note that frames are nothing
Physical more than ``packets'' or
``messages''. By convention,
we'll use the term ``frames''
when discussing DLL packets.
Data Link Layer (DLL)
OSI
Application
Presentation Flow Control
Session Prevent a fast sender from
Transport overwhelming a slower
Network receiver.
Datalink For example, a
Physical supercomputer can easily
generate data faster than a
PC can consume it.
Data Link Layer (DLL)
OSI
Application
Presentation Error Detection
Session
Sender checksums the
Transport
frame and sends checksum
Network together with data.
Data Link
The checksum allows the
Physical receiver to determine when
a frame has been damaged
in transit.
Data Link Layer (DLL)
OSI
Application
Presentation Error Control
Session Receiver recomputes the
Transport checksum and compares it
Network with the received value.
Data link If they differ, an error has
Physical
occurred and the frame is
discarded.
DLL Type of service
– Unacknowledged connectionless
• No attempt to recover lost frame
• Suited for low error rate networks or for fault tolerant
applications such as voice
– Acknowledged connectionless
• Each frame is acknowledged by the receiver
• Suited for unreliable channels
– Acknowledged connection-oriented
• Ensures that
– All frames are received
– Each is received exactly once
Note
10.12
Figure 1 Single-bit error
Note
10.14
Figure 2 Burst error of length 8
A burst error is more likely to occur than a single-bit
error.
Note
Note
10.24
With k bits, we can create a combination of 2k
datawords; with n bits, we can create a combination of 2n
codewords.
10.28
The sender creates codewords out of datawords by using
a generator that applies the rules and procedures of
encoding.
10.36
Example (continued)
1. Comparing the received codeword with the first
codeword in the table (01001 versus 00000), the
receiver decides that the first codeword is not the one
that was sent because there are two different bits.
10.
The Hamming distance between two words (of the
same size) is the number of differences between the
corresponding bits.
We show the Hamming distance between two words
x and y as d(x, y).
The Hamming distance can easily be found if wc
apply the XOR operation on the two words and count
the number of Is in the result.
Note that the Hamming distance is a value greater
than zero.
Example
10.
Note
10.
Note
10.
Example 7
10.
Example 8
10.
Figure 8 Geometric concept for finding dmin in error detection
10.
M inim um Distance for Error Detection
10.
Note
10.
Example
Solution
This code guarantees the detection of up to three errors
(s = 3), but it can correct up to one error. In other words,
if this code is used for error correction, part of its capability
is wasted. Error correction codes need to have an odd
minimum distance (3, 5, 7, . . . ).
10.
LINEAR BLOCK CODES
10.
Example
10.
Example
10.
Note
10.
In this code, a k-bit dataword is changed to an n-bit
codeword where n = k + 1.
10.
Figure 10 Encoder and decoder for simple parity-check code
10.
Example
10.
Example (continued)
10.
Note
10.
A better approach is the two-dimensional parity
check.
In this method, the dataword is organized in a table
(rows and columns). In Figure, the data to be sent,
five 7-bit bytes, are put in separate rows.
For each row and each column, 1 parity-check bit is
calculated.
The whole table is then sent to the receiver, which
finds the syndrome for each row and each column.
As Figure shows, the two-dimensional parity check
can detect up to three errors that occur anywhere in
the table (arrows point to the locations of the created
nonzero syndromes).
However, errors affecting 4 bits may not be detected.
Hamming Code
Single-bit error
Error
Detection
10.
Table 5 Logical decision made by the correction logic analyzer
10.
Example 13
10.