This invention is in general related to a high speed Reed-Solomon (RS) decoder suitable for decoding shortened/punctured RS codes.
A digital communications system includes an encoder (or transmitter) for encoding and transmitting data, a decoder (or receiver) for receiving and decoding data, and a channel between the encoder and decoder. The channel is generally noisy and causes corruption in the data transmitted therethrough. For the correct data to be recovered, an error-correction code is used during encoding at the encoder side and used by the decoder to correct the corruption in the data. One popular type of such error-correction code is called the Reed-Solomon (RS) code. An encoder/decoder utilizing the RS code is called an RS encoder/decoder. The RS code is briefly explained next.
RS codes are nonbinary codes, i.e., the unit thereof is not a binary bit, but rather a symbol made up of multiple binary bits. For example, in an 8-bit-byte system, each symbol (or byte) contains 8 binary bits and an RS code contains a number of symbols. In the following description, it is assumed that each symbol is composed of m binary bits, where m is an integer. A symbol containing m bits, am−1, am−2, . . . , a0, may be represented by an (m−1)-degree polynomial, K(x)=am−1xm−1+am−2xm−2+ . . . +a0, where x is the indeterminate. Thus, the collection of all 2m possible m-bit symbols constitute a set {K(x)=am−1xm−1+am−2xm−2+ . . . +a0}, where αi ε{0,1} for i=0, 1, . . . , m−1.
Set {K(x)}, coupled with an addition operator (+) and a multiplication operator (×) defined thereupon, defines a finite field, or Galois field, which may be denoted as GF(2m). Particularly, the addition of the elements of GF(2m) (or elements of {K(x)}) is defined as a binary addition of the corresponding polynomials, where the coefficients of the same powers in the corresponding polynomials are added modulo 2. The modulo-2 addition is defined as a binary addition with no carry, for example, 0+1=1, and 1+1=0. When two elements of GF(2m) are multiplied, the corresponding polynomials are multiplied and reduced to a residue modulo f(x), i.e., multiples of f(x) are reduced to 0. Here f(x) is an m-degree primitive polynomial of GF(2m), which by definition is irreducible and divides xn+1 when n=2m−1, but does not divide xn+1 when n<2m−1. Thus, the addition or multiplication of two elements of GF(2m) generates a polynomial of order not greater than m−1, which corresponds to another element of GF(2m).
It is well known that GF(2m) as defined above includes a so-called primitive element α that is a root of f(x), and every element of GF(2m) except 0 is a power of α. Because f(x) divides x2
With each element of GF(2m) representing an m-bit symbol, a data sequence containing a sequence of symbols may be represented by a vector including a sequence of elements of GF(2m). For example, a sequence of symbols represented by n (n being an integer) elements of GF(2m), cn−1, cn−1, . . . , c0, form an n-degree vector C over GF(2m), (cn−1, cn−2, . . . , c0. C may be further represented by a polynomial with the sequence of elements of GF(2m) as coefficients of the polynomial, i.e., C(x)=cn−1xn−1+cn−2xn−2+ . . . +c0.
According to the conventional method for RS encoding, redundant symbols are added to a message block to form an RS code, where the redundant symbols and the symbols of the message block satisfy a predetermined condition. The RS code is then transmitted through a channel. A receiver receives the transmitted RS code and determines if the RS code has been corrupted by evaluating whether the received RS code still satisfies the same condition. The receiver corrects any error in the received RS code and extracts the message block therefrom.
Particularly, when a message block M containing k symbols, mk−1, mk−2, . . . , m0, is encoded, a parity sequence P containing a number of redundant symbols (also called parity symbols) is appended to the end of message block M to form an n-degree vector C, where 0<k<n<2m+2. Thus, vector C includes k message symbols of message block M, mk−1, mk−2, . . . , m0, followed by n−k parity symbols, pn−k−1, pn−k−2, . . . , p0, and may be expressed as
The encoding is carried out such that C(x) is divisible by a generator polynomial
where l is called the offset and may be any integer. In the following, it is assumed that l=1 for simplicity. If C satisfies condition (2), C is called a valid codeword or a codeword. It is well known that an RS code is cyclic, meaning that if an n-symbol sequence C, cn−1, cn−2, . . . , c0, is a valid codeword, then when C is shifted by b symbols to generate a new sequence Cb, cn−b−1, cn−b−2, . . . , c0, cn−1, cn−2, . . . , cn−b, Cb is also a valid codeword, where b is any integer.
After encoding, vector C is transmitted through the channel.
At the decoder side, a vector R corresponding to codeword C is received and includes rn−1, rn−2, . . . , r0, which may differ from the original n symbols of C, mk−1, mk−2, . . . , m0, pn−k−1, pn−k−2, . . . , p0, due to noise in the channel. The decoder then decodes R to recover C as follows.
First, syndromes are computed for R. Syndromes of R are defined as Si=R(αi+1) for i=0, 1, . . . , n−k−1, where R(x) is the polynomial representation of R:
R(x)=rn−1xn−1+rn−2xn−2+ . . . +r0. (3)
From (2), if no error occurs in the received vector R, Si should be 0 for i=0, 1, . . . , n−k−1, because g(x)|(R(x)=C(x)). However, if it is assumed there are t errors occurring at unknown locations j1, j2, . . . , jt, and the errors in the received symbols of R at these locations have values e1, e2, . . . , et, where ei=rj
R(x)=C(x)+e(x), (4)
where e(x)=e1xj
βi=αj
Combining (2), (4), and (5), there are:
S0=e1β1+e2β2+ . . . , +etβt,
S1=e1β12+e2β12+ . . . +etβt2,
Sn−k−1=e1β1n−k+e2β2n−k+ . . . +etβtn−k. (6)
Because there are 2t unknowns, e1, e2, . . . , et, β1β2, . . . , βt, and (6) has n−k equations, a solution may be found if n−k≧2t. In other words, the RS code can correct up to └(n−k)/2┘ errors, where └x┘ is the floor function which gives the greatest integer not greater than x.
To facilitate solving the equations in (6), an error locator polynomial σ(x) is defined as
an error evaluator polynomial ω(x) is defined as
and a syndrome polynomial S(x) is defined as
From (6)-(9), there is
S(x)σ(x)=ω(x) mod xn−k. (10)
Equation (10) is called the key equation, and may be solved by a computer system applying a modified Euclidean (ME) algorithm to find σ(x) and ω(x). After σ(x) and ω(x) are determined, the location of the errors are determined by determining the roots of σ(x), which may be carried out by performing a Chien search. The Chien search simply computes the value of σ(x) at points α0, α−1, . . . , α−(n−1). Note that, because α2
for i=1, 2, . . . , t, where σ′(x) is the derivative of σ(x):
If l≠1, there is
The errors are then subtracted from R, i.e., ci=rj
In “High-Speed VLSI Architecture for Parallel Reed-Solomon Decoder,” Hanho Lee, IEEE Trans. on Very Large Scale Integration Systems, v. 11, No. 2, April 2003, pp. 288-294 (“Lee”), the entire contents of which are incorporated herein by reference, an RS decoder implementing the above decoding method was proposed. The RS decoder of Lee is briefly discussed herein, with reference to the figures of Lee, which are reproduced here as FIGS. 1, 2A-2B, 3A-3B, and 4A-4C.
1. First, let R0(x)=xn−k, Q0(x)=S(x), L0(x)=0, U0(x)=1
2. Repeat the calculation of Ri(x), Qi(x), Li(x), Ui(x), i being the index starting from 1, where for each i-th iteration,
Ri(x)=[λi−1bi−1Ri−1(x)+{overscore (λ)}i−1ai−1Qi−1(x)]−x|l
Qi(x)=λi−1Qi−1(x)+{overscore (λ)}i−1Ri−1(x),
Li(x)=[λi−1bi−1Li−1(x)+{overscore (λ)}i−1ai−1Ui−1(x)]−x|l
Ui(x)=λi−1Ui−1(x)+{overscore (λ)}i−1Li−1(x),
where ai−1, and bi−1 are the leading coefficients of Ri−1(x) and Q−1(x), respectively, and
The reiteration of step 2 stops when deg(Ri(x))<└(n−k)/2┘;
3. ω(x)=Ri(x), and σ(x)=Li(x).
When σ(x) is determined, the coefficients thereof, σ0, σ1, . . . , σt, are sent to the Chien search block for evaluating σ(x) and σ′(x) for x=α0, α1, . . . , an−1, as shown in
Similarly, the coefficients of ω(x), ω0, ω1, . . . , ωi−1, are sent to the Forney algorithm block, as shown in
An RS code that encodes k-symbol message blocks and generates n-symbol codewords, where 0<k<n<2m+2, is referred to as an RS(n, k) code. An RS(n, k) code includes r=n−k parity symbols in each codeword. Generally, n=2m−1. For example, in an 8-bit-symbol system, a standard RS code (also called a mother RS code), RS(255, 239), encodes 239-symbol message blocks into 255-symbol codewords.
In order to offer different coding rates, RS(n, k) codes are frequently modified to generate RS(n′, k′) codes for encoding and decoding k′-symbol message blocks, where n′<n, k′<k, and k′<n′, through shortening and puncturing.
When a shortened/punctured vector R′ including n′ symbols, rn′−1, rn′−2, . . . , r0, is received, the decoder reconstructs a corresponding n-symbol vector R, by adding the shortened k−k′ symbols and the punctured s parity symbols to the n′ symbols of R′. The values and positions of the shortened symbols are known. The values of the punctured s parity symbols are unknown; however, their positions are predetermined and known to the decoder. The positions of the shortened and erased symbols may be randomly chosen. However, generally the first k−k′ symbols of each codeword are chosen for shortening and the last s parity symbols are chosen for puncturing, as shown in
When both erasures and errors are present, the decoding process discussed above must also address the erasures. First, when R is reconstructed, syndromes may be calculated using the syndrome computation block of FIGS. 2A-2B: Si=Rs(αi+1) for i=0, 1, . . . , n−k−1, where R(x)=rn′−1xs+n′−1+rn′−2+ . . . +r0xs. Assuming vector R includes t errors at positions j1, j2, . . . , jt, and s erasures at positions jt+1, jt+2, . . . , jt+s, and the error/erasure values e1, e2, . . . , e1+s then e(x)=e1xj
S0=e1β1+e2β2+ . . . +et+sβt+s,
S1=e1β12+e2β22+ . . . +et+sβt+s2,
Sn−k−1=e1β1n−k+e2β2n−k+ . . . +et+sβt+sn−k. (13)
Because the locations of the erasures are known, βt−1, βt−s, . . . , βt−s are known parameters and may be computed before the decoding process starts. Particularly, in the example above, the last r−r′ parity symbols are erased; therefore, jt+1=r−r′−1, jt+2=r−r′−2, . . . , jt+s, and s=r−r′. There are n−k equations in (13) containing 2t+s unknowns. Thus, equations (13) have a solution if n−k≧2t+s. In other words, an RS(n′, k′) code is capable of correcting t errors and s erasures, provided that n−k≧2t+s.
The error/erasure locator polynomial σ(x) is defined as
where
is the erasure locator polynomial, which may be computed before the decoding process, and
is the error locator polynomial. The error/erasure evaluator polynomial ω(x) is defined as
From (9) and (13)-(15), there is
S(x)σ(x)=ω(x) mod xn−k, (16)
or
S(x)σ0(x)σ1(x)=ω(x) mod xn−k. (17)
A modified syndrome polynomial S0(x) may be defined as:
S0(x)=S(x)σ0(x). (18)
After the syndromes Si are calculated, the modified syndrome polynomial S0(x) may be calculated according to Expression (18). The key equation is modified as follows:
S0(x)σ1(x)=ω(x) mod xn−k. (19)
The modified key equation may then be solve according to the ME algorithm using the ME algorithm block of
The IEEE 802.16a standard provides six standard shortened/punctured RS codes of a mother code RS(255, 239), as shown in Table 1. The first column, Rate ID, is for identification purposes. The second column shows the modulation schemes, where QPSK stands for quadrature phase shift keying, and QAM stands for quadrature amplitude modulation. The third column shows the resultant RS(n′, k′) codes.
Consistent with embodiments of the present invention, there is provided a decoder suitable for use in a digital communications system utilizing an RS(n′, k′) code modified from an RS(n, k) code receives n′-symbol vectors each including k′ message symbols and r′=n′−k′ parity symbols and decodes the n′-symbol vectors to correct errors therein, wherein n, k, n′, and k′ are integers, and k′<n′<n, k′<k<n, and wherein the decoder stores one erasure locator polynomial σ0(x). The decoder includes a syndrome calculator for receiving the n′-symbol vectors and for calculating syndromes of each n′-symbol vector, wherein the i-th syndrome Si of one n′-symbol vector R′, (rn′−1, rn′−2, . . . , r0), is Si=Rs(αi+1) for i=0, 1, . . . , n−k−1, wherein Rs(x)=rn′−1xn′−1+rn′−2xn′−2+ . . . +r0, and means for finding the locations and values of the errors in each n′-symbol vector using the syndromes thereof and the one erasure locator polynomial σ0(x).
Consistent with embodiments of the present invention, there is also provided a digital communications system utilizing an RS(n′, k′) code modified from an RS(n, k) code, wherein n, k, n′, and k′ are integers, and k′<n′<n, k′<k<n. The system includes a channel for data transmission, a transmitter for encoding k′-symbol message blocks into n-symbol codewords and transmitting n′ symbols of each codeword into the channel, and a receiver for receiving and decoding n′-symbol vectors each corresponding to the n′ symbols of one codeword transmitted by the transmitter. The receiver includes a memory device having store therein one erasure locator polynomial σ0(x) and look-up tables, a syndrome calculator for receiving the n′-symbol vectors and for calculating syndromes of each n′-symbol vector, wherein the i-th syndrome Si of one n′-symbol vector R′, (rn′−1, rn′−2, . . . , r0), is Si=Rs(αi+1) for i=0, 1, . . . , n−k−1, wherein Rs(x)=rn′−1xn′−1+rn′−2xn′−2+ . . . +r0, and means for finding the locations and values of the errors in each n′-symbol vector using the syndromes thereof and the one erasure locator polynomial σ0(x).
Consistent with embodiments of the present invention, there is still provided a method performed by a decoder for decoding an RS(n′, k′) code modified from an RS(n, k) code, wherein n, k, n′, and k′ are integers, and k′<n′<n, k′<k<n. The method includes storing one erasure locator polynomial σ0(x) in the decoder, receiving n′-symbol vectors each corresponding to a k′-symbol message block, and decoding the n′-symbol vectors. Furthermore, decoding each n′-symbol vector R′, (rn′−1, rn′−2, . . . , r0) includes calculating syndromes of R′, wherein the i-th syndrome Si is Si=Rs(αi+1) for i=0, 1, . . . , n−k−1, wherein Rs(x)=rn′−1xn′−1+rn′−2x′−2+ . . . +r0, and finding the locations and values of errors in R′ using the syndromes thereof and the one erasure locator polynomial σ0(x).
Additional features and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The features and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the objects, advantages, and principles of the invention.
In the drawings,
Reference will now be made in detail to preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts.
Embodiments consistent with the present invention provide a novel hardware implementation of a modified Reed-Solomon decoder for decoding modified RS codes.
In the following, it is assumed that an RS(n, k) code is defined over the Galois Field GF(2m) and generated by a generator polynomial
where l is an offset, and α is the primitive element of GF(2m) and is a root of an m-degree primitive polynomial f(x). Therefore, GF(2m) includes 0, 1(=α0), α1, . . . , α2
It is also assumed that the RS(n, k) code is modified into an RS(n′, k′) code by shortening the first k−k′ symbols thereof and puncturing the last s=r−r′ parity symbols, where n′<n, k′<k, k′<n′, r=n−k, r′=n′−k′. The shortened k−k′ symbols are assumed to be 0's. A receiver receives an n′-symbol vector R′, (rn′−1, rn′−2, . . . , r0), for each codeword and performs decoding to recover the original k′-symbol message blocks. For example, in the IEEE 802.16a standard, s may be 4, 8, or 12 (see Table 1).
A digital communications system 700 consistent with the present invention is shown in
Decoder/receiver 704 receives a garbled n′-symbol vector and performs decoding to correct errors therein.
To find the errors in n′-symbol vector R′, a corresponding n-symbol vector R is constructed by adding k−k′ 0's to the beginning of R′, and adding the s punctured parity symbols to the end of R′. For convenience, the s punctured parity symbols are assumed to be 0. Thus, the n symbols of R are 0, 0, . . . , 0, rn′−1, rn′−2, . . . , r0, 0, 0, . . . , 0, where there are k−k′ 0's before rn′−1 and s 0's following r0. A shifted vector Rs may be formed by shifting the erased (or punctured) s parity symbols of R to the beginning of R, as shown in
First, syndromes of Rs are calculated: Si=Rs(αi+1) for i=0, 1, . . . , n−k−1. Because the first n−n′ symbols of Rs are 0's, Rs(x)=rn′−1xn′−1+rn′−2x′−2+ . . . +r0. Therefore, the calculation of the syndromes of Rs may be carried out based solely on the received n′ symbols of R′. Because each R′ corresponds to a particular Rs, syndromes of Rs are also called the syndromes of R′ for convenience of illustration.
Next, modified syndrome polynomial S0(x) is computed: S0(x)=S(x)σ0(x), where
Assume R′ includes t errors at positions j1, j2, . . . , jt, then Rs includes t errors and s erasures, where the s erasures occur at positions jt+1=n−s, Jt+2=n−(s−1), . . . , jt+s=n. Assume the error/erasure values are e1, e2, . . . , et+s, where ei=rj
The key equation is:
S(x)σ(x)=ω(x) mod xn−k, (21)
where
may be further expressed as a product of the erasure locator polynomial σ0(x) and the error locator polynomial σ1(x), i.e.,
The modified key equation is:
S0(x)σ1(x)=ω(x) mod xn−k. (22)
The modified key equation (22) may be solved using any suitable algorithm such as Berlekamp-Massey algorithm or modified Euclidean algorithm, etc. For example, the modified Euclidean (ME) algorithm of Lee may be further modified (“further modified Euclidean algorithm”) consistent with embodiments of the present invention for a more efficient and compact hardware implementation. The further modified Euclidean algorithm is partly illustrated in
1. Initialization: Let A(x)=xn−k, B(x)=S0(x), T0(x)=0, T1(x)=1, stopping degree v=└(n′−k′)/2┘;
2. Division:
i. Calculate Q=Adeg A(x)/Bdeg B(x)=Adeg A(x)(Bdeg B(x))−1 (
ii. Bnew(x)=A(x)−Q×B(x) (
3. Multiplication: Tnew(x)=T0(x)−Q×T1(x) (
4. Stopping criteria:
i. If degTnew(x)≦v (
ii. Otherwise, set A(x)=B(x) (
Thus, as shown in
The coefficients of error/erasure locator polynomial σ(x), σ0, σ1, . . . , νt+s, and the coefficients of error/erasure evaluator polynomial ω(x), ω0, ω1, . . . , ωt+s−1, are sent to index adjustment circuit 721 for index adjustment.
The coefficients of adjusted error/erasure locator polynomial {tilde over (σ)}(x), {tilde over (σ)}0, {tilde over (σ)}1, . . . , {tilde over (σ)}t+s, and the coefficients of adjusted error/erasure evaluator polynomial {tilde over (ω)}(x), {tilde over (ω)}0, {tilde over (ω)}1, . . . , {tilde over (ω)}t+s−1, are sent to Chien search block 714 and Forney algorithm block 716 for determining the error locations and the error/erasure values.
As shown in
Further as shown in
Therefore, the error/erasure values determined by Forney algorithm block 716 of
When an RS(n′, k′) is used, where s parity symbols are punctured, the s erased parity symbols do not have to be corrected because they do not contain message symbols. Thus, as shown in
Moreover, the syndrome calculator 708 requires only n′ clock cycles, and the modified Euclidean divider 728 of the present invention requires only three clock cycles, both fewer than required by conventional RS(n, k) decoders. The total number of clock cycles required by key equation solver 712 consistent with the present invention requires much fewer clock cycles than that required by conventional RS(n, k) decoders. For example, when RS(120, 108) code of the IEEE 802.16a standard is used, the overall decoding process consistent with the present invention requires only about 250 clock cycles.
In addition, embodiments consistent with the present invention provide for a less complex circuit design. Particularly, fewer logic gates are needed by the present invention than by conventional decoders.
In the above descriptions, a shifted vector R, is formed for each n′-symbol vector R′ for the convenience of illustration. However, it is to be understood that the shift of R to generate Rs does not need to be realized in hardware, as is clear from the detailed discussions of decoder 704 in the above. A decoder consistent with the present invention treats the n′ symbols of vector R′ as the last n′ symbols of an n-symbol vector, assumes the first n−n′ symbols of the vector to be 0, and decodes the n-symbol vector to identify the errors therein.
It will be apparent to those skilled in the art that various modifications and variations can be made in the disclosed process without departing from the scope or spirit of the invention. Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.