Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU1 v = (v 0, v 1,..., v n-1 ) : code vector v (1) = (v n-1, v 0, v 1, …, v n-2 ) v (i) = (v n-i, v n-i+1, …,

Similar presentations


Presentation on theme: "Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU1 v = (v 0, v 1,..., v n-1 ) : code vector v (1) = (v n-1, v 0, v 1, …, v n-2 ) v (i) = (v n-i, v n-i+1, …,"— Presentation transcript:

1 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU1 v = (v 0, v 1,..., v n-1 ) : code vector v (1) = (v n-1, v 0, v 1, …, v n-2 ) v (i) = (v n-i, v n-i+1, …, v n-1, v 0, v 1, …, v n-i-1 ) v(x) = v 0 + v 1 x + … + v n-1 x n-1 : code polynomial v (i) (x) = x i v(x)/x n -1 Ⅲ Cyclic Code shift registers with feedback connections inherent algebraic structure  Algorithmic technique random-error correction burst-error correction Def : Cyclic Code (i) one linear code ( subset of GF(q)[x]/x n -1 ) (n, k) (ii) x c(x) mod x n -1  C(x) if c(x)  C(x) Shift right i  Shift left n-i

2 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU2 ( note : multiply by a field element to make it monic ) g(x) = g 0 + g 1 x + … + g r-1 x r-1 + x r g(x) is unique In GF(2), g 0 = 1 We claim : r = n - k For (n, k) cyclic code v(x) = u 0 g(x) + u 1 xg(x) + u 2 x 2 g(x) + … + u n-r-1 x n-r-1 g(x) = ( u 0 + u 1 x + u 2 x 2 + … + u n-r-1 x n-r-1 )g(x) = u(x)g(x) is also a code polynomial Consider : g(x), xg(x), x 2 g(x), …, x n-r-1 g(x) g (1) (x)g (2) (x)g (n-r-1) (x) = = = code polynomials Def : generator polynomial : The nonzero monic code polynomial of minimum degree in a cyclic code C Note If r = n–k, deg u(x) = k-1 u(x) : information polynomial

3 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU3 (i)  v(x) = a(x)g(x) + b(x) ∴ b(x) = v(x) + a(x)g(x) and deg b(x)<deg g(x) (ii)  v(x) = (a 0 +a 1 x +…+a n-r-1 x n-r-1 )g(x)= a 0 g(x)+ a 1 xg(x)+…+a n-r-1 x n-r-1 g(x) g(x) = 1 + g 1 x + g 2 x 2 + … + g n-k-1 x n-k-1 + x n-k Every code polynomial is a multiple of g(x) and every binary polynomial of degree n-1 or less that is a multiple of g(x) is a code polynomial. Thm : Let g(x) = 1 + g 1 (x) + … + g r-1 x r-1 + x r be the generator polynomial in an (n, k) cyclic code. A binary polynomial of degree n-1 or less is a code polynomial iff it is a multiple of g(x). Proof: # of binary polynomial with degree ≤ n-1 that are multiples of g(x) = 2 n-r 2 n-r = 2 k  r = n-k Thm : In an (n,k) cyclic code, there exists one and only one code polynomial of degree n-k Q: g(x), xg(x), x 2 g(x), …, x k-1 g(x) are linear independent ?

4 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU4  0 = Q(x)g(x)/x n -1 + s(x) Q: Thm : g(x) | x n +1 (x n -1 ) Thm : If g(x) is a polynomial of degree n-k and is a factor of x n +1(x n -1), then g(x) generate an (n, k) cyclic code pf: x n – 1 = Q(x)g(x) + s(x)  兩邊 mod x n -1 pf: (1) v(x) = u 0 g(x) +u 1 xg(x) +…+u k-1 x k-1 g(x) = (u 0 +u 1 x +…+u k-1 x k-1 )g(x)= v 0 +v 1 x+…+v n-1 x n-1 there exists 2 k code polynomials  (n,k) linear code (2) If v(x) is a code polynomial, then xv(x) = v n-1 (x n -1)+v (1) (x)  v (1) (x) is a multiple of g(x)  v (1) (x) is also a code polynomial

5 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU5 v(x) = x n-k u(x) + t(x) where t(x) is chosen st. (i) deg t(x) < n-k (ii) v(x)/g(x) = 0 ∴ t(x) = - x n-k u(x)/g(x)  t 0 + t 1 x + … + t n-k-1 x n-k-1 v = (t 0, t 1, …, t n-k-1, u 0, u 1, …,u k-1 ) Q: t(x) physical mean? Q: For large n, x n +1 may have many factors of degree n-k. How to select g(x)? Non-Systematic Encoding  v(x) = u(x)g(x) Systematic Encoding x n-k u(x) =a(x)g(x)+ t(x)  t(x)+ x n-k u(x) = a(x)g(x) & deg[ t(x)+ x n-k u(x)]  n-1 ∴ It’s a code polynomial

6 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU6 non-systematic 1+x 3 +x 5 +x 6 = (1+x+x 2 +x 3 )g(x)1 0 0 1 0 1 1( 1 1 1 1 ) x+x 5 +x 6 = (x+x 2 +x 3 )g(x)0 1 0 0 0 1 1( 0 1 1 1 ) 1+x+x 2 +x 3 +x 4 +x 5 +x 6 = (1+x 2 +x 4 )g(x)1 1 1 1 1 1 1( 1 0 1 1 ) x 2 +x 4 +x 5 +x 6 = (x 2 +x 3 )g(x)0 0 1 0 1 1 1( 0 0 1 1 ) 1+x 2 +x 6 = (1+x+x 3 )g(x)1 0 1 0 0 0 1( 1 1 0 1 ) x+x 2 +x 3 +x 6 = (x+x 3 )g(x)0 1 1 1 0 0 1( 0 1 0 1 ) 1+x+x 4 +x 6 = x 3 g(x)1 1 0 0 1 0 1( 1 0 0 1 ) x 3 +x 4 +x 6 = x 3 g(x)0 0 0 1 1 0 1( 0 0 0 1 ) 1+x 4 +x 5 = (1+x+x 2 )g(x)1 0 0 0 1 1 0( 1 1 1 0 ) x+x 3 +x 4 +x 5 = (x+x 2 )g(x)0 1 0 1 1 1 0( 0 1 1 0 ) 1+x+x 2 +x 5 = (1+x 2 )g(x)1 1 1 0 0 1 0( 1 0 1 0 ) x 2 +x 3 +x 5 = x 2 g(x)0 0 1 1 0 1 0( 0 0 1 0 ) 1+x 2 +x 3 +x 4 = (1+x)g(x)1 0 1 1 1 0 0( 1 1 0 0 ) x+x 2 +x 4 = xg(x)0 1 1 0 1 0 0( 0 1 0 0 ) 1+x+x 3 = 1g(x)1 1 0 1 0 0 0( 1 0 0 0 ) 0 = 0g(x)0 0 0 0 0 0 0( 0 0 0 0 ) Code polynomialsCode VectorsMessages TABLE 4.1 A (7, 4) CYCLIC CODE GENERATED BY g(x) = 1+x+x 3

7 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU7 systematic 1+x+x 2 +x 3 +x 4 +x 5 +x 6 = (1+x 2 +x 5 )g(x)1 1 1 1 1 1 1( 1 1 1 1 ) x 2 + x 4 +x 5 +x 6 = (x 2 +x 3 )g(x)0 0 1 0 1 1 1( 0 1 1 1 ) 1+x 3 +x 5 +x 6 = (1+x+x 2 +x 3 )g(x)1 0 0 1 0 1 1( 1 0 1 1 ) x+x 5 +x 6 = (x+x 2 +x 3 )g(x)0 1 0 0 0 1 1( 0 0 1 1 ) x 3 +x 4 +x 6 = x 3 g(x)0 0 0 1 1 0 1( 1 1 0 1 ) 1+x+x 4 +x 6 = (1+x 3 )g(x)1 1 0 0 1 0 1( 0 1 0 1 ) x+x 2 +x 3 +x 6 = (x+x 3 )g(x)0 1 1 1 0 0 1( 1 0 0 1 ) 1+x 2 +x 6 = (1+x+x 3 )g(x)1 0 1 0 0 0 1( 0 0 0 1 ) x+x 3 +x 4 +x 5 = (x+x 2 )g(x)0 1 0 1 1 1 0( 1 1 1 0 ) 1+x 4 +x 5 = (1+x+x 2 )g(x)1 0 0 0 1 1 0( 0 1 1 0 ) x 2 + x 3 +x 5 = x 2 g(x)0 0 1 1 0 1 0( 1 0 1 0 ) 1+x+x 2 +x 5 = (1+x 2 )g(x)1 1 1 0 0 1 0( 0 0 1 0 ) 1+x 2 +x 3 +x 4 = (1+x)g(x)1 0 1 1 1 0 0( 1 1 0 0 ) x+x 2 +x 4 = xg(x)0 1 1 0 1 0 0( 0 1 0 0 ) 1+x+x 3 = 1g(x)1 1 0 1 0 0 0( 1 0 0 0 ) 0 = 0g(x)0 0 0 0 0 0 0( 0 0 0 0 ) Code polynomialsCode VectorsMessages TABLE 4.1 A (7, 4) CYCLIC CODE GENERATED BY g(x) = 1+x+x 3 X 3 (x 2 +1) X 3 +x+1) = x 2

