Decoding error correction codes using a modular single recursion implementation

Systems and methods are provided for performing error correction decoding. The coefficients of the error locator polynomial are iteratively determined for each codeword using a modular implementation of a single recursion key-equation solver algorithm. According to this implementation, a plurality of modules are used to calculate the current and previous coefficients of the error locator polynomial. One module is used for each correctable error. The modular single recursion implementation is programmable, because the number of modules can be easily changed to correct any number of correctable errors. Galois field tower arithmetic can be used to calculate the inverse of an error term. Galois field tower arithmetic greatly reduces the size of the inversion unit. The latency time can be reduced by placing the computations of the inverse error term outside the critical path of the error locator polynomial algorithm.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to commonly-assigned U.S. patent application Ser. No. 11/058,596, filed Feb. 14, 2005, which is incorporated by reference herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to techniques for performing error correction in data recording systems, and more particularly, to techniques for performing error correction with a decoder that uses a modular single recursion implementation.

2. Related Art

Errors in digital data can occur upon reading digital data stored on a data disk. Disk drives typically have error correction encoders and decoders that are used to detect and correct data errors. Error correction and detection can be performed using a Reed-Solomon (RS) code.

For each data symbol (byte), an RS encoder generates error correction check bytes. The check bytes are appending to the symbol to generate RS codewords, where N is number of symbols in each codeword. The RS codewords are then stored in memory (such as a magnetic hard disk) or transmitted over a communication channel.

After data is read from the memory, an RS decoder decodes the RS codewords to correct any errors. An RS decoder includes a syndrome computation block, a key-equation solver (KES) block, and a Chien search and error evaluator (CSEE) block. The syndrome computation block computes the syndromes, which are viewed as coefficients of a syndrome polynomial S(x). The syndromes are passed to the KES block.

If there are any non-zero syndromes, it is assumed that there is an error. The KES block solves equation (1) to determine the error locator polynomial V(x) and the error evaluator polynomial Q(x), where t is the number of errors that the RS code can correct.
V(x)S(x)≡Q(x)modx2t(1)

The error locator and error evaluator polynomials are then passed to the CSEE block. The CSEE block calculates the error locations and the error values. The decoder can find the error locations by checking whether V(a−j)=0 for each j, 0≦j≦t−1. This process is called a Chien search. If V(a−j)=0, then each ajis one of the error locations. Each of the roots a−jof the error locator polynomial V(x) is the reciprocal of an error location. The error values eiare calculated using Forney's error value formula (2).

In equation (2), V′(x) denotes the formal derivative of the error locator polynomial V(x). The CSEE block corrects the errors in the received word as it is being read out of the decoder by subtracting the error values eifrom symbols at the found error locations in the received codeword.

The latency throughput bottleneck in RS decoders is in the KES block which solves equation (1). Typically, the critical path delay of the KES block determines the latency throughput of the decoder.

An Euclidean algorithm is an iterative approach for solving equation (1). For each successive value, the Euclidean algorithm iteratively determines the next error locator polynomial coefficients using the current and the previous error locator polynomial coefficients. The Euclidean algorithm also iteratively determines the next error evaluator polynomial coefficients using the current and the previous error evaluator polynomial coefficients.

Thus, the Euclidean algorithm performs two 2-term recursions to calculate the error locations and the error values. If each iteration is completed in one clock cycle, then as many as 2t clock cycles are needed to find the coefficients of the error-locator and error-evaluator polynomials. Because the syndrome polynomial S(x) has a degree 2t−1, and the other polynomials can have degrees as large as t, the algorithm needs to store roughly 6t field elements. As the latency of a sequential implementation is t2cycles, which may be prohibitive, a parallel implementation, using 2t multipliers, is generally required.

It would however be desirable to provide techniques for decoding Reed-Solomon codewords that require less storage space and that achieve the parallel implementation latency using less multipliers.

BRIEF SUMMARY OF THE INVENTION

