encoding and decoding of cyclic codes
TRANSCRIPT
© M
atth
ieu
Bloc
h 20
10
Hardware Encoding and Decoding of Cyclic Codes
© M
atth
ieu
Bloc
h 20
10
Cyclic Structure
• Polynomial representation enables efficient hardware configuration for encoding and decoding
• Some of these hardware architectures will reappear later for convolutional codes
© M
atth
ieu
Bloc
h 20
10
Building Blocks
• One-bit memory storage
• Adder
• Multiplier
D
+
a
1bit stored
until next clock
© M
atth
ieu
Bloc
h 20
10
1. Encoding of Cyclic Codes
© M
atth
ieu
Bloc
h 20
10
• Polynomial multiplication
• “Last element first” architecture
• n clocks
DD D D
+ + + + +
Non-Systematic Encoding
c(x ) = m(x )g(x )
g
n!k g
n!k!1 g
n!k!2 g
2 g
1 g
0
c(x )
m(x )
© M
atth
ieu
Bloc
h 20
10
Encoding
• Clock k bits of m(x) successively to obtain last k coefficients of c(x)
• Need n-k extra clocks to obtain remaining coefficients
© M
atth
ieu
Bloc
h 20
10
• Generator:
• Message
Encoding Example
g(x ) =1+ x + x3
(n = 7)
m(x ) =1+ x + x3 !1101
0 0 0
0 0 0
0 DD D
+ +
1 1 1
© M
atth
ieu
Bloc
h 20
10
• Generator:
• Message
Encoding Example
g(x ) =1+ x + x3
(n = 7)
0 0 0
1 1 1
1 DD D
+ +
1 1 1
c(x ) = x6
m(x ) =1+ x + x3 !1101
© M
atth
ieu
Bloc
h 20
10
• Generator:
• Message
Encoding Example
g(x ) =1+ x + x3
(n = 7)
1 0 0
0 0 0
0 DD D
+ +
1 1 1
c(x ) = 0· x5 + x6
m(x ) =1+ x + x3 !1101
© M
atth
ieu
Bloc
h 20
10
• Generator:
• Message
Encoding Example
g(x ) =1+ x + x3
(n = 7)
0 1 0
0 0 1
1 DD D
+ +
1 1 1
c(x ) = 0· x 4 + 0· x5 + x6
m(x ) =1+ x + x3 !1101
© M
atth
ieu
Bloc
h 20
10
• Generator:
• Message
Encoding Example
g(x ) =1+ x + x3
(n = 7)
1 0 1
0 1 1
1 DD D
+ +
1 1 1
c(x ) = 0· x3 + 0· x 4 + 0· x5 + x6
m(x ) =1+ x + x3 !1101
© M
atth
ieu
Bloc
h 20
10
• Generator:
• Message
Encoding Example
g(x ) =1+ x + x3
(n = 7)
1 1 0
1 1 0
0 DD D
+ +
1 1 1
c(x ) = x 2 + 0· x3 + 0· x 4 + 0· x5 + x6
m(x ) =1+ x + x3 !1101
© M
atth
ieu
Bloc
h 20
10
• Generator:
• Message
Encoding Example
g(x ) =1+ x + x3
(n = 7)
0 1 1
0 1 0
0 DD D
+ +
1 1 1
c(x ) = 0· x + x 2 + 0· x3 + 0· x 4 + 0· x5 + x6
m(x ) =1+ x + x3 !1101
© M
atth
ieu
Bloc
h 20
10
• Generator:
• Message
Encoding Example
g(x ) =1+ x + x3
(n = 7)
0 0 1
1 0 0
0 DD D
+ +
1 1 1
c(x ) =1+ 0· x + x 2 + 0· x3 + 0· x 4 + 0· x5 + x6 !1010001
m(x ) =1+ x + x3 !1101
© M
atth
ieu
Bloc
h 20
10
2. Syndrome Calculation for Cyclic
Codes©
Mat
thie
u Bl
och
2010
• Remainder of division
• “Last element first” architecture
• n clocks
D D D+ ++
Syndrome Calculation
r(x ) = q(x )g(x )+ s(x )
g
0 g
1 g
n!k!1 !g
n!k
r(x ) q(x )
s
n!k!1 s
n!k!2 s
0
© M
atth
ieu
Bloc
h 20
10
Syndrome Calculation
1. Reset memories
2. Clock first n-k bits into memories
3. Clock k remaining bits to obtain q(x)
4. Content of memories after last clock is r(x)
© M
atth
ieu
Bloc
h 20
10
D D D++
Syndrome Example
• Generator
• Word g(x ) =1+ x + x3
(n = 7)
r(x ) =1+ x 2 + x5 + x6 !1010011
1 1 1
0 0
0 0 0
0
0
0
© M
atth
ieu
Bloc
h 20
10
D D D++
Syndrome Example
• Generator
• Word g(x ) =1+ x + x3
(n = 7)
r(x ) =1+ x 2 + x5 + x6 !1010011
1 1 1
1 1
0
0
0
1 0 0
© M
atth
ieu
Bloc
h 20
10
D D D++
Syndrome Example
• Generator
• Word g(x ) =1+ x + x3
(n = 7)
r(x ) =1+ x 2 + x5 + x6 !1010011
1 1 1
1 1
0
0
1
1 1 0
© M
atth
ieu
Bloc
h 20
10
D D D++
Syndrome Example
• Generator
• Word g(x ) =1+ x + x3
(n = 7)
r(x ) =1+ x 2 + x5 + x6 !1010011
1 1 1
0 0
0
0
1
0 1 1
1
© M
atth
ieu
Bloc
h 20
10
D D D++
Syndrome Example
• Generator
• Word g(x ) =1+ x + x3
(n = 7)
r(x ) =1+ x 2 + x5 + x6 !1010011
1 1 1
0 1
1
1
1
q(x ) = x3
1 1 1
1
© M
atth
ieu
Bloc
h 20
10
D D D++
Syndrome Example
• Generator
• Word g(x ) =1+ x + x3
(n = 7)
r(x ) =1+ x 2 + x5 + x6 !1010011
1 1 1
1 0 1
1
1
0
q(x ) = x 2 + x3
0 0 1
© M
atth
ieu
Bloc
h 20
10
D D D++
Syndrome Example
• Generator
• Word g(x ) =1+ x + x3
(n = 7)
r(x ) =1+ x 2 + x5 + x6 !1010011
1 1 1
0 1 0
1
1
1
q(x ) = x + x 2 + x3
1 1 0
© M
atth
ieu
Bloc
h 20
10
D D D++
Syndrome Example
• Generator
• Word g(x ) =1+ x + x3
(n = 7)
r(x ) =1+ x 2 + x5 + x6 !1010011
1 1 1
1 1 1
0
0
1
q(x ) = 0 + x + x 2 + x3
s(x ) =1+ x + x 2
1 1 1
© M
atth
ieu
Bloc
h 20
10
3. Meggitt Decoder
© M
atth
ieu
Bloc
h 20
10
Principle
• Syndrome of cyclic shifts are cyclic shifts of syndromes (Theorem 4.1)
• Only worry about detecting and correcting error patterns with highest bit in error:
e
n!1=1
© M
atth
ieu
Bloc
h 20
10
(7,4) Hamming Code
• Syndrome array
e
0000000
1000000
0100000
0010000
0001000
0000100
0000010
0000001
s
000
100
010
001
110
011
111
101
Only error patternto detect
s
0 s1
s2
g(x ) =1+ x + x3
© M
atth
ieu
Bloc
h 20
10
Syndrome Calculation r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
1 1
1
D D D++
D+ D D D D D +D
© M
atth
ieu
Bloc
h 20
10
Syndrome Calculation r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
1 1
1
1
1
1D D D++
D+ D D D D D +D
© M
atth
ieu
Bloc
h 20
10
Syndrome Calculation r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
1 1
1
1
1
1 1
1
D D D++
D+ D D D D D +D
© M
atth
ieu
Bloc
h 20
10
Syndrome Calculation r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 1
1
0
1
1 1
1 0
1D D D++
D+ D D D D D +D
© M
atth
ieu
Bloc
h 20
10
Syndrome Calculation r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
1 1
1
0
1
0 1
1 1
0
0
D D D++
D+ D D D D D +D
© M
atth
ieu
Bloc
h 20
10
D D D++
D+ D D D D D +D
Syndrome Calculation r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
1 0
1
0
1
0 0
1 1
1
0 1
© M
atth
ieu
Bloc
h 20
10
D D D++
D+ D D D D D +D
Syndrome Calculation r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 1
1
1
1
0 0
1 1
0
0 1 0
0 1 0
© M
atth
ieu
Bloc
h 20
10
Error Correction r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 1
1
1
1
0 0
1 1
0
0 1 0
0 1 0
D D D++
D+ D D D D D +D
0
© M
atth
ieu
Bloc
h 20
10
Error Correction r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 0
1
1
1
0 0
1 1
0
0 1 0
D D D++
D+ D D D D D +D
0
© M
atth
ieu
Bloc
h 20
10
Error Correction r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 0
1
1
1
0
1 1 0 1 0
D D D++
D+ D D D D D +D
0
1 1
© M
atth
ieu
Bloc
h 20
10
Error Correction r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 0
1
1
1
0
1 1 0 1 0
D D D++
D+ D D D D D +D
0
1 1
© M
atth
ieu
Bloc
h 20
10
Error Correction r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 1 0
D D D++
D+ D D D D D +D
0
1 1 1
1 1 1 1 0 1 0
© M
atth
ieu
Bloc
h 20
10
Error Correction r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 1 0
D D D++
D+ D D D D D +D
1 1 1
1 1 1 1 0 0 1
1 0
1
0
© M
atth
ieu
Bloc
h 20
10
Error Correction r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 0 0
D D D++
D+ D D D D D +D
1
1 1 0
1 1 0 1 1 1 0 0
© M
atth
ieu
Bloc
h 20
10
Error Correction r(x ) = x + x 2 + x 4 + x5 + x6 ! 0110111
0 0 0
D D D++
D+ D D D D D +D
0
0
1 1 0 1 1 0 0
0
c(x ) = x 2 + x 4 + x5 + x6 ! 0010111