8 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU8 v = u G v(x) = (u 0 + u 1 x + … + u k-1 x k-1 )g(x) x n +1 = g(x)h(x) where h(x) = h 0 + h 1 x + … + h k x k : parity polynomial  x k h(x -1 ) = h k + h k-1 x + … + h 0 x k ∵ x k h(x -1 ) | x n +1 ∴ x k h(x -1 ) generate an (n, n-k) cyclic code Q: (一)(一) G = k x n Generator & Parity-check Matrices Q: GH T =0

9 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU9 ∵ deg a(x) ≤ k-1 deg = j 項係數 H = (n-k) x n Note If v(x) = a(x)g(x) v(x)h(x) = a(x)g(x)h(x) = a(x)(x n +1) = a(x) + x n a(x) 0 1 …k-1 n n+1 …n+k-1

10 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU10 (二)(二) consider each i corresponding to an information place x n-k+i = a i (x)g(x) + b i (x) 0 ≤ i ≤ k-1 x n-k, x n-k+1, …, x n-1 where b i (x) = b i0 + b i1 x + … + b i,n-k-1 x n-k-1  b i (x) + x n-k+i are code polynomials Q: (1) linear independent? (2) 與 x n-k u(x)/g(x) 之 關係 ? H = (n-k) x n (3) check VH T =0 G = k x n (4) ( 一 )G 與 ( 二 )G 之關係 ?