The present invention provides systems and methods for performing more efficient error correction decoding techniques. Only the coefficients of the error locator polynomial are iteratively determined for each codeword using a modular single recursion implementation of a key-equation solver algorithm. According to this technique, a plurality of modules are used to calculate the current and previous coefficients of the error locator polynomial. One module with a single multiplier is used for each correctable error. The modular single recursion implementation is programmable, because the number of modules can be easily changed to correct any number of correctable errors.

According to another embodiment of the present invention, Galois field tower arithmetic is used to calculate the inverse of an error term. Galois field tower arithmetic greatly reduces the size of the inversion unit. Also, the latency time can be reduced by placing the computation of the inverse error term outside the critical path of the error locator polynomial algorithm.

DETAILED DESCRIPTION OF THE INVENTION

FIGS. 1A and 1Billustrate an example of a hard disk drive control system for reading and writing data onto a magnetic hard disk.FIG. 1Ais a block diagram of a data storage system, andFIG. 1Bis a block diagram showing the architecture of a hard disk controller. The hard disk drive control system ofFIGS. 1A-1Bis an example of hard disk drive system that can implement techniques of the present invention. The hard disk drive system ofFIGS. 1A-1Bcan detect and correct errors in the data read from a disk.

FIG. 1Billustrates an exemplary architecture of a buffered hard disk drive controller50. Hard disk drive controller50is configured to read data from and write data to a magnetic hard disk14shown inFIG. 1A. Controller50includes an on-the-fly error correction code (ECC) system100for implementing an on-the-fly error correction code.

On-the-fly error correction code system100includes an ECC read processor163and an ECC write processor167as shown inFIG. 1A. When sequences of digital binary data are to be written onto the disk14, they are placed temporarily in a buffer165shown inFIG. 1Aand subsequently processed and transduced along a write path or channel (167,169, and157).

The hard disk drive controller50includes a logic drive circuit105shown inFIG. 1Bthat formats data from hard disk assembly33, for example from 8 bits to 32 bits. A disk assembly33is comprised of disk14and a head stack assembly including a spindle motor. A FIFO register110stores the formatted data and exchanges the same with a sector buffer120. The ECC system100receives the formatted data from the drive logic circuit105and performs an error correction coding algorithm. ECC system100can also perform the techniques and processes of the present invention, which are discussed in detail below.

A buffer manager115controls data traffic between the ECC system100, a sector buffer (i.e., random access memory)120, and a microprocessor125. Another FIFO register130stores data and exchanges the same with the sector buffer120. A sequence controller135is connected between the drive logic circuit105, the microprocessor125, and a host interface140, to control the sequence operation of the data traffic and various commands across the hard drive controller50. The host interface140provides an interface between the hard drive controller50and a host60.

First, a predetermined number of binary data elements, also termed bytes, in a data string are moved from the buffer165and streamed through an ECC write processor167. In the ECC write processor167, the data bytes are mapped into codewords drawn from a suitable linear block or cyclic code such as a Reed-Solomon code. Next, each codeword is mapped in a write path signal-shaping unit169into a run length limited or other bandpass or spectral-shaping code and changed into a time-varying signal. The time-varying signal is applied through an interface read/write transducer interface157and then to the write element in a magneto resistive (or other suitable transducer head) for conversion into magnetic flux patterns.

All of the measures starting from the movement of the binary data elements from buffer165until the magnetic flux patterns are written on a selected disk track as the rotating disk14passes under the read/write head are synchronous and streamed. For purposes of efficient data transfer, the data is de-staged (written out) or staged (read) a codeword at a time.

Thus, both the mapping of binary data into Reed-Solomon codewords and the conversion to flux producing time-varying signals must be done well within the time interval defining a unit of recording track length moving under the transducer. Typical units of recording track length are equal fixed-length byte codewords of 512 bytes.

