Beruflich Dokumente
Kultur Dokumente
DLC
FRAME
OBJECTIVE: PROVIDE AN
ERROR FREE BIT PIPE
PACKET
HEADER
SEQUENCE
NUMBERS
ECE/CSC 570, NC State University
TRAILER
CRC
DLC
DLC
UNRELIABLE
BIT PIPE
MAC
MAC
PHYSICAL
PHYSICAL
ECE/CSC 570, NC State University
Framing
Error Control
Flow Control
Service types
n
Services
Regular bulk postal mail
Services (2)
n
Reliable pipe !
Framing
n
Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receivers memory after de-stuffing.
Error-Correcting Codes
Hamming Code
Error-Detecting Codes
Parity Check
Cyclic Redundancy Check (CRC)
Properties
n
Definitions
n
Definitions (2)
n
1 p e
pe
pe
1
1 p e
n
(1 p e )
Three values are then received for each bit and the receiver
uses a majority vote on each bit.
Price?
The useful transmission rate has been reduce by a factor
of 3.
sk
CODER
s1 s2
sk c
s21 s 22
s
s 31
31
M
M
s n1 s n2
r1 r2
s 23 L s2k
s 33 L s3k
M
sn3
M
M
L snk
r3
rk
c2
c3
cn
c n +1
ci = si1 si 2 si 3 L sik
rj = s1 j s2 j s3 j L snj
ECE/CSC 570, NC State University
1
0
0
0
1
0
1001010
0111010
1110001
1000111
0011001
1011111
1
0
0
0
1
0
Horizontal checks
ci = s i1 s i 2 s i 3 L s ik
Vertical checks
rj = s1j s 2 j s3 j Lsnj
If the bit in each
circle is changed,
all parity checks
are still satisfied
Observations
n
Original code
n
Codeword
n
n
1234567
1001000
1 2 3 4 5 6 7 8 9 10 11
xx1x001x 0 0 0
The rest (3,5,6,7) are filled up with the m (=7) data bits
Any k that is not a power of 2 can be written as a sum of
powers of 2.
Data bit in k will contribute to some of the check bits.
E.g., k = 11 = 1+2+8, which means it contributes to the check bits 1, 2, 8.
1 2 3 4 5 6 7
P P D P D D D 7-bit codeword
Check bit
contributed
P - D - D - D
(Even Parity)
- P D -
- D D
(Even Parity)
- P D D D
(Even Parity)
1 2 3 4 5 6 7
7-bit codeword
Check bit
contributed
- 1
(Even Parity)
- 1 1
(Even Parity)
- 0 0 1 1
(Even Parity)
0 1 1 0 0 1 1
0 - 1 - 0
- 1 1 -
7-bit codeword
Parity
computed
(Even Parity)
(NOT!) 1
1 1
1 1
(Even Parity)
(OK!) 0
0 1 1 1
(Even Parity)
(NOT!) 1
The bad parity bits labeled 101 point directly to the bad bit
(101 = 5 !)
CRC (Contd)
n
G(x) = xr+gr-1xr-1++g1x+1
G(x) has at least two nonzero terms (i.e., xr and 1)
Example of Polynomial
x2+ x
x3 + x2 + 1 x5 + x3
5
4
x + x
x
Example: r=3 and k=3
G(x) = 1 + x + x
2
M(x) = 1 + x 2
( m2m1m0=101)
+ x
+ x + x
3
x + x + x
2
x + x
4
Code-polynomial
T(x) = x5 + x3 +x2 + x
ECE/CSC 570, NC State University
Remainder
Error-Detecting Codes
Calculation of
the polynomial
code checksum.
1.
2.
3.
11010110110000
1110
11010110111110
10011
1100001010
11010110111110
10011
10011
10011
00001
00000
00010
00000
00101
00000
01011
00000
10111
10011
01001
00000
10011
Channel
Y(x)=T(x)+E(x)
Y ( x)
T ( x) E ( x)
+
Re maider[
] = Re mainder[
]
G ( x)
G ( x ) G ( x)
E ( x)
= Re mainder[
]
G ( x)
n
Single Error
n
Double Errors
E ( x ) = x i + x j = x j ( x i j + 1)
n
where i > j
E.g., x15+x14+1 will not divide xk+1 for any value of k below
32,768!
ECE/CSC 570, NC State University
CRC Properties
n
Standards
n
Block Codes
n
M(x) x
R(x) = Rem{
}
G(x)
g1
In p u t
g2
+
g m -1
+
...
Example: r = 3 and k = 3
G(x) = 1 + x + x
2
M(x) = 1 + x
Input
Initial values
Input 101000
Remainder
ECE/CSC 570, NC State University
+
0
1
0
1
1
1
0
0
0
1
0
1
1
1
0
0
0
1
1
0
1
r(x) = x2+x
Convolutional Codes
Decoding:
Maximum likelihood detection
Trellis decoding