11 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU11 Ans (2) x n-k u(x) = u 0 x n-k + u 1 x n-k+1 + … + u k-1 x n-1 g(x) g(x) = u 0 b 0 (x) + u 1 b 1 (x) + … + u k-1 b k-1 (x) = t 0 + t 1 x + … + t n-k-1 x n-k-1 Ans (3) V = (v 0,v 1,…,v n-k-1,v n-k,v n-k+1,…,v n-1 ) = (t 0,t 1,…,t n-k-1,u 0,u 1,…,u k-1 ) VH T =V 0 + V n-k b 00 + V n-k+1 b 10 +…+ V n-1 b k-1,0 = t 0 + u 0 b 00 + u 1 b 10 +…+ u k-1 b k-1,0

12 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU12 ( 一 ). b(x) mod g(x) g(x) = x 2 + g 1 x + g 0 b(x) = b 3 x 3 + b 2 x 2 + b 1 x + b 0 Ax + B (=s(x)) b 0,b 1,b 2,b 3 g0g0 g1g1 = = BA n-k = deg[g(x)] = 2 (i)b 3 在第 3clock 啟動前位 於 -1 下方 (ii)i.e. 就 b 3 x 3 單獨而言, 在 第 4clock 後,registers 內 容為 b 3 x 3 mod g(x) G

13 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU13 ( 二 ). x 2 b(x) mod g(x) b 0,b 1,b 2,b 3 g0g0 g1g1 (i) 就 b 3 x 3 單獨而言, 在第 4 clock 結 束後, registers 內容為 b 3 x 5 mod g(x). i.e. 相當於 ( 一 ), b 3 由左方輸 入但需 6 個 clock. (ii) 同理 for b 2, b 1, b 0 Q: (1)xb(x)/g(x) (i) while complete the computation b(x)/g(x)  s(x) (ii) G disable (iii) one right shift (iv) result = xs(x)/g(x) xb(x)  input 0, b 0, b 1, b 2, b 3 (2) x 2 b(x)/g(x) input 0, 0, b 0, b 1, b 2, b 3