When sequences of magnetic flux patterns are to be read from the disk14, they are processed in a read path or channel (157,159,161, and163) and written into the buffer165. The time-varying signals sensed by a transducer are passed through the read/write transducer interface157to a digital signal extraction unit159. Here, the signal is detected and a decision is made as to whether it should be resolved as a binary 1 or 0. As these 1's and 0's stream out of the signal extraction unit159, they are arranged into codewords in the formatting unit161.

Because the read path is evaluating sequences of Reed-Solomon codewords previously recorded on the disk14, absent error or erasure, the codewords should be the same. In order to test whether that is the case, each codeword is applied to an RS decoder in ECC read processor163over a path from formatter161.

The output from the ECC processor163is written into buffer165. The read path also operates in a synchronous data-streaming manner such that any detected errors must be located and corrected within the codeword well in time for the ECC read processor163to receive the next codeword read from the disk track. The buffer165and the read and write channels may be monitored and controlled by the microprocessor125to ensure efficacy where patterns of referencing may dictate that a path not be taken down, such as sequential read referencing.

The present invention provides systems and methods for determining error locations and error values for errors in codewords read from a memory device or transmitted along a communication channel. The present invention receives syndromes for each codeword from a syndrome calculation unit. The error locations liand error values eican be determined from the syndrome values using the following formulas (3) and (4), where N is the number of bytes per codeword.

Equation (3) is used to compute the roots of the error locator polynomial v(x). The roots of error locator polynomial are used to determine the error locations li. The error values eiare computed by multiplying the previous error locator polynomial u(li) by the derivative of the current error locator polynomial v′(li) for each error location li, and then inverting the result, as shown in equation (4).

The coefficients for the error locator polynomials u(x) and v(x) can be computed using an iterative process that is described in detail below with respect toFIGS. 2 and 3. Using equation (4), the error values eican be calculated without having to perform the recursion required to determine the coefficients of the error evaluator polynomial. This technique is referred to as a single recursion key-equation solver (KES) algorithm.

The present invention only requires 2t registers to store 2t syndromes and 2t registers (registers u and v) to store 2t coefficients of the error locator polynomials, where t is the number of correctable errors. This technique eliminates the need to store the 2t coefficients of the error evaluator polynomials. Thus, the present invention requires only 4t registers to store the values needed to compute the error values, which is 2t registers less storage than required by the Euclidean algorithm.

According to a modular embodiment of the present invention, identical modules are used to calculate the error locator polynomial coefficients. One module is used for each correctable error. Thus, if t is the number of correctable errors, t modules are used.

Each module has two symbol registers viand uifor storing the current and previous coefficients of the error locator polynomial, respectively. Each module also includes one multiplier, which is used to compute equations (5) and (6) described below. Because there is 1 multiplier in each of the t modules that performs 2 multiplications and 2 iterations, the present invention has a minimum latency of 4t. The Euclidean algorithm requires 2t multipliers to achieve a similar latency.

The modular implementation of the present invention is programmable, because the number of modules can be changed, thus changing the number t of correctable errors. The modular architecture of the present invention can perform error correcting on 10-bit and 12-bit ECC codes within the same piece of hardware, at a minimal hardware increment (about 7-8 Kgates). Thus, 512-byte, as well as 4K-Block capabilities, can be combined in the same hard disk drive.

An example of a process for determining the error locator polynomial coefficients is shown inFIG. 2. Initialization of the variables is performed in step201. At step201, register u [u5, u4, u3, u2, u1] is initialized to [0,0,0,0,0] and register v [v5, v4, v3, v2, v1] is initialized to [0,0,0,0,1]. It should be understood that registers u and v can store any desired of number of symbols. Five symbols per register is merely used as an example to illustrate the principles of the present invention. An error discrepancy term e (also referred to as the error term) is initially set to the first syndrome value S0.

The process ofFIG. 2uses three counters. An iteration counter i counts the number of iterations that vary from 0 to 2t. The iteration counter i is initially set to 0. An error locator degree counter L counts the degree of the polynomial being calculated. The error locator degree counter is initialized to 0 at step201. An error term counter R counts the number of error term e calculations. The error term counter R is initially set to 1. Other variables g and B are also set to 1.

