The present disclosure relates generally to Forward Error Correction (FEC) codes, and particularly to methods and systems for low-latency decoding of Reed Solomon codes.
In various applications such as in communication and storage systems, data is protected using Forward Error Correction (FEC) codes. To protect a data message using a FEC code, e.g., a Reed Solomon code, the encoder typically adds to the data message redundancy information before sending the message to the destination, e.g., over some channel. At the receiver, a decoder uses the redundancy information for detecting and correcting errors that the channel may have caused while the sent message.
The description above is presented as a general overview of related art in this field and should not be construed as an admission that any of the information it contains constitutes prior art against the present patent application.
An embodiment that is described herein provides a decoder that includes a syndrome calculator, a Key Equation Solver (KES) and an error corrector. The syndrome calculator is configured to receive an n-symbol code word encoded using a Reed Solomon (RS) code to include (n−k) redundancy symbols, and to calculate for the code word 2t syndromes Si, t=(n−k)/2 is a maximal number of correctable erroneous symbols. The KES is configured to derive an error locator polynomial (x) whose roots identify locations of erroneous symbols, by applying to the syndromes a number of t iterations. In a single iteration of the t iterations the KES is configured to calculate two discrepancies between (x) and respective two candidates of (x), and to derive from the two candidates an updated candidate of (x). The error corrector is configured to recover the code word by correcting the erroneous symbols using the derived error locator polynomial (x).
In some embodiments, the KES is configured to represent candidates of (x) using a coefficient vector λ, and to derive updated candidates of (x) by re-calculating λ a total number of t times over the t iterations. In other embodiments, the KES is configured to derive the updated candidate of (x) so that the first and second discrepancies calculated based on the updated candidate are eliminated. In yet other embodiments, the KES is configured to define, in an ith iteration, a first syndrome vector S(2i) and a second syndrome vector S(2i+1), wherein S(i)=[Si, Si−1, . . . , Si−t], and to calculate the first and second discrepancies using the first and second syndrome vectors, respectively.
In an embodiment, the KES is configured to calculate the first discrepancy as δ=S(2i)′λ and to calculate the second discrepancy as δ1=S(2i+1)′λ1, wherein λ and λ1 are coefficient vectors representing respective candidates of (x) corresponding to S(2i) and S(2i+1), respectively. In another embodiment, the KES is configured to calculate the first discrepancy as δ=S(2i)′λ, to calculate, in parallel to the first discrepancy, first and second intermediate results δ11 and δ12, based at least on S(2i+1), and to calculate the second discrepancy using δ11 and δ12. In yet another embodiment, the KES is configured to store in each of the t iterations a shifted-by-one coefficient vector bSR and a shifted-by-two coefficient vector bSR2 derived by shifting a coefficient vector corresponding to a candidate of (x) one position and two position respectively, and to derive an updated candidate of (x) in a subsequent iteration based at least on one of bSR and bSR2.
In some embodiments, the KES includes three updating modules available for deriving the updated candidate of (x), and the KES is configured to derive the updated candidate of (x) using one of the three updating modules. In other embodiments, the KES is configured to select one of the three updating modules using a three-way decision operation that depends on δ and δ1, and then to calculate the updated candidate of (x), using the selected updating module. In yet other embodiments, the KES is configured to calculate three candidates of (x) using the three updating modules, in parallel, and then to select one of the three candidates of (x) using a three-way decision operation that depends on δ and δ1.
In an embodiment, the KES is configured to select one of the three updating modules in response to detecting that a first condition that depends on δ is true, and otherwise to calculate two updated candidates of (x) using remaining two updating modules, and selecting one of the two candidates of (x) by checking a second condition that depends on δ1.
There is additionally provided, in accordance with an embodiment that is described herein, a method for decoding, including, receiving for decoding by a decoder an n-symbol code word that was encoded using a Reed Solomon (RS) code. A number of 2t syndromes Si, i=0 . . . 2t−1 is calculated for the received code word, wherein t=(n−k)/2 a maximal number of erroneous symbols that the RS code is designed to correct, and (n−k) is a number of redundancy symbols in the code word. An error locator polynomial (x) whose roots identify locations of erroneous symbols in the received code word is derived for the received code word, by a Key Equation Solver (KES), by applying to the syndromes a number of t iterations. In a single iteration of the t iterations first and second discrepancies between (x) and respective first and second candidates of (x) are calculated by the KES, and an updated candidate of (x) is derived from at least one of the first and second candidates. An error-free version of the code word is derived by correcting the erroneous symbols using the derived error locator polynomial (x).
The present disclosure will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:
A Reed Solomon (RS) code denoted RS (n, k) is a block code that maps a message of k data symbols into a code word of n symbols by adding to the message a number of (n−k) redundancy symbols. A RS(n, k) code is capable of correcting up to t erroneous symbols, wherein t=(n−k)/2 for even-valued (n−k) and t=(n−k−1)/2 for odd-valued (n−k)
Embodiments that are described herein provide improved methods and systems for low-latency decoding or RS codes. The RS code, is described, for example, in “Polynomial Codes over Certain Finite Fields,” Journal of the Society for Industrial and Applied Mathematics, Volume 8, pages 300-304, 1960, which is incorporated herein by reference.
A RS decoder is typically required to determine a polynomial (x) that is indicative of the locations of the erroneous symbols in the code word. Conventionally, the decoder determines (x) using a hardware module that generates 2t candidate polynomials in 2t respective iterations. In the disclosed embodiments, however, the configuration of this hardware module has been changed so as to determine (x) by generating only t candidate polynomials in respective t iterations. Moreover, in an embodiment, the RS decoder executes some operations in parallel, each of the t iterations. Embodiments for determining (x) are described in detail below.
In the description that follows we refer mainly to RS codes that are defined over a finite field referred to as a Galois Field (GF) of the form GF(2m), which contains N=2m−1 elements {0, 1, α, α2, . . . , αN−1}, wherein a is a primitive element of GF(2m). Each element of (GF(2m) can be represented by an m-bit binary number. The disclosed techniques are similarly applicable to RS codes based on of finite fields.
A RS code is constructed by a generator polynomial g(x) whose roots are (n−k)=2t consecutive elements of the underlying GF, as given, for example by:
g(x)=(x−α0)(x−α1) . . . (x−α2t−1)=g0+g1x+ . . . +gn−kxn−k Equation 1:
In generating a code word of the RS code, the message to be encoded can interpreted as coefficients of a corresponding message polynomial M(x). The RS encoder typically multiplies N (x) by xn−k to make room for (n−k) redundancy symbols, and divides the product [M(x)·xn−k] by the generating polynomial g(x), which results in a quotient q(x) and a remainder r(X). The code word (CW) corresponding to the message is represented by the polynomial CW(x) given by:
CW(x)=M(x)·xn−k+r(x)=g(x)·q(x) Equation 2:
At the receiver side, one or more of the symbols of the code word may be erroneous, e.g., due to noise and distortion caused by the channel. The effect of the channel is sometimes modeled by an error polynomial E(x) added to the code word polynomial, i.e., the received code word is represented by a polynomial R(x) given by:
R(x)=CW(x)+E(x) Equation 3:
The values of the polynomial R(x) at the roots α1 of the generator polynomial g(x) are the syndromes of the code word denoted Si. Since the code word polynomial CW(x) is zeroed at the roots of g(x), the syndromes depend only on the error pattern as seen in Equation 4:
S
i
=R(αi)=CW(αi)+E(αi)=E(αi),i=0,1 . . . 2t−1 Equation 4:
Let ‘e’ denote the number of the erroneous symbols in the received code word, wherein e≦t. The error polynomial E(x) can be written as:
In Equation 5, the index ik (in the range 0 . . . n−1) denotes the location of the kth erroneous symbol, and Ei
To correct the erroneous symbols in the received code word, the decoder is required to find the number of erroneous symbols, in which of the code word symbols these errors occur (Xk), and the respective error values (Yk). The error locators Xk, k=1 . . . e, can be used for defining an error locator polynomial (x) given by:
Note that the degree of (x) equals the number of erroneous symbols in the received code word, and the reciprocals of the roots of (x) are the error locators Xk of the erroneous symbols. The syndromes Si and the error locator polynomial (x) are related via the following set of (2t−e) equations:
λ0Si+e+λ1Si+e−1+ . . . +λe−1Si+1+λeSi=0,i=0 . . . 2t−1 Equation 8:
Equation 8 is also referred to as the “key equation” and a method for solving Equation 8 having unknown variables λ0 . . . λe, wherein the number of errors ‘e’ is unknown is also referred to as a “Key Equation Solver” (KES). In some embodiments, given the 2t syndromes Si, i=0 . . . 2t−1, the goal of the KES is to find an error locator polynomial (x) that satisfies Equation 8 for all i=0 . . . 2t−1.
A RS decoder can evaluate the error locator polynomial (x), for example, using the Berlekamp-Massey's method, which is described, for example, in “Shift-Register Synthesis and BCH decoding,” IEEE Transactions on Information Theory, Volume 15, Issue 1, January 1969, pages 122-127, which incorporated herein by reference.
In some embodiments, the RS decoder decodes the code word from R(x) by performing the following main operations:
In some embodiments, the KES derives the error locator polynomial (x) by applying to the syndromes only t iterations. In each of the t iterations, the KES calculates first and second discrepancies between (x) and respective first and second candidates of (x), and derives, from at least one of the first and second candidates, an updated candidate of (x). In some embodiments, calculating the first and second discrepancy values and/or deriving a candidate polynomial of (x), in each of the iterations, involves calculating and/or updating certain intermediate terms in parallel, which reduces latency compared to conventional implementations.
For example, in one embodiment, the KES calculates the first discrepancy value, as well as two intermediate terms that are required for calculating the second discrepancy value, in parallel, using three respective hardware modules. This is different from conventional implementations in which one hardware module calculates each of the first and second discrepancy values in different iterations. In an embodiment, the KES derives the updated candidate of (x) so that the first and second discrepancies calculated based on the updated candidate are eliminated.
In some embodiments, the KES defines, in the ith iteration (i=0 . . . t−1), a first syndrome vector denoted S(2i) and a second syndrome vector denoted S(2i+1), wherein S(i)=[Si, Si−1, . . . , Si−t], and calculates the first and second discrepancies using S(2i) and S(2i+1), respectively. In an embodiment, the KES calculates the first discrepancy as δ=S(2i)′λ and the second discrepancy as δ1=S(2i+1)′λ1, wherein λ and λ1 are coefficient vectors representing respective candidates of λ(x) corresponding to S(2i) and S(2i+1), respectively.
In the disclosed techniques, the KES evaluates the error locator polynomial by applying to the syndromes only t iterations, over which the KES derives a candidate error locator polynomial only a total number of t times, with the addition of only small hardware footprint compared to conventional implementations. Moreover, unlike conventional implementations, in each of the t iterations, the KES calculates some intermediate terms in parallel. Using this approach the KES solves the key equation significantly faster than a conventional approach in which deriving the error locator polynomial requires 2t iterations and deriving a candidate error locator polynomial a total number of 2t times. By using the disclosed techniques, the latency of the RS decoding is reduced t iterations, while the design timing constraint and the decoder power consumption are kept low.
Next, we describe the structure of an example RS decoder embodiment.
Decoder 24 is suitable for use in various applications such as, for example, in a receiver of a communication system, in retrieving data in a storage system, or in any application in which data is protected using a RS code.
Decoder 24 comprises, in an embodiment, a syndrome calculator 36, a Key Equation Solver (KES) 40, an error locator 44, an error magnitude evaluator 46 and an error corrector 52. Syndrome calculator 36 receives input code ward R, and calculates 2t syndromes Si as given in Equation 4.
In some embodiments, based on the syndromes, KES 40 derives the error locator polynomial (x) in an iterative manner. In conventional implementations, evaluating (x) requires to apply to the syndromes 2t iterations. In such implementations, in each of the 2t iterations a conventional KES would (i) calculate a discrepancy of the current candidate of (x) relative to the correct value, and (ii) update the candidate of (x) to eliminate the discrepancy. Note that in this conventional approach, the KES calculates a total number of 2t discrepancy values and derives a total number of 2t candidate error locator polynomials.
Unlike the conventional approach, in some disclosed embodiments, KES 40 applies to the syndromes a number of only t iterations, wherein in each of these t iterations the KES calculates two discrepancy values (also referred to herein as error factors), and derives an updated candidate of the error locator polynomial, based on the two discrepancy values, only once per iteration. In such embodiments, in solving Equation 8, the KES derives a total number of only t candidates for the error locator polynomial, wherein calculating each candidate is based on two discrepancy values (compared to 2t candidates in the conventional approach). In addition, in some embodiments, the KES executes some of the operations for calculating the two discrepancy values in parallel, to reduce latency.
In an embodiment, KES 40 comprises an iteration updater 48 that receives, in each of the t iterations, two syndrome vectors denoted S(2i) and S(2i+1), each such vector comprises (t+1) consecutive syndromes of the form:
S()=[Si,Si−1,Si−2, . . . ,Si−t]′ Equation 9:
In an embodiment, the two syndrome vectors S(2i) and S(2i+1) are generated from a single copy of the 2t syndromes, which are stored in a shared hardware. In Equation 9, elements of S(i) for which the index is out of range get a zero value. In each iteration, iteration updater 48 calculates first and second discrepancy values 70A and 70B (denoted respectively δ and δ1) based respectively on S(2i) and S(2i+1), and derives an updated candidate 76 of polynomial (x) based on the first and second discrepancy values as will be described in detail below. In response to terminating the t iterations, KES 40 outputs the final error locator polynomial (x), which equals the same locator polynomial that would have result by using conventional methods. In some embodiments, KES 40 additionally outputs polynomial Ω(x) that uses for evaluating the magnitudes of the errors.
In an embodiment, KFS 40 provides the error locator polynomial (x) to error locator 44, which locates the erroneous symbols based on (x), e.g., using Chien's and Forney methods (mentioned above), and provides polynomial Ω(x) to error magnitude evaluator 46, which evaluates the magnitude of the located, e.g., using the Forney method mentioned above), and corrects the erroneous symbols to produce a recovered CW 56 by calculating:
CW(x)=R(x)+E(x) Equation 10:
In Equation 10, E(x) is an error location polynomial, which the decoder derives, based on the results of the error locator and the error magnitude evaluator.
In some embodiments, some or all of the elements of decoder 24 of
The decoder configuration in
The method of
Further at operation 100, the KES initializes various parameters as follows:
At an error evaluation operation 104, the KES calculates first and second discrepancy values denoted δ and δ1, respectively. The first discrepancy value δ is related to vector S(2i) and to λ, whereas the second discrepancy value δ1 is related to vector S(2i+1), λ, γ, b and the first discrepancy δ. In an embodiment, by using the expressions δ11=S(2i+1)′λ and δ12==S(2i+1)′bSR, the values δ, δ11 and δ12 are calculated independently in parallel (simultaneously) to reduce latency. The KES therefore calculates the value δ1 based on γ and on the values δ, δ11 and δ12 that were calculated in parallel.
At a first testing operation 108, the KES evaluates a first condition given by:
COND1(k,δ)=(k≧0)&(δ≠0) Equation 11:
If at operation 108 COND1 is false, the KES proceeds to a second testing operation 116, at which the KES evaluates a second condition given by:
COND2(k,δ,δ1)=[(k≧0)&(δ==0)&(δ1≠0)]|[(k==1)&(δ1≠0)] Equation 12:
The conditions tested in operations 108 and 116 can be viewed as a three-way decision making operation, directed to executing one of two methods denoted UPDATE1 and UPDATE2, for deriving an updated candidate of (x). Table 1 summarizes the decision making process.
At operation 112 the KES executes method UPDATE1 by calculating the expression:
λ*=(γδ)λ−(δ2)bSR−δ1λSR Equation 13:
At each of operations 120 and 124 the KES executes the updating method denoted UPDATE2 given by the expression:
λ*=γλ−δ1bSR2 Equation 14:
The updating operations in Equations 13 and 14 are designed to derive an updated candidate of the error locator polynominal, so as to eliminate the first and second discrepancy values (calculated based on the updated candidate).
After (or in parallel to) calculating the temporary coefficient vector λ*, which represents the updated candidate of (x), using one of operations 112, 120 or 124, the KES executes a respective parameter updating operation 128, 132 or 136 for updating the parameters b, γ, and k. Table 2 summarizes these parameter updating operations. In some embodiments, the KES executes each pair of operations (112 and 128), (120 and 132) and (124 and 136) in parallel. In such embodiments, the KES updates the values λ*, b*, γ* and the parameter k independently in parallel (simultaneously).
At operations 128, 132 and 136, the KES updates b*, γ* and the parameter k as depicted in Table 2. At a preparation for next iteration operation 140, the KES updates parameters λ, b and γ to the values of the temporary parameters calculated by operation pairs (112 and 128), (120 and 132) or (124 and 136). In addition, at operation 140 the KES updates the shifted-by-one coefficient vector λSR, and the shifted-by-one vector bSR and shifted-by-two vector bSR2.
In the context of the present disclosure and in the claims, an updating operation 112, 120 and 124 is implemented using a respective updating module (implemented in hardware). Alternatively, three updating modules implement respective pair of operations (112 and 128), (120 and 132) or (124 and 136).
In some embodiments, the KES makes a three-way decision (comprising COND1 and COND2) for selecting one of the three updating modules to execute for deriving the candidate of (x). Alternatively, the KES executes each of the three updating modules to calculate three respective candidates of (x), and makes the three-way decision to select one of the calculated candidates.
In vet other embodiments, the KES selects one of the three updating modules in response to detecting that a COND1 is true, and otherwise calculates two updated candidates of (x) using the remaining two updating modules, and selects one of the two candidates of (x) by checking COND2.
Next, the KES increments the iteration index at an iteration counting operation 144. At a loop testing operation 148, the KES checks whether the number of iterations already executed is less than t, and if so, loops back to operation 104 to carry out the next iteration. Otherwise, the KES has already executed a number of t iterations, and outputs the final coefficient vector representing the error locator polynomial (x) corresponding to the input code word R, at an output operation 152. Following operation 152 the method terminates.
In some embodiments, at operation 152, KES 40 additionally outputs an error magnitude polynomial denoted Ω(x) whose coefficients are given by a vector [ω0, ω1, . . . , ωt−1]. In some embodiments, the polynomial Ω(x) in used by error magnitude evaluator 46 to determine the error values. In an embodiment, KES 40 derives Ω(x) by solving a variant of the key equation given by:
Ω(x)=[Λ(x)·S(x)]mod x2t Equation 15:
Now we describe two example variant embodiments to the method of
In one alternative embodiment (referred to herein as VAR21), following operation 104 the KES first executes operations (112 and 128), (120 and 132) and (124 and 136), and then executes the three-way decision operation comprising operations COND1 108 and COND2 116, e.g., using a suitable multiplexer selection module. The output of the three-way decision (e.g., the multiplexer output) is provided to operation 140.
In another alternative embodiment (referred to herein as VAR22), in response to detecting that COND1 is false, the KES first executes operation 120 (or equivalently operation 124), and then executes operation COND2 116 to provide the output of operation 120 to one of operations 132 and 136, e.g., using a multiplexer module.
The method of
Error evaluation operation 204 of
Updating operation 212 of
λ*=δλ1−δ1λSR Equation 16:
The KES further executes operations 220 and 224 by calculating:
λ*=γλ1−δ1λbSR2 Equation 17:
In addition, at operation 232, KES 40 updates b* to the value of λ1 that was explicitly calculated at operation 204.
The two variant embodiments described above with reference to the method of
The methods described in
In the methods VAR20 and VAR21, the KES executes a large number of calculations in parallel, which relaxes the timing constraint for design, but typically requires additional hardware compared to the method of
The embodiments describe above are given by way of example, and other suitable embodiments can also be used. For example, although the embodiments described above refer mainly to RS codes, the disclosed techniques are applicable similarly to other block codes such as the Bose-Chaudhuri-Hocquenghem BCH code.
In the embodiments describe above the number (n−k) of redundancy symbols in the code word is assumed to be an even number. This assumption is not mandatory, and the disclosed techniques can be applied, mutatis mufandis, to RS codes in which the number of redundancy symbols is an odd number. In some embodiments, using an odd number for (n−k) requires processing an additional iteration.
It is noted that the embodiments described above are cited by way of example, and that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and sub-combinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art. Documents incorporated by reference in the present patent application are to be considered an integral part of the application except that to the extent any terms are defined in these incorporated documents in a manner that conflicts with the definitions made explicitly or implicitly in the present specification, only the definitions in the present specification should be considered.
This application claims the benefit of U.S. Provisional Patent Application 62/381,169, filed Aug. 30, 2016, whose disclosure is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62381169 | Aug 2016 | US |