14 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU14 step (i) x n-k u(x) (ii) x n-k u(x)/g(x) = b(x) (iii) b(x) + x n-k u(x) n-k stage Figure 4.1 Encoding circuit for an (n, k) cyclic code with generator polynomial g(X) = 1 + g 1 X + g 2 X 2 + … + g n-k-1 X n-k-1 + X n-k … Message X n-k u(X)Code word Parity-check digits g1g1 g2g2 g n-k-1 Gate b n-k-1 b2b2 b1b1 b0b0 Encoding

15 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU15 Example 4.5 Consider the (7, 4) cyclic code generated by g(X) = 1 + X + X 3. The encoding circuit based on g(X) is shown in Figure 4.2. Suppose that the message u = (1 0 1 1) is to be encoded. As the message digits are shifted into the register, the contents in the register are as follows: InputRegister contents 0 0 0 (initial state) 11 1 0 (first shift) 11 0 1 (second shift) 01 0 0 (third shift) 11 0 0 (fourth shift) After four shifts, the contents of the register are (1 0 0). Thus, the complete code vector is (1 0 0 1 0 1 1) and the code polynomial is 1 + X 3 + X 5 + X 6. (1 0 1 1) Figure 4.2 Encoder for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3 Message X n-k u(X) Code word Gate Parity digits

16 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU16 --- (1)  given k information digits (v n-k, v n-k+1, …, v n-1 ) = (u 0, u 1, …, u k-1 ) By (1), to determine the n-k parity-check digits (v 0, v 1, …, v n-k-1 ) v n-k-1 = h 0 v n-1 + h 1 v n-2 + … + h k-1 v n-k = u k-1 + h 1 u k-2 + … + h k-1 u 0 v n-k-2 = h 0 v n-2 + h 1 v n-3 + … + h k-1 v n-k-1 = u k-2 + h 1 u k-3 + … + h k-2 u 0 + h k-1 v n-k-1 Figure 4.3 Encoding circuit for an (n, k) cyclic code based on the parity polynomial h(x) = 1 + h 1 X + h 2 X 2 + …+ h k-1 X k-1 +X k Gate2 Gate1 u0u0 u1u1 U k-2 U k-1 h1h1 h2h2 h k-2 h k-1 ++++ k stage ° Output to channel

17 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU17 Suppose that the message to be encoded is (1 0 1 1). Then v 3 = 1, v 4 = 0, v 5 = 1, v 6 = 1. The first parity-check digit is v 2 = v 6 + v 5 + v 4 = 1 + 1 + 0 = 0 The second parity-check digit is v 1 = v 5 + v 4 + v 3 = 1 + 0 + 1 = 0 The third parity-check digit is v 0 = v 4 + v 3 + v 2 = 0 + 1 + 0 = 1 Thus, the code vector that corresponds to the message (1 0 1 1) is (1 0 0 1 0 1 1). h 0 = 1 Q: 觀察 Method Ⅰ, Ⅱ 結果相同 Gate 2 Gate 1 p Output Input Figure 4.4 Encoding circuit for the (7, 4) cyclic code based on its parity polynomial h(x) = 1 + X + X 2 + X 4

18 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU18 r(x) = r 0 + r 1 x + … + r n-1 x n-1 = a(x)g(x) + s(x)deg s(x) ≤ n-k-1 s(x) = 0 r(x) is a code polynomial syndrome r(x)/g(x) ≈ Figure 4.5 An (n-k)-stage syndrome circuit with input from the left end. g1g1 s0s0 s1s1 … Gate g2g2 g n-k-1 s n-k-1 r(X) Received vector Syndrome Computation & Error Detection

19 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU19 pf: Thm : Let s(x) be the syndrome of a receive polynomial r(x) Then s (1) (x) ( = x s(x)/g(x) ) is the syndrome of r (1) (x) (= x r(x)/x n +1)