At decisional step202, the value of the error term e is checked to determine if it equals 0. If the error term e (i.e., the first syndrome value S0)≠0, the process moves to polynomial update step208, which is described below. If e=0, the process proceeds to error term computation step203. In step203, counter i is incremented. Then, if R+L=t, B is set to 0, and a computation is performed to determine the error term e using equation (5).

The value of L could be as high as t during iterations ofFIG. 2. If t adders are used to implement equation (5), then t additions are performed to compute error discrepancy term e. The additions can be parallelized and only log2t additions need to be performed to compute error term e. If log2t additions are performed in equation (5), then the error term e can be computed in a single clock cycle.

Each module has one multiplier. The t multipliers in the t modules are used to perform the multiplications of equation (5). Further details of these multiplications are described below with respect toFIG. 4. One multiplication is performed in each iteration of step203.

If R+L≠t, then R is incremented by one, Also, the coefficients stored in register u are shifted left, and the first value of the u register is set to 0, such that the u register stores values [u4, u3, u2, u1, 0]. Also, the error term e is set to the next syndrome value Si. If error term e=0 at decisional step204, and counter i=2t−1, the process is finished at step220.

Equation (3) above is solved to determine the error locations liusing the values of the error locator polynomial coefficients that are stored in register v at step220. The derivative of the error locator polynomial is then computed using the coefficients values stored in register v at step220. The derivative of the error locator polynomial and the previous values of the error locator polynomial coefficients stored in register u at step220are then plugged into equation (4) to calculate the error values ei.

If counter i≠2t−1 at decisional step205, error term computation step203is repeated to calculate the error term e for the next error. If error term e≠0 at decisional step204, and B=0 at decisional step206, the process fails at step222, because it determines that the error is not correctable. If error term e≠0 at decisional step204, B≠0 at decisional step206, and i=2t−1 at decisional step207, the process also fails at step222, because the error is not correctable.

If however, error term e≠0 at decisional step204, B≠0 at decisional step206, and i≠2t−1 at decisional step207, the process proceeds to polynomial update step208. At step208, the error locator degree counter L is incremented by L=L+R and a temp register variable is set to g. The stored variable value g is then set to the inverse of the error term e. The inverse of the error term e can be calculated using Galois field tower arithmetic. Galois field tower arithmetic is described in commonly assigned, co-pending U.S. patent application Ser. No. 11/058,596, filed Feb. 14, 2005, which is incorporated by reference herein.

The algorithm ofFIG. 2is structured to optimize the critical path latency. For example, the computation of the inverse of the error term e can typically be performed in two clock cycles using tower arithmetic. Also, the latency time of the algorithm is reduced by placing the computations of the inverse error term g outside the critical path of the algorithm through step203.

Galois field tower arithmetic also significantly reduces the size of the inversion unit. For example, for 12-bit Galois field arithmetic, a table of 6-by-26−1 bits can be used, instead of a table of 12-by-212−1 bits. This represents a reduction in the storage space requirements by a factor of 130 by using Galois field tower arithmetic. A reduction can also be achieved for log and antilog tables from 10-by-210−1 bits to 5-by-25−1 bits each using Galois field tower arithmetic.

Returning to step208, the error term e is assigned to the current value of the error term e times the temp variable (e·temp), and a new h variable is assigned to 1. An array of tempkvariables having k values is then assigned to each k value stored in the v register, where k equals 1 to L. The values of the v register are then updated to the new error locator polynomial coefficients using the error term e and current and previous coefficients of the error locator polynomial, as shown in equation (6).
vk=vk−(e·uk); fork=1 toL(6)

Next, register u is updated to the previous error locator polynomial coefficients by assigning each k value of register u to the corresponding k values of tempkto complete step208.

