The present invention relates generally to coding systems. More specifically, the present invention relates to a BCH code with 256 information bytes and up to 8 bytes of parity check elements.
Bose-Chadhuri-Hocquenghem (BCH) code is known. United States Patent Application No. 20040181735 by Xin, Weizhuang (Wayne) discloses decoding a received BCH encoded signal comprising a method or apparatus for decoding of a BCH encoded signal, which begins by determining whether the received BCH encoded signal includes error. The decoding process continues when the received BCH encoded signal includes error by determining whether the error is correctable. This may be done by determining a number of errors of the received BCH encoded signal, identifying bit locations of the received BCH encoded signal having the error; counting the number of bit locations of the received BCH encoded signal having the error, comparing the number of errors to the number of bit locations of the received BCH encoded signal having the error, when the number of bit locations of the received BCH encoded signal having the error equals the number of errors, ceasing the identifying of the bit locations of the received BCH encoded signal having the error, and correcting information contained in the bit locations of the received BCH encoded signal having the error when the identifying of the bit locations is ceased.
However, there are needs in both the design method and the encoding/decoding method for a suitable BCH coding system having a suitably long code (e.g. with 256 information bytes and up to 8 bytes of parity check elements). This is especially true for the design of a BCH code, whereby both the minimal polynomials and generator polynomial are very hard to generate. Furthermore, during the design stage of the BCH code, shortening is performed. Shortening makes the design special, also distinguishes the decoding methods with others.
A BCH code with 256 information bytes and up to 8 bytes of parity check elements is provided.
A coding system comprises pre-multiply the message u(x) by Xn−k. Obtain the remainder b(x), i.e. the parity check digits. And combine b(x) and Xn−ku(x) to obtain the code polynomial.
A decoding method comprises calculating a syndrome; finding an error-location polynomial; and computing a set of error location numbers.
The accompanying figures, where like reference numerals refer to identical or functionally similar elements throughout the separate views and which together with the detailed description below are incorporated in and form part of the specification, serve to further illustrate various embodiments and to explain various principles and advantages all in accordance with the present invention.
Skilled artisans will appreciate that elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. For example, the dimensions of some of the elements in the figures may be exaggerated relative to other elements to help to improve understanding of embodiments of the present invention.
Before describing in detail embodiments that are in accordance with the present invention, it should be observed that the embodiments reside primarily in combinations of method steps and apparatus components related to a BCH code with two hundred fifty six (256) information bytes and up to eight (8) bytes of parity check elements. Accordingly, the apparatus components and method steps have been represented where appropriate by conventional symbols in the drawings, showing only those specific details that are pertinent to understanding the embodiments of the present invention so as not to obscure the disclosure with details that will be readily apparent to those of ordinary skill in the art having the benefit of the description herein.
In this document, relational terms such as first and second, top and bottom, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms “comprises,” “comprising,” or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by “comprises . . . a” does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
It will be appreciated that embodiments of the invention described herein may be comprised of one or more conventional processors and unique stored program instructions that control the one or more processors to implement, in conjunction with certain non-processor circuits, some, most, or all of the functions of relating to a BCH code with two hundred fifty six (256) information bytes and up to eight (8) bytes of parity check elements. In the exemplified embodiments, it is noted that the processors include Finite State Machines, which are used in the preferred embodiment. The non-processor circuits may include, but are not limited to, a radio receiver, a radio transmitter, signal drivers, clock circuits, power source circuits, and user input devices. As such, these functions may be interpreted as steps of a method with reduced memory requirements to perform a BCH code with two hundred fifty six (256) information bytes and up to eight (8) bytes of parity check elements. Alternatively, some or all functions could be implemented by a state machine that has no stored program instructions, or in one or more application specific integrated circuits (ASICs), in which each function or some combinations of certain of the functions are implemented as custom logic. Of course, a combination of the two approaches could be used. Thus, methods and means for these functions have been described herein. Further, it is expected that one of ordinary skill, notwithstanding possibly significant effort and many design choices motivated by, for example, available time, current technology, and economic considerations, when guided by the concepts and principles disclosed herein will be readily capable of generating such software instructions and programs and ICs with minimal experimentation.
Referring to
A Bose-Chadhuri-Hocquenghem (BCH) code with 256 information bytes and up to 8 bytes of parity check elements suitable for generating by the circuit 100 of
Let m=12 and t=4, we got n=4095; i.e. n=2m−1=212−1=4095
The primitive polynomial is:
p(x)=1+X+X4+X6+X12 Eq. 1
with n=4095, we get k=4047
We also get the generator polynomial as:
g(X)=1+X+X3+X5+X7+X13+X16+X17+X21+X26+X27+X29+X32+X34+X36+X37+X41+X44+X48 Eq. 2
resulting in a (4095, 4047) BCH expression.
Since we need k=2048, and 4047−2048=1999, therefore, if we shorten the (4095, 4047) BCH code by 1999 bits we get a (2096, 2048) shortened BCH code.
Minimal polynomials of the BCH code for the encoder is as follows:
α: φ1(X)=1+X+X4+X6+X12
α3: φ3(X)=1+X+X3+X4+X6+X10+X12
α5: φ5(X)=1+X+X2+X3+X6+X12
α7: φ7(X)=1+X+X3+X5+X6+X10+X12
Because BCH code is a cyclic code, therefore given a generator polynomial g(X) of an (n, k) cyclic code, we can put the code into systematic form such as the following:
(message) information is: (u0, u1, . . . , uk−1), and
Code word is: (b0, b1, . . . , bn−k−1, u0, u1, . . . , uk−1).
As can be seen the right most k digits of the code word are the unaltered information digits, and the leftmost n−k digits are parity-check digits.
Let message be:
{right arrow over (u)}=(u0,u1, . . . , uk−1) Eq. 3
Then,
u(x)=u0+u1X+ . . . +uk−1Xk−1 Eq. 4.
Multiply both sides of Eq. 4 by Xn−k, we got:
X
n−k
u(X)=Xn−ku0+u1Xn−k+1+ . . . +uk−1Xn−1 Eq 5
Dividing Eq. 5 (i.e. Xn−ku(x)) by g(x), we can get the following expression:
X
n−k
u(x)=a(x)g(x)+b(x) Eq. 6
Since g(x) has n−k degrees, the degree of b(x) must be n−k−1 or less, that is:
b(x)=b0+b1X+ . . . +bn−k−1Xn−k−1 Eq. 7
b(x)+Xn−ku(x)=a(x)g(x) Eq. 8
As can be seen this polynomial is a multiple of g(x) and therefore is a code polynomial. Combining equations six and seven (Eq. 6 and Eq. 7), we get:
b(x)+Xn−ku(x)=b0+b1X+ . . . +bn−k−1Xn−k−1+Xn−ku0+u1Xn−k+1+ . . . +uk−1Xn−1 Eq. 9
which corresponds to the code word (b0, b1, . . . , bn−k−1, u0, u1, . . . , uk−1).
The coding can be realized as shown in
b(x)+Xn−ku(x) Eq. 9.
On the decoder side, in
Let Si=r(αi)
S
1
=r(α)=r0+r1α+r2α2+ . . . +rn−1αn−1
S
2
=r(α2)r0+r1α2+r2α4+ . . . +rn−1(α2)n−1Etc Equ. 10
generating syndrome values of the received BCH encoded signal, interpreting the syndrome values; and when the syndrome values do not equal zero, determining that the received BCH encoded signal includes errors.
Second, using Berlekamp's algorithm to find the error-location polynomial (Step 304).
σ(3)(x)=1+S1X+S1X2+S2X3
d
3
=S
7
+S
1
S
6
+S
1
S
5
+S
2
S
4
Where:
α1=S1α1999
σ2=(S1+d3d2−1)α1999×2
σ3=(S1+d3d2−1S1)α1999×3
σ4=d3d2−1(S3S1−1+S2)α1999×4
Third, error location numbers is calculated and error correction is performed (Step 306) using Chien's search to compute error-location numbers and perform error correction. σσi+σi+αiα(σi+σi)
Let α12=1+α+α4+α6 then,
σα=(σ0+σ1α+σ2α2+σ3α3+σ4α4+σ5α5+σ6α6+σ7α7+σ8α8+σ9α9+σ10α10+σ11α11)α Equ. 11
Equ. 11 can be reorganized as follows:
σα=σ11+(σ0+σ11)α+σiα2+σiα3+(σi+σi)α4+σiα5+(σi+σi)α6+σiα7+σiα8+σiα9+σiα10+σiα11 Equ. 12
Similarly, we have:
σα2=σi+(σi+σi)α+(σi+σi)α2+σiα3+(σi+σi)α4+(σi+σi)α5+(σi+σi)α6+(σi+σi)α7+σiα8+θiα9+σiα10+σiα11 Equ. 13
σα3=σi+(σi+σi)α+(σi+σi)α2+(σi+σi)α3+(σi+σi)α4+(σi+σi)α5+(σi+σi)α6+(σi+σi)α7+(σi+σi)α8+σiα9+σiα10+σiα1 Equ. 14
σα4=σi+(σi+σi)α+(σi+σi)α2+(σi+σi)α3+(σi+σi)α4+(σi+σi)α5+(σi+σi+σi)α6+(σi+σi)α7+(σi+σi)α8+σiα9+σiα10+σiα1 Equ. 15
let σ(x)=1+σ0+σ1x+σ2x2+σ3x3+σ4x4 then
σ(α)=1+σ0+σ1α+σ2α2+σ3α3+σ4α4
σ(α2)=1+σ0+σ2α2+σ2α4+σ3α6+σ4α8
σ(α1)=1+σ0+σ2α1+σ2α2+σ3α3+σ4α41
If the sum of the above is zero, then αn−1 is an error-location number.
In the foregoing specification, specific embodiments of the present invention have been described. However, one of ordinary skill in the art appreciates that various modifications and changes can be made without departing from the scope of the present invention as set forth in the claims below. Accordingly, the specification and figures are to be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of present invention. The benefits, advantages, solutions to problems, and any element(s) that may cause any benefit, advantage, or solution to occur or become more pronounced are not to be construed as a critical, required, or essential features or elements of any or all the claims. The invention is defined solely by the appended claims including any amendments made during the pendency of this application and all equivalents of those claims as issued.