20 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU20 Ref : pp. 10 & 11 r = (r 0, r 1, …,r n-k-1, r n-k, …, r n-1 ) = (t 0, t 1, …, t n-k-1, u 0, u 1, …,u k-1 ) rH T = (s 0, s 1, …, s n-k-1 ) s 0 = r 0 + r n-k b 00 + r n-k+1 b 10 + … + r n-1 b k-1,0 = r 0 + t 0 s 1 = r 1 + r n-k b 01 + r n-k+1 b 11 + … + r n-1 b k-1,1 = r 1 + t 1 … s n-k-1 = r n-k-1 + r n-k b 0, n-k-1 + r n-k+1 b 1, n-k-1 + … + r n-1 b k-1, n-k-1 ∵ r(x) = r 0 + r 1 x + … + r n-k-1 x n-k-1 + x n-k u(x) u(x) = u 0 + u 1 x + … + u k-1 x k-1 ∴ r(x)/g(x) = r 0 + r 1 x + … + r n-k-1 x n-k-1 + x n-k u(x)/g(x) = t 0 + t 1 x + … + t n-k-1 x n-k-1 ( r n-k, r n-k+1, …, r n-1 )G = ( t 0, t 1, …, t n-k-1, r n-k, r n-k+1, r n-1 ) Syndrome is simply the vector sum of the received parity digits and the parity-check digits recomputed from the received information digits

21 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU21 Example 4.7 A syndrome circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3 is shown in Figure 4.6. Suppose that the receive vector is r = (0 0 1 0 1 1 0). The syndrome of r is s = (1 0 1). As the received vector is shifted into the circuit, the contents in the register are given in Table 4.3. Figure 4.6 Syndrome circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3. 1 0 Gate 1 input ShiftInput Register contents 0 0 0 (initial state) 100 0 0 211 0 0 311 1 0 400 1 1 51 601 1 1 701 0 1 (syndrome s) 8-1 0 0 (syndrome s (1) ) 9-0 1 0 (syndrome s (2) ) Table 4.3 CONTENTS OF THE SYNDROME REGISTER SHOWN IN FIGURE 4.6 WITH r = (0 0 1 0 1 1 0) AS INPUT

22 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU22 Figure 4.7 An (n-k)-stage syndrome circuit with input from the right end. Note : 1.x n-k r(x)/g(x) = [x n-k r(x)/x n +1]/g(x) = r (n-k) (x)/g(x) = s (n-k) (x) 2.r(x) = v(x) + e(x) ∴ s(x) = r(x)/g(x) = e(x)/g(x) g1g1 s0s0 s1s1 … Gate g2g2 g n-k-1 s n-k-1 r(X) Received vector Cor : The contents of the registers form the syndrome s (n-k) (x) of r (n-k) (x), which is the (n-k) th cyclic shift of r(x) x n-k r(x) = Q(x)(x n +1) + R(x) = Q(x)p(x)g(x) + q(x)g(x) + s(x) = [Q(x)p(x) + q(x)]g(x) + s(x) x n-k r(x)/g(x) ≈

23 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU23 Decoding 1.syndrome 2.error pattern 3.correct Meggitt decoder received digits are decoded one at a time and each digit is decoded with the same circuitry (i)r 1 (x) = r(x) + x n-1 (ii)s 1 (X) = s(x) + x n-1 /g(x) (iii)s 1 (1) (x) = xs 1 (x)/g(x) = xs(x)/g(x) + [xx n-1 /g(x)]/g(x) = xs(x)/g(x) + x n /g(x) = s (1) (x) + 1 r(x) r (1) (x) r 1 (x) r 1 (1) (x) syndrome s(x) s (1) (x) s 1 (x) s 1 (1) (x) x n -1 = Q(x)g(x)  x n = Q(x)g(x) + 1 Note : If Syndrome register ≠ 0’s at the end of decoding ( n shifts ) uncorrectable error pattern

24 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU24 Gate Buffer registers Syndrome register Error pattern detection circuit Syndrome modification r(X) Received vector Corrected vector Feedback connection riri eiei Figure 4.8 General cyclic code decoder with received polynomial r(X) shifted into the syndrome register from the left end s(x) --- r(x) s (1) (x) --- r (1) (x) (r 0, r 1, …, r n-1 ) =