The latency time for step208is based on two multiplications and one addition. One multiplication and one addition are performed to implement equation (6), and one additional multiplication is performed for e×temp. The two multiplications and one addition can be performed in one clock cycle.

Subsequently, the process moves on to step209. In step209, the iteration counter i is incremented by 1, and the error term counter R is decreased by one. Also, the coefficients stored in the u register are shifted left, and the first value in the u register is set to h so that the u register stores [u4, u3, u2, u1, h]. Then, h is set to 0, and the error term e is set to the next syndrome value Siin each clock cycle. The error term e is then computed for the next error by applying equation (5) above.

The error term e is assigned to the result of equation (5) times the inverse of a previous value of error term e (e=e·g). Next, the values stored in register v are updated to the new error locator polynomial coefficient values as shown in equation (6) using the current value of the error term and the current and previous coefficients of the error locator polynomials.

The process then moves to decisional step210. If the value of the error term counter R is equal to zero at step210, and the iteration counter i equals 2t−1 at step205, the process finishes at step220. The error locations liand error values eiare then computed using the values stored in registers v and u and equations (3) and (4) as described above. If R=0 at step210, but i≠2t−1 at step205, error term computation step203is repeated. If R≠0 at step210, and i≠2t−1 at decisional step211, then polynomial step209is repeated.

Each time step209is repeated, the counter i increases by 1, counter R decreases by 1, error term e is recomputed, register v is updated, and the contents of register u are shifted. Step209is repeated until R=0. If R=0 and i=2t−1 after step209, then the process fails at step222due to an uncorrectable error.

The process illustrated inFIG. 2can be implemented by a finite state machine (FSM) according to another embodiment of the present invention.FIG. 3illustrates an example of a FSM according to the present invention. Table 1 below illustrates the values for the control signal vectors A-O that control the KES algorithm state of the FSM, in which φ represents a don't care state.

The states of the FSM can be stored in registers. Because there are 13 states in the example FSM shown inFIG. 3, at least 4 bits are needed to have unique register values for each state. In the following example, 5 bits are used. Example register values that can indicate the 13 unique states are now provided as illustrations. Idle state A=[00000], initialization state B=[00001], error term computation state C=[00010], error term computation without u-shift L=[01011], shift back u register M=[01100], polynomial update=[00011], polynomial iteration E=[00100], polynomial iteration F=[00101], polynomial iteration G=[00110], finished state I=[01000], scales U state H=[00111], failure state O=[01110], and polynomial update and iteration state N=[01101].

Referring toFIG. 3, the idle state A/301is the first state that occurs in the FSM. At decisional step302, the FSM checks the value of a start-dec variable to determine whether to remain in the idle state or to proceed to initialization state B/303. The FSM will remain in the idle state as long as the start-dec variable indicates that it should do so. In initialization state303, the variables and registers are initialized as described above with respect to step201.

After the initialization state B, the FSM checks if a corr-power variable equals 0 at decisional step304. The corr-power variable stores the correction power, which indicates the number of errors that need to be corrected. If corr-power=0, the FSM enters finished state I305, because there are no errors that need to be corrected.

If corr-power≠0, the FSM enters the error term computation state C/306. In error term computation state C/306, the computations described above with respect to step203are performed. An error term e value is computed using equation (5). The FSM then determines if the new error term e equals zero after state C at decisional step307.

If the error term e=0 at step307, i≠2t−1 at decisional step310, and R+L=2t−1 at decisional step312, the computations of step203are repeated at state L/315. A new error term e is computed by substituting the current value of the error term·e into equation (5). The error term e is continually updated at state L/315as long as e=0 at decisional step316and i≠2t−1 at decisional step317. If R+L≠2t−1, the FSM returns to state C/306. After state306, the FSM returns to decisional step307to determine if e=0.

