Method and apparatus for decoding cyclic codes via syndrome chains

Information

  • Patent Grant
  • 4382300
  • Patent Number
    4,382,300
  • Date Filed
    Wednesday, March 18, 1981
    43 years ago
  • Date Issued
    Tuesday, May 3, 1983
    41 years ago
Abstract
A received cyclic code word is clocked into a first register (11). As soon as the whole received word has been read in, it is parallel-loaded into a storage register (12). The syndrome is then formed (13) of the stored code word. This syndrome is coupled to a logic circuit (14) which determines whether the last stored bit is in error. This decision is modulo-2 added (15) with the last bit, the output being the correct version of the last bit which is then clocked into the input of the storage register. The operation is repeated a given number of times (nt*) at the end of which the maximum likelihood decision on r(x)--the cyclic code word--is present in the storage register (12), ready to be read out.
Description

TECHNICAL FIELD
This invention relates to error control in data communication systems and, more particularly, to the decoding of cyclic codes which are used for error correction purposes.
BACKGROUND OF THE INVENTION
It has been shown that any linear code (cyclic codes are linear) can be decoded using a table of syndrome vs. error pattern (see, for example, Error Correcting Codes by W. W. Peterson et al, The MIT Press (1972), chapter 3). For an (n,k) code, storing the decoding table requires a ROM (read only memory) of size 2.sup.n-k words each n bits long; for general linear codes this is the only universally applicable technique for decoding. As an example of size, for the (17,9) code generated by
g(x)=1+x.sup.3 +x.sup.4 +x.sup.5 +x.sup.8,
the ROM size is given by:
r.DELTA.n-k=17-9=8
Hence, ROM size=2.sup.8 =256 words each 17 bits long.
Memory size=256.times.17=4,352 flip flops.
Cyclic codes are a special variety of linear codes with a lot of algebraic structure. Essentially, all cyclic rotates of any code word are also code words. This permits one to decode these codes more easily than general linear codes. Leaving aside specialized decoders for special cyclic codes, the simplest, generalized, prior art decoding technique applicable to all cyclic codes is the "Meggitt Decoder". This Decoder is shown and described on pages 232-4 of the cited text by W. W. Peterson et al. Details are available in the reference, but the essential idea here is to identify those syndromes the error patterns corresponding to which have degree=n-1. For an (n,k), perfect, t error correcting code, we know: ##EQU1##
(ii) The number, N.sub.M, of syndromes, the error pattern corresponding to which has degree=n-1, is given by: ##EQU2## For the (23,12), 3 error correcting perfect Golay Code, ##EQU3## This number (277) is also indicative of the number of gates required by the combinatoric logic network of the Meggitt decoder. And while this gating requirement is not onerous in this case, for the more complex cyclic codes, such as (63,39) or (1023,1003) of t.gtoreq.2, the number of gates required can number in the tens of thousands or perhaps even millions.
SUMMARY OF THE INVENTION
It is a primary object of the invention to achieve a considerable reduction in the logic implementation of a cyclic code decoder over the Meggitt decoder and the conventional decoding table approach.
In accordance with the invention, a technique is presented for the decoding of cyclic codes which takes advantage of both their group and cyclic properties. This results in a decoder whose complexity is considerably less than that of a decoder implementing the decoding table approach. This technique also shows how, by reducing complexity, various degrees of suboptimum decoding can be done.
Central to the technique is the fact that cyclic rotates of correctable error patterns are correctable error patterns provided they fall in different cosets. This fact allows one to form "chains" of syndromes; and, only one syndrome on each chain (called the "chain leader") and its correctable error pattern needs to be remembered for decoding. Finally based on the fact that error patterns imbedded in correctable error patterns are also correctable, a suitable choice of chain leaders results in totally memoryless decoding. Only some limited combination logic is required for decoding.
In accordance with the present invention, a received cyclic code word is clocked into a first register. As soon as the whole received word has been read in, it is parallel-loaded into a storage register. The syndrome is then formed of the stored code word. This syndrome is coupled to a combinatoric circuit which determines whether the last bit of the stored code word is in error. This decision is modulo-2 added with the last bit, the output being the correct version of the last bit which is then clocked into the input of the storage register. The operation is repeated a given number of times (nt*, or nt' times for suboptimum decoding) at the end of which the maximum likelihood decision on r(x)--the cyclic code word--is present in the storage register, ready to be read out.
It is a particular feature of the invention that for an (n,k) error correcting code, each syndrome chain with a chain leader of Hamming weight l.ltoreq.t has l error patterns of degree=n-1. Thus, the number of syndrome chains is strictly less than N.sub.M. Consequently, a syndrome chain decoder in accordance with the invention is always simpler (in size of circuit) than a Meggitt decoder. Also, as will be evident hereinafter, some "don't care" conditions become available making the syndrome chain decoder simpler still.





BRIEF DESCRIPTION OF THE DRAWING
The invention will be fully appreciated from the following detailed description when the same is considered in connection with the accompanying drawings in which:
FIG. 1 is a simplified block diagram of a decoder for cyclic codes constructed in accordance with the principles of the present invention;
FIG. 2 is a detailed schematic diagram of the syndrome former of FIG. 1;
FIG. 3 is a detailed schematic diagram of the block of FIG. 1 labelled .delta..sub..xi. *(s(r.sub.i (x)));
FIGS. 4-18 are syndrome chain diagrams useful in understanding the principles of the present invention; and
FIG. 19 shows a table which illustrates the function of the block in FIG. 1 labelled .delta..sub..xi. *(s(r.sub.i (x))).





DETAILED DESCRIPTION
A brief introduction into cyclic code theory at this point may facilitate an understanding of the mathematical analysis that follows. An (n,k) cyclic code, C, generated by the polynomial g(x) is the set all polynomial multiples of g(x) reduced modulo x.sup.n +1. Further,
r.DELTA. deg g(x)=n-k, (1)
h(x) g(x)h(x)=x.sup.n +1. (2)
It can be shown that the code C has exactly 2.sup.k elements all of whom satisfy,
Vc(x).epsilon.C a(x) c(x)=a(x)g(x) (3)
and a(x) is polynomials of degree .ltoreq.k-1.
Also in view of equation 2 it can be shown that all cyclic rotates of code words are code words.
In view of equation 3, one can contend that the polynomial p(x) of degree .ltoreq.n-1, is a code word if p(x) is exactly divisible by g(x). One possible encoding procedure is then suggested by equation 3 and the feasibility of polynomial multiplication by feedback shift registers. Another popular encoding procedure is to form the code word c.sub.a (x) corresponding to the information polynomial a(x) as,
c.sub.a (x)=x.sup.r a(x) mod g(x)+x.sup.r a(x). (4)
It is readily seen that c.sub.a (x) is exactly divisible by g(x) and deg c.sub.a (x)=r+deg a(x).ltoreq.r+k-1=n-1. The advantage of encoding as in equation (4) is that the first r digits of c.sub.a (x) {corresponding to x.sup.r a(x) mod g(x)} constitute the parity bits and the last k digits {corresponding to x.sup.r a(x)} are exactly the information bits.
Definition:
By .pi..sub.m we denote the space of all polynomials of degree .ltoreq.m.
Before addressing the decoding operation, consider the following algebraic construction. Let S.DELTA.{s.sub.o (x), s.sub.1 (x), . . . , s.sub.2.sbsp.r.sub.-1 (x)} be the set of the 2.sup.r polynominals of degree .ltoreq.r-1, i.e., S.ident..pi..sub.r-1.
Definition:
The residue class (s.sub.i (x)) corresponding to the polynomial s.sub.i (x).epsilon.S, is the set of all polynomials p.sub.ij (x).epsilon..pi..sub.n-1 which satisfy,
p.sub.ij (x) mod g(x)=s.sub.i (x). (5)
Let { (s.sub.i (x)); i=0,1,2, . . . 2.sup.r -1} be the super set of residue classes corresponding to the elements of S.
Definition:
The Hamming weight of a polynomial p(x), denoted by W.sub.H p(x) is defined to be,
W.sub.H p(x).DELTA.p(1) (6)
It is readily seen that W.sub.H p(x) is the same as the Hamming weight of the binary sequence corresponding to p(x). Now as part of our construction we identify e.sub.i *(x).epsilon. {s.sub.i (x)} ##EQU4## Now consider the decoding problem, say one received r.sub.i (x) upon transmitting the code word c.sub.j (x). Obviously
r.sub.i (x)=c.sub.j (x).sym.e(x), (8)
where e(x) is the error polynomial. The decoding problem is to make a maximum likelihood decision on e(x).
From equations 3 or 4 one notes that
s.sub.i (x).DELTA.r.sub.i (x) mod g(x)=e(x) mod g(x) (9)
Thus, s.sub.i (x) is totally a function of the error polynomial e(x) and has nothing to do with which c.sub.j (x).epsilon.C was actually transmitted. Now obviously any element p.sub.ij (x).epsilon. (s.sub.i (x)) is a candidate for e(x). In fact only elements of (s.sub.i (x)) are candidates for e(x). Using the theorem that when transmission is over a Binary Symmetric Channel (BSC), the most likely error pattern is the one with minimum Hamming weight, one concludes that the maximum likelihood decision on e(x) is,
e(x).DELTA.e.sub.i *(x).epsilon. (s.sub.i (x)) (10)
Obviously, an error is made if
e.sub.i *(x)-e(x).noteq.0, (11)
but as e.sub.i *(x)-e(x).epsilon.C as both are in (s.sub.i (x)), inequality 11 happens with low probability as every element in C has at least d.sub.min Hamming Weight, where d.sub.min .DELTA. minimum distance of the code C and is .gtoreq.3 if the code corrects at least one error.
The polynomial, s.sub.i (x) is called the syndrome corresponding to r.sub.i (x) and more formally denoted by s(r.sub.i (x)). The set (s.sub.i (x)) is called the coset corresponding to s.sub.i (x) and e.sub.i *(x) is called the coset leader of coset (s.sub.i (x)). The set E.DELTA.{e.sub.i *(x); i=0,1,2 . . . 2.sup.r -1} is called the set of correctable error patterns. If all polynomials p(x) of degree .ltoreq.n-1 and Hamming weight .ltoreq.t are present in E and t is the maximum such integer, then the code is said to be t-error correcting and it can be shown that, ##EQU5## where [b] means the maximum integer less than b.
Before entering into the discussion on syndrome chains, some theory has to be developed.
Definition:
Given p(x).epsilon..pi..sub.n-1, the operation f acting on p(x) cyclically shifts p(x) one right, i.e.
fp(x)=xp(x) mod (x.sup.n +1) (13)
The fact that the R.H.S. of equation 13 corresponds to cyclically shifting p(x) one right is readily proved.
Definition:
f.sup.i p(x).DELTA.x.sup.i p(x) mod (x.sup.n +1), (14)
corresponds to cyclically shifting p(x), i times to the right.
Definition:
f.sup.-i p(x) corresponds to cyclically shifting p(x), i times to the left, i.e.
f.sup.-i p(x)=x.sup.mn-i p(x) mod g(x) (15)
where i=(m-1)n+j and j=i mod n.
It is readily shown that f.sup.i (f.sup.-i) is an associative operation, i.e. cyclically rotating the sum of two polynomials i bits to the right (left) is equivalent to rotating the two polynomials i bits to the right (left) and then summing them up.
Lemma 1:
f.sup.i (p.sub.1 (x).sym.p.sub.2 (x))=f.sup.i p.sub.1 (x).sym.f.sup.i p.sub.2 (x) (16)
given deg p.sub.1 (x).ltoreq.n-1 and deg p.sub.2 (x).ltoreq.n-1.
The proof is trivial and has already been stated in words before the lemma was stated.
Definition:
The syndrome of a polynomial p(x).epsilon..pi..sub.n-1 is defined to be s(p(x)), i.e.,
s(p(x))=p(x) mod g(x) (17)
Theorem 1:
If s(p.sub.1 (x))=s(p.sub.2 (x)) for p.sub.1 (x) and p.sub.2 (x).epsilon..pi..sub.n-1 then,
s(f.sup.i p.sub.1 (x))=s(f.sup.i p.sub.2 (x)) for i.epsilon.{ . . . -2,-1,0,1,2, . . . }.
Proof:
Since s(p.sub.1 (x))=s(p.sub.2 (x))
Hence, s(p.sub.1 (x).sym.p.sub.2 (x))=0
.fwdarw.p.sub.1 (x).sym.p.sub.2 (x).epsilon.C
Therefore, f.sup.i (p.sub.1 (x).sym.p.sub.2 (x)).epsilon.C as C is cyclic.
From Lemma 1 the L.H.S. of the above equation becomes,
f.sup.i p.sub.1 (x).sym.f.sup.i p.sub.2 (x).epsilon.C
Therefore s(f.sup.i p.sub.1 (x).sym.f.sup.i p.sub.2 (x))=0
.fwdarw.s(f.sup.i p.sub.1 (x))=s(f.sup.i p.sub.2 (x))
Theorem 2:
The sequence s(p(x)), s(fp(x), s(f.sup.2 p(x)) . . . , s(f.sup.i p(x)), . . .
is periodic with period L.ltoreq.n and n mod L=0.
Proof:
.BECAUSE.f.sup.n p(x)=p(x),
therefore, the sequence is definitely periodic with period n. But if the sequence has minimum period L<n then all that need be proved is that
s(f.sup.L p(x))=s(f.sup.i p(x))
iff i=0. Then, from Theorem 1 we can guarantee periodicity with period L. Say, i.noteq.0, then from Theorem 1,
s(f.sup.L-i p(x))=s(p(x))
and hence the sequence will be periodic with period L-i<L as i>0. But, by definition L is the minimum period, hence i=0 is the only possibility. Finally, since the sequence is also periodic with period n,
n mod L=0.
Definition:
(1) The sequence .alpha.(p(x)), p(x).epsilon..pi..sub.n-1 corresponds to,
.alpha.(p(x)) {p(x),fp(x),f.sup.2 p(x), . . . } (19)
(2) The sequence .beta.(p(x)) corresponds to,
.beta.(p(x))={s(p(x)),s(fp(x)),s(f.sup.2 p(x)), . . . } (20)
(3) If L is the period of the periodic sequence .beta.(p(x)) (from Theorem 2) then,
Per .beta.(p(x)).DELTA.L (21)
Theorem 3:
Let e*(x).epsilon.E then any L consecutive elements of .alpha.(e*(x)) are also in E, where L=Per .beta. (e*(x)).
Proof:
It should be enough to prove that the first L elements of .alpha.(e*(x)) are in E, then from periodicity of .beta.(e*(x)) the above theorem should follow.
As a first step note that,
W.sub.H p(x)=W.sub.H f.sup.j p(x); Vj.epsilon.{ . . . -2,-1,0,1,2, . . . }(22)
Now let for some i.epsilon.{1,2, . . . L-1},
f.sup.i e*(x).epsilon.E (23)
Then, e'(x).epsilon.E W.sub.H e'(x)<W.sub.H f.sup.i e*(x) (24)
and s(e'(x))=s(f.sup.i e*(x)) (25)
From Theorem 2,
s(f.sup.-i e'(x))=s(e*(x)) (26)
From equation 22,
W.sub.H f.sup.-i e'(x)=W.sub.H e'(x)<W.sub.H f.sup.i e* (x) =W.sub.H e*(x)
i.e.
W.sub.H f.sup.-i e'(x)<W.sub.H e*(x) (27)
From inequality (27) and equation (26) we conclude that
e*(x) .epsilon.E
But by definition e (x) .epsilon.E and hence
f.sup.i e* (x).epsilon.E for i=0,1,2, . . . L-1.
Definition:
The set .xi.(e*(x)) containing any L consecutive elements of .beta.(e*(x)) is called the syndrome chain corresponding to the chain leader s(e*(x)).
Theorem 4:
Any syndrome on .xi.(e*(x)) can be chosen as the chain leader.
Proof:
From Theorem 2 on periodicity of .beta.(e*(x)), it becomes clear that
.xi.(e*(x))=.xi.(f.sup.i e*(x)), (28)
for any i .epsilon.{0,1,2, . . . L-1}.
Theorem 5:
Two distinct syndrome chains are disjoint.
Proof:
Consider two syndrome chains
.xi.(e.sub.1 *(x)) and .xi.(e.sub.2 *(x)) such that
.xi.(e.sub.1 *(x)).notident..xi.(e.sub.2 *(x)) (29)
Let the set D be defined as,
D.DELTA..xi.(e.sub.1 *(x)).andgate..xi.(e.sub.2 *(x)) (30)
We need to prove D.ident.{.0.} where {.0.} is the null set.
Let D.notident.{.0.}, then,
s(e(x)) .epsilon.D satisfying, ##EQU6##
Thus, from Theorem 4, ##EQU7## which is a contradiction of assumption (29). Hence D={.0.}.
The analysis can now turn to the decoding via syndrome chains.
Let .xi.(e.sub.1 *(x)), .xi.(e.sub.2 *(x)), . . . , .xi.(e.sub.J *(x)) be J distinct syndrome chains for a code with generator polynomial g(x). Also J is such that, ##EQU8## i.e., J is such that the different .xi.(e.sub.i *(x)); i=1,2, . . . J; are mutually disjoint and totally exhaust the set of all possible syndromes. Now form the two ordered sets,
.xi..sup.o .DELTA.{s(e.sub.1 *(x)), s(e.sub.2 *(x)), . . . , s(e.sub.J *(x))} (35)
E.sup.o .DELTA.{e.sub.1 *(x), e.sub.2 *(x), . . . , e.sub.J *(x)}(36)
Consider the following decoding procedure:
(1) Received
r(x)=c(x).sym.e*(x) (37)
where c(x) .epsilon.C and e*(x) .epsilon.E are as yet unknown.
(2) Set i=-1.
(3) Set i=+1; form s (f.sup.i r(x)).
(4) Check to see if s(f.sup.i r(x)) .epsilon..xi..sup.o.
If it is then go to step 5. Else return to step 3.
(5) If s(f.sup.i r(x)) is the jth element of .xi.o set f.sup.i e*(x)=e.sub.j *(x).
(6) Form c (x)=r(x).sym.f.sup.-i e.sub.j * (x).
Theorem 6:
The maximum number of step 3, step 4 loopings before escaping to step 5, is n.
Proof:
r(x)=c(x)+e*(x) s(f.sup.i r(x))=s(f.sup.i c(x)).sym.s(f.sup.i e*(x)) =s(f.sup.i e*(x)); i=0,1,2, . . . (38)
as the code is cyclic.
Now as i goes from 0 to n-1, s(f.sup.i e*(x)) must go completely thru the syndrome chain with s(e*(x)) in it. Since at least one element of each syndrome chain is in .xi..sup.o, hence, for some i .epsilon.{0,1,2, . . . n-1}, there must be an escape from step 4 to step 5.
Theorem 7
The choice c(x)=r(x).sym.f.sup.i e.sub.j *(x) is maximum likelihood.
Proof:
Let .parallel..xi.(e*(x)).parallel.=L
Then Theorem 6 is readily extended to prove that for some i .epsilon.{0,1, . . . L-1}, there would be an escape from step 4 to step 5.
.BECAUSE.e.sub.j *(x).epsilon.E
.thrfore.From Theorem 3,
f.sup.-i e.sub.j *(x).epsilon.E for i .epsilon.{0,1,2 . . . L-1}(39)
Also, from the algorithm
s(f.sup.i r(x))=s(e.sub.j *(x)) (40)
.thrfore.From Theorem 1,
s(r(x))=s(f.sup.-i e.sub.j *(x))
.thrfore.s(c(x))=s(r(x)).sym.s(f.sup.-i e.sub.J *(x))=0 .fwdarw.c(x).epsilon.C (41)
From equations 41 and 39 we conclude that c (x) is a maximum likelihood decision on r(x).
Now, note that in general as J <2r and
.parallel..xi.o .parallel.=.parallel.Eo .parallel.=J<2r (42)
and hence less memory is required to do decoding using the previously outlined algorithm then straight syndrome error pattern table look up (which has 2.sup.r memory requirement).
Theorem 8A:
If n is prime then J=(2.sup.r -1)/n.
Proof:
If n is prime then each syndrome chain has exactly n elements as, from Theorem 2,
n mod L=0
is satisfied if L =n.
There are 2.sup.r -1 non-zero syndromes and since syndrome chains are disjoint, there are exactly (2.sup.r -1)/n chains.
Theorem 8B:
J=(2.sup.r -1)/n
Proof: Is readily obvious.
Considering now no memory decoding via syndrome chains, the chain leaders e.sub.1 *(x), e.sub.2 *(x), . . . , e.sub.J *(x), of the previous section were chosen randomly as any member of the chains .xi.(e.sub.1 *(x)), .xi.(e.sub.2 *(x)), . . . , .xi.(e.sub.J *(x)), respectively. Suppose we do the following construction,
(1) Identify
e.sub.j '(x); j=1,2, . . . J s(e.sub.j '(x)).epsilon..xi.(e.sub.j *(x)) (43)
and,
deg e.sub.j '(x)=n-1, (44)
i.e., the last bit of e.sub.j '(x) is a one. It becomes readily obvious that at least one such e.sub.j '(x) exists in .alpha.(e.sub.j '(x)) e.g. one possible choice is
e.sub.j '(x)=f.sup.n-1-deg e.sbsp.j.sup.*(x) e.sub.j *(x) (45)
(2) From Theorem 4,
.xi.(e.sub.j *(x))=.xi.(e.sub.j '(x)) (46)
and from Theorem 3,
e.sub.j '(x) .epsilon.E as e.sub.j *(x).epsilon.E. (47)
Finally, form the set
.xi.*.DELTA.{s(e.sub.j '(x); j=1,2,. . . J}. (48)
(3) Now form the function, ##EQU9##
(4) Finally let, ##EQU10##
The decoding algorithm to be developed rests on the following theorem:
Theorem9:
Let e'(x) .epsilon.E and let
deg e'(x)=x.sup.n-1, then
e"(x).DELTA.e'(x) .sym.x.sup.n-1 (51)
satisfies,
e"(x) .epsilon.E.
Proof:
Note that,
W.sub.H e'(x)=W.sub.H e"(x) +1 (52)
and
s(e'(x))=s(e"(x)).sym.s(x.sup.n-1) (53)
Now if e"(x) .epsilon.E then e'"(x).epsilon.E
s(e'"(x))=s(e"(x)) (54)
and
W.sub.H e'"(x)<W.sub.H e"(x). (55)
From equations 53 and 54,
s(e'(x))=s(e'"(x) .sym.x.sup.n-) (56)
and from the triangle inequality
W.sub.H (e'"(x).sym.x.sup.n-1).ltoreq.W.sub.H e'"(x)+1 (57)
finally from inequality 55
W.sub.H e'"(x)+1<W.sub.H e"(x)+1=W.sub.H e'(x). (58)
From inequalities 57 and 58,
W.sub.H (e'"(x).sym.x.sup.n-1)<W.sub.H e'(x) (59)
Finally from equation 56 and inequality 59, one concludes,
e'(x).epsilon.E
which is a contradiction. Thus, e"(x).epsilon.E.
Now consider the following decoding algorithm:
(1) Received, r(x)=c(x)+e*(x); e*(x).epsilon.E is as yet unknown.
(2) Set i=-1, r.sub.o (x)=r(x).
(3) i=i+1.
(4) Form p(x)=s(f.sup.i r.sub.i (x)) and determine .delta..xi.*(p(x)).
(5) Form r.sub.i+1 (x) .DELTA.r.sub.i (x) .sym..delta..xi.* (p(x)).
(6) If i <t*n then returns to step 3.
(7) Set c(x)=r.sub.t *n(x).
Theorem 10:
The decision c(x) of the previous decoding method is maximum likelihood.
Proof:
(1) Let
r (x)=c(x).sym.e*(x) c(x).epsilon.C and e*(x).epsilon.E.
(2) Let
W.sub.H e*(x)=.gamma..ltoreq.t*
(3) Let s (e*(x)) .epsilon..xi.(e.sub.j '(x)) for some j.epsilon.{1,2. . . J}.
(4) Let
L.sub.j =.parallel..xi.(e.sub.j '(x)).parallel.
(5) Then there exists an integer m .epsilon.0,1,2, . . . L.sub.j-1 such that
e.sub.j '(x)=f.sup.m e*(x)
also, since L.sub.j .ltoreq.n (from Theorem 2)
.thrfore.m.ltoreq.n
(6) Hence, ##EQU11## where c'(x).epsilon.C and e.sub.j '(x).epsilon.E
(7)
s(r.sub.m (x))=s(e.sub.j '(x)).epsilon..xi.*
.thrfore..delta..xi.*(s(r.sub.m (x))=x.sup.n-1
(8)
r.sub.m (x)=c'(x).sym.e.sub.J "(x)+x.sup.n-1
where, e.sub.j (x)=e.sub.j "(x).sym.x.sup.n-1
(9)
r.sub.m+1 (x)=f c'(x).sym.e.sub.j "(x).sym.x.sup.n-1 .sym..delta..xi.*(s(r.sub.m (x))
and .delta..sub..xi. *(s(r.sub.m (x))=x.sup.n-1
.thrfore.r.sub.m+1 (x)=fc'(x)+e.sub.j "(x)
(10) From Theorem 9,
e.sub.j "(x).epsilon.E
and W.sub.H e.sub.j "(x)=W.sub.H e.sub.j '(x)-1
(11) Thus after m<n cyclic shifts the Hamming weight of the error pattern for sure reduces by 1 and exactly one error is corrected.
(12) Thus after .gamma.n cyclic shifts the weight of the error pattern left is .0. and no further errors are corrected as s(.0.)=0 .epsilon..xi.*.
(13)
.BECAUSE..gamma..ltoreq.t*
.thrfore..gamma.n.ltoreq.t*n
that after t*n cyclic shifts all errors been reduced to weight zero.
(14) Since exactly .gamma. errors are corrected and the syndrome reduced to zero, hence the results is maximum likelihood.
In conclusion, note that the functions .delta..xi.*(.multidot.) can be built by some amount of combinatoric logic and hence no memory is required. Also, one suboptimum decoding strategy is to form a set,
.xi.** .xi.* such that any
e'(x).epsilon.{.xi.*-.xi.**}satisfies
W.sub.H e'(x)>t'.ltoreq.t*,
and using the function, ##EQU12## instead of .delta..sub.86 *(.multidot.) in the above algorithm. Then any error of weight >t' will not be corrected after decoding, however, it should be readily evident that any error of weight .ltoreq.t' will be corrected. Thus bounded distance decoding can be simply done using this technique.
Turning now to FIG. 1 of the drawings, there is shown a decoder for cyclic codes in accordance with the present invention. For purposes of illustration, it will be assumed that the incoming received bits were encoded in accordance with the (17, 9) 2-QP cyclic code generated by g(x)=1+x.sup.3 +x.sup.4 +x.sup.5 +x.sup.8. The received bits are clocked into the register 11 in a conventional manner. As soon as a whole received code word (17 bits) has been read in, it is parallel-loaded into storage register 12. The parallel output (r.sub.i (x)) of the storage register is coupled to the syndrome former 13, which as the name implies forms the syndrome of the stored code word. If there is no error in the code word, the syndrome former of course provides no meaningful output (s(x)=0). As shown in FIG. 2, applicant has implemented the syndrome former 13 using only combinational logic, rather than the feedback shift register approach of the Meggitt decoder. The logic of FIG. 2 consists of a plurality of exclusive-OR gates 21, connected in a tree-like configuration, and output inverters 22. Since the function of an exclusive-OR gate is well known, a detailed explanation of the operation of the FIG. 2 circuit would not appear necessary; it is essentially self-explanatory. It should be appreciated that the syndrome former logic circuit of FIG. 2 forms the requisite syndrome(s) for, and only for, the (17, 9) cyclic code. For other and different cyclic codes the combinational logic of the syndrome former 13 would, of course, be different--i.e., a different configuration of exclusive-OR gates. However, given the foregoing mathematical analysis it is within the skill of one in the art to design the requisite syndrome logic circuit for other and different cyclic codes.
The output (s(x)) of the syndrome former 13 is delivered to the logic circuit 14, labeled .delta..sub..xi. *(s(r.sub.i (x))), which determines whether the last bit of the stored code word is in error or not and if so, whether we want to correct it. As shown in detail in FIG. 3, the logic circuit 14 comprises a plurality of NAND gates 31, 32. To simplify the drawing, and as was done in part in FIG. 2, airline connections from the gates 31 to the gate 32 are utilized. The circuit of FIG. 3 is of sufficient simplicity as to obviate detailed description; it is essentially self-explanatory. For other and different cyclic codes this logic circuit would, of course, be different--i.e., a different NAND gate configuration. However, once again, given the previous mathematical analysis it is within the skill of one in the art to design the requisite logic circuitry for other and different cyclic codes.
The decision of the logic circuit 14 is modulo-2 added (15) with the last stored bit, the output being the correct version of the last bit. If this last bit is in error it is corrected, and if there is no error it is unchanged. The storage register 12 is then clocked so that the output of the modulo-2 adder 15 (i.e., the correct version of the last bit) moves into the input stage of the register 12. The whole operation is repeated nt* times (or nt' for suboptimum decoding) at the end of which the maximum likelihood decision on r(x) is present in the storage register, ready to be read out.
For the assumed cyclic code, the length n of the code word is a prime number (17) and, therefore, there are exactly (2.sup.r -1)/n=(2.sup.8 -1)/17=15 syndrome chains (Theorem 8A). These chains are drawn out in FIGS. 4-18. Each circle on each of these figures contains a number and a polynomial. As indicated by the key diagram of FIG. 4, the number (N) is the syndrome in decimal form. If the syndrome s(x) is,
s(x)=s.sub.0 +s.sub.1 x+s.sub.2 x.sup.2 + . . . +s.sub.7 x.sup.7,
then,
N=s.sub.7 +2s.sub.6 +2.sup.2 s.sub.5 +2.sup.3 s.sub.4 +2.sup.4 s.sub.3 +2.sup.5 s.sub.2 +2.sup.6 s.sub.1 +2.sup.7 s.sub.0.
The polynomial p(x) is the error pattern .epsilon.E that corresponds to the syndrome s(x). Also on each chain, certain circles are marked with a star (*). These correspond to those syndromes whose error pattern has degree=16.
At least one of the starred circle syndromes from each chain must be included in the set .xi.*. Note that the single error chain (FIG. 4) has only one starred circle, the double error chains (FIGS. 5-12) have two starred circles each, and the triple error chains (FIGS. 13-18) have three starred circles each. Next observe that including more than one syndrome in a starred circle from the same chain in .xi.* also leads to maximum likelihood decoding. This is readily verified by noting that Theorem 10 supra section still remains valid. This fact allows simplification of the logic required to build .delta..sub..xi. *(s(r.sub.i (x))) as, of the multiple starred circle syndrome choices for the same chain, .delta..sub..xi. *(s(r.sub.i (x))) can be made=x.sup.n-1 on one of these syndromes and either .0. or x.sup.n-1 on the other(s). Thus, multiple choices for starred circle syndromes lead to "don't care" logic conditions and thus simplify logic.
The table of FIG. 19 lists the chain numbers, their starred circle syndromes and defines a possible choice of .delta..sub..xi. *(s(r.sub.i (x))) over the set of all starred circle syndromes. Note that at least one starred circle syndrome from each chain leads to .delta..sub..xi. *(s(r.sub.i (x)))=x.sup.n-1. For the (17, 9) cyclic code, a minimization of logic shows that .delta..sub..xi. *(s(r.sub.i (x))) can be built using only 8 NAND gates (FIG. 3).
For illustrative purposes, assume that the code word stored in register 12 contains two errors--four bits apart--and that the erroneous bits are initially deposited in the first and fifth stages of the register 12. The syndrome former 13 will generate the appropriate syndrome--136 in decimal--and deliver the same to the logic circuit 14. For this particular error condition (double error), the fifth syndrome chain is operative (see FIG. 8). However, since the last bit of the stored code word is not in error, no correction is called for and this last bit is simply clocked back into the input stage of register 12 via the modulo-2 adder 15. The stored (error) bits are simultaneously shifted one bit position, and the whole operation is repeated again, and again. The syndrome former generates the successive syndromes 136, 68, 34, 17, 148 . . . as the stored bits are successively shifted a bit position at a time. Finally, the last bit of the stored word will be one of the error bits, the syndrome former will then generate the appropriate syndrome (226 in decimal), the logic circuit in response thereto determines that the present last stored bit is in error and the appropriate binary signal is sent to the modulo-2 adder to correct the error. The corrected version of the last bit is then clocked into the input stage of the shift register. Hence, one of the two errors has been corrected.
With only a single error now in the stored code word, the first syndrome chain is operative (see FIG. 4). The storage register 12 is continually clocked and the syndrome former generates successive syndromes (e.g. 241, 228, 114), which are inoperative, until the error bit becomes the last bit of the stored code word. As shown in FIG. 4, when the last bit is in error the syndrome former generates the decimal 57 syndrome. In response to this input syndrome, the logic circuit 14 determines that the last bit is in fact erroneous and it sends the appropriate signal to the modulo-2 adder 15 to correct the error. The corrected version of the last bit is then clocked into the storage register, and both errors have thus been eliminated from the code word.
A relatively simple cyclic code with just two errors was chosen for purposes of explanation. For a more complex code, such as (63, 39), having multiple errors the decoding operation would be more involved. Nevertheless, the basics of the operation remain the same--i.e., successive chains of syndromes are formed to successively correct the error bit in the last bit position of the stored word.
Considering now one further example which particularly points out the distinct operation of the present invention, let it be assumed that the stored code word contains two errors--eight bits apart--and that the erroneous bits are initially deposited in the first and ninth stages of the storage register 12. The syndrome former 13 will generate the appropriate syndrome--28 in decimal--and deliver the same to logic circuit 14. For this particular error condition (double error), the ninth syndrome chain is operative (see FIG. 12). The last bit of this stored code word is not in error and therefore no correction is called for at this time. The syndrome former 13 generates the successive syndromes 28, 14, 7, 159, 211 . . . as the stored bits are successively shifted a bit position at a time. Finally, the last bit of the stored word will be one of the error bits. The syndrome former will then generate the appropriate syndrome (165 in decimal), but the logic circuit 14 in this case will not respond (unlike the Meggitt decoder) since this is a "don't care" condition (see table of FIG. 19) which is chosen to be a zero to achieve simpler circuitry for the logic 14. This error bit is therefore not corrected at this time. Further clocking of the storage register 12 eventually results in the other error bit being shifted into the last stage of register 12. The syndrome former 13 then generates the syndrome 56 (in decimal) and the logic circuit 14 responds thereto to send the appropriate signal to the modulo-2 adder 15 to correct the error. The corrected version of the last bit is then clocked into the register 12. Hence, one of the two errors has been corrected.
With only a single error now in the stored code word, the first syndrome chain is operative (see FIG. 4). The syndrome former then goes through the syndromes 1, 156, 78, 39 . . . , which are inoperative, until the error bit becomes the last bit of the stored code word. The syndrome former then generates the decimal 57 syndrome and the error bit is thus corrected as previously described.
It will be evident from the foregoing explanation that there are instances where the last bit of the stored word is in error, which syndrome former appropriately responds to, but the logic circuit 14 chooses to ignore (i.e., the "don't care" condition). This "don't care" alternative permits a considerable reduction in the complexity of the logic circuit 14. However, this does not mean that the error goes uncorrected. As the syndrome former 13 cycles through successive chains of syndromes all of the errors will ultimately be corrected.
The storage register 12 can be clocked at a very high rate (e.g., 10 to 100 megahertz). The only limiting factor is the delay encountered in the syndrome former 13, logic circuit 14 and adder 15. However, since the syndrome former 13 and logic 14 comprise simply a series of logic gates, which can be readily ICed, the total series delay through these gates will be measured in nanoseconds (e.g., 10 ns). Accordingly, a decoder in accordance with the invention operates in real-time. That is, while a received code word is being read into register 11, the previous code word is corrected in storage register 12 in the manner described. And this corrective procedure will be carried out before the code word read-in to register 11 is completed.
The principles of the present invention are in general applicable to all cyclic codes as well as shortened cyclic codes. For example, the illustrative embodiment designed for the (17,9) cyclic code is equally useful in decoding the shortened (16,8) code.
It is to be understood that the foregoing disclosure is merely illustrative of the application of the principles of the present invention and numerous modifications or alterations may be devised by those skilled in the art without departing from the spirit and scope of the invention.
Claims
  • 1. Apparatus for decoding cyclic codes that may incorporate one or more errors comprising first register means for receiving a cyclic code word, second register means for storing the code word received by the first register means, means for forming the syndrome of the code word stored in the second register means, means responsive to said syndrome for determining whether the last bit of the stored code word is in error, means for modulo-2 adding the output of the determining means with said last bit to provide a correct version of the last bit, means for shifting the output of the modulo-2 means into the input of the second register means, and means for repeating the correction operation a predetermined number of times at the end of which the maximum likely code word is present in the second register means, said forming means comprising means for forming successive syndrome chains of multiple syndromes each to correct errors in a received cyclic code word.
  • 2. Apparatus as defined in claim 1 wherein the first and second register means respectively comprise first and second shift registers, and means for clocking the second shift register at a rate substantially greater than the clock rate of the first shift register.
  • 3. Apparatus for decoding an (n,k) cyclic code as defined in claim 1 wherein the number of syndrome chains (J) is given by J=(2.sup.r -1)/n, where r.DELTA.n-k.
  • 4. Apparatus as defined in claim 3 wherein the syndrome forming means and the determining means are each comprised of combinational gate logic.
  • 5. Apparatus as defined in claim 4 wherein the syndrome former means comprises a plurality of exclusive-OR gates connected in a tree-like configuration.
  • 6. Apparatus as defined in claim 4 for decoding the (17,9) cyclic code wherein the determining means consists of eight NAND gates.
  • 7. A method for decoding cyclic codes comprising the steps of receiving an (n,k) cyclic code word, storing the received code word in a register, forming the syndrome of the stored code word, determining from the syndrome whether the last bit of the stored code word is in error, binarily adding the result of the determination with said last bit to provide a correct version of the last bit, shifting said correct version into the input of said register, and repeating the forming, determining, adding and shifting steps a predetermined number of times at the end of which the maximum likely code word will be present in the register, said forming step comprising forming successive syndrome chains of multiple syndromes each to correct errors in a received cyclic code word.
  • 8. A method for decoding an (n,k) cyclic code as defined in claim 7 wherein the number of syndrome chains (J) is given by J=(2.sup.r -1)/n, where r.DELTA.n-k.
  • 9. A method for decoding cyclic codes comprising the steps of
  • (a) storing a received cyclic code vector r(x), where r(x)=c(x)+e*(x), c(x) being the maximum likely code word and e*(x) the transmission error;
  • (b) initializing variable i=-1 and polynomial r.sub.0 (x)=r(x),
  • (c) incrementing i=i+1;
  • (d) forming polynomial p(x)=s(f.sup.i r(x)), where s(f.sup.i r(x)) is the syndrome of the received vector;
  • (e) determining .delta..sub..xi. *(p(x)) from the polynomial p(x) to indicate whether the last bit of the stored code vector is in error;
  • (f) forming r.sub.i+1 (x).DELTA.r.sub.i (x).sym..delta..sub..xi. *(p(x));
  • (g) checking if i<t*n, where t*n is a predetermined number defined by the maximum error correcting capability of the code used, and if i<t*n repeating steps c, d, e and f or else proceeding to step h; and
  • (h) setting c(x)=r.sub.t *.sub.n (x), where r.sub.t *.sub.n (x) is the maximum likely code word.
US Referenced Citations (4)
Number Name Date Kind
3568148 Clark, Jr. Mar 1971
3671947 Bossen et al. Jun 1972
3818442 Solomon Jun 1974
4167701 Kuki et al. Sep 1979
Non-Patent Literature Citations (1)
Entry
W. Wesley Peterson et al., Error Correcting Codes, The Mit Press, 1972, pp. 232-235.