25 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU25 Example 4.9 Consider the decoding of the (7, 4) cyclic code generated by g(X) = 1 + X + X 3. This code has minimum distance 3 and is capable of correcting any single error over a block of seven digits. There are seven single-error patterns. These seven error patterns and the all-zero vector form all the coset leaders of the decoding table. Thus, they form all the correctable error patterns. Suppose that the received polynomial r(X) = r 0 + r 1 X + r 2 X 2 + r 3 X 3 + r 4 X 4 + r 5 X 5 + r 6 X 6 is shifted into the syndrome register from the left end. The seven single-error patterns and their corresponding syndromes are listed in Table 4.4. TABLE 4.4 ERROR PATTERNS AND THEIR SYNDROMES WITH THE RECEIVED POLYNOMIAL r(x) SHIFTED INTO THE SYNDROME REGISTER FROM THE LEFT END (1 0 1) (1 1 1) (0 1 1) (1 1 0) (0 0 1) (0 1 0) (1 0 0) s(X) = 1 + X 2 s(X) = 1 + X + X 2 s(X) = X + X 2 s(X) = 1 + X s(X) = X 2 s(X) = X s(X) = 1 e 6 (X) = X 6 e 5 (X) = X 5 e 4 (X) = X 4 e 3 (X) = X 3 e 2 (X) = X 2 e 1 (X) = X 1 e 0 (X) = X 0 Syndrome vector (s 0, s 1, s 2 ) Syndrome s(X) Error pattern e(X)

26 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU26 Gate Multiplexer 010 r(X) Input Buffer register r’(X) Output Figure 4.9 Decoding circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3.

27 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU27 1011011 0 1110110 0 1101101 0 0111011 0 001011110111 Initial 1st shift 2st shift 3rd shift Syndrome register Buffer register Pointer Correction

28 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU28 0001111 0 1011110 1 0110101 0 Error corrected 1010011 0 Corrected word 101000000000 4th shift 5th shift 6th shift 7th shift Figure 4.10 Error-correction process of the circuit shown in Figure 4.9

29 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU29 (i)s (n-k) (x) : syndrome of r (n-k) (x) (ii)If e n-1 = 1 In r (n-k) (x), the digit r n-1 is at the location x n-k-1 r 1 (n-k) (x) = r (n-k) (x) + x n-k-1  s 1 (n-k) (x) = s (n-k) (x) + x n-k-1 Error-pattern detection circuit Syndrome register Buffer register r(X) Gate r(X) Corrected vector Received vector Feedback connection riri eiei (Syndrome modification) (r 0, r 1, …,r n-1 ) = Figure 4.11 General cyclic code decoder with received polynomial r(X) shifted into the syndrome register from the right end. Note: circular shift 後考量 circular shift 前考量

30 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU30 Example 4.10 Again, we consider the decoding of the (7, 4) cyclic code generated by g(X) = 1 + X + X 3. Suppose that the received polynomial r(X) is shifted into the syndrome register from the right end. The seven single-error patterns and their corresponding syndromes are listed in Table 4.5. We see that only when e(X) = X 6 occurs, the syndrome is (0 0 1) after the entire received polynomial r(X) has been shifted into the syndrome register. If the single error occurs at the location X i with i ≠ 6, the syndrome in the register will not be (0 0 1) after the entire received polynomial r(X) has been shifted into the syndrome register. However, another 6 – i shifts, the syndrome register will contain (0 0 1). Based on this fact, we obtain another decoding circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3, as shown in Figure 4.12. We see that the circuit shown in Figure 4.9 and the circuit shown in Figure 4.12 have the same complexity.

31 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU31 (0 0 1) (0 1 0) (1 0 0) (1 0 1) (1 1 1) (0 1 1) (1 1 0) s (3) (X) = X 2 s (3) (X) = X s (3) (X) = 1 s (3) (X) = 1 + X 2 s (3) (X) = 1 + X + X 2 s (3) (X) = X + X 2 s (3) (X) = 1 + X e(X) = X 6 e(X) = X 5 e(X) = X 4 e(X) = X 3 e(X) = X 2 e(X) = X 1 e(X) = X 0 Syndrome vector (s 0, s 1, s 2 ) Syndrome s (3) (X) Error pattern e(X) TABLE 4.5 ERROR PATTERNS AND THEIR SYNDROMES WITH THE RECEIVED POLYNOMIAL r(x) SHIFTED INTO THE SYNDROME REGISTER FROM THE RIGHT END

32 Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU32 Gate Multiplexer r(X) Input Buffer register r’(X) Output Figure 4.12 Decoding circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X 3.


Download ppt "Cyclic_Code2004/3/17Yuh-Ming Huang, CSIE NCNU1 v = (v 0, v 1,..., v n-1 ) : code vector v (1) = (v n-1, v 0, v 1, …, v n-2 ) v (i) = (v n-i, v n-i+1, …,"

Similar presentations


Ads by Google