If e≠0 at step316and i=2t−1 at step318, the FSM enters failure state O/309due to an uncorrectable error. If i≠2t−1 at step318, the FSM enters state N/320. In state N/320, steps208and209described above with respect toFIG. 2are performed. In state N, the error term is inverted, new values vifor the error locator polynomial coefficients are computed using equation (6), the previous error locator polynomial uiis updated, and a new value for the error term e is computed using equation (5). If i≠2t−1 at decisional step321, state N is repeated, and continues to repeat until i=2t−1, at which point the FSM enters failure state O/309.

If i=2t−1 at step317, the FSM enter shift back U state M/322. In state M/322, the values stored in the u register are shifted if R+1≠t, as described above with respect to step203. State M/322is repeated until R=1 at step323. When R=1 at step323, the FSM enters state scales U/324. In state U/324, the coefficients stored in register u are scaled using equation (6) as described above with respect to step209. The FSM then enters finished state I/305.

If e≠0 at step307and i=2t−1 at step308, the FSM enters failure state309due to an uncorrectable error. If i≠2t−1 at step308, the FSM enters polynomial update state D/311. In state D/311, the FSM performs the computations described above with respect to step208inFIG. 2.

At decisional step314, variable g is checked to determine if g=1/e. If g≠1/e at step314, the inversion of the error term has failed, and the FSM enters state E/331to recalculate the inverse of the error term e. If g=1/e at decisional steps314or334, the FSM enters polynomial iteration state F/332and then state G/333. Otherwise, the inverse of the error term e is recalculated at state E/331.

In states F/332and G/333, the FSM performs the computations described above with respect to step209inFIG. 2. If R≠0 at decisional step334and i≠2t−1 at decisional step335, the FSM returns to state F/332to repeat the next polynomial iteration. If R≠0 at step334and i=2t−1 at step335, the FSM enters failure state O/337due to the detection of an uncorrectable error. If R=0 at step334and i≠2t−1 at decisional step336, the FSM returns to error term computation state C/306and then to step307, as described above. If R=0 at step334and i=2t−1 at step336, the FSM moves to scales U state H/324and then to finished state I/305.

FIG. 4illustrates a diagram of a modular single recursion system for calculating error values according to an embodiment of the present invention. In a system that can correct as many as t correctable errors, the system ofFIG. 4includes 2t registers401, t modules402, and one error term and inverse error term computation block410.

2t syndrome values are stored in circular shift registers401. The syndrome values S0, . . . , Si+t, . . . , S2t−1are circularly shifted through registers401. Each time the i counter is incremented by one, the syndromes Siare shifted left to the next register401, except that the syndrome in the leftmost register 0 is shifted to the rightmost register 2t−1. The syndromes are provided to modules402, along with the current values for the error term e and the inverse error term g.

Each of the t modules402contains two registers u and v and one multiplier. The t modules402are labeled 0−(t−1) inFIG. 4. The t modules402compute the updated error locator polynomial coefficients [vt−1, . . . , v0] for each of the t correctable errors in each iteration of step209using equation (6). The t modules402also compute the previous error locator polynomial coefficients [ut−1, . . . , u0] in each iteration of step209as described above.

The multiplier in each module performs the multiplications Mi,o=Si+t·Vi, where i=0, . . . , t−1. The results {Mi,o}i=0t−1are provided to the error term and its inverse computation in block410.

Block410includes a set of adders that sum {Mi,o}i=0t−1together and add the result to the current value of the error term e, per equation (5). In step209, the result of those additions is multiplied by the inverse g of the error term to generate a new value for e. Block410applies Galois field tower arithmetic to the error term e to compute the inverse value g. The values of e and g computed in block410are transmitted back to modules402for use in the next polynomial iteration.

The foregoing description of the exemplary embodiments of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. A latitude of modification, various changes, and substitutions are intended in the present invention. In some instances, features of the invention can be employed without a corresponding use of other features as set forth. Many modifications and variations are possible in light of the above teachings, without departing from the scope of the invention. It is intended that the scope of the invention be limited not with this detailed description, but rather by the claims appended hereto.