Method and apparatus for decoding Reed-Solomon code

Abstract: A decoding method of Reed-Solomon code produces an error polynomial (x) and an error evaluation polynomial (x) by a Euclidean algorithm, whereby a syndrome polynomial S(x) is obtained, the highest degrees of the syndrome polynomial S(x) and of an initial polynomial x 2t , which is determined by the number t of symbols to be corrected, are multiplied, while the degree is incrementally reduced, thereby obtaining polynomials h(x) and g(x) that satisfy the relation: f(x) B(x) + g(x) S(x) = h(x) (where the degree of h(x) is less than the degree of g(x)≦ t). The polynomial g(x) is set to the error position polynomial (x), and the polynomial H(x) is set to the error evaluation polynomial (x), thereby performing the decoding by real time processing.

Description: BACKGROUND OF THE INVENTION Field of the Invention This invention relates generally to a method and apparatus for decoding an error correction code and, more particularly, to a method and apparatus for decoding a Reed-Solomon code and to Euclidean algorithm arithmetic operation circuit that can be used therein. Description of the Background Conventionally, the decoding of the Reed-Solomon code is executed by steps involving: i) calculation of syndromes: ii) production of the error position polynomial σ(x) and error evaluation polynomial ω(x): iii) estimation of the error position and error value; and iv) execution of the error correction. The conventional decoding method using the solutions involving the roots of equations cannot be applied in situations requiring the correction of multiple errors consisting of five or more errors. In such situations a decoding method using the Euclidean algorithm is known for the correction of five or more errors. That is, the error position polynomial σ(x) and error evaluation polynomial ω(x) are calculated by using the Euclidean algorithm. In the apparatus for decoding the Reed-Solomon code using such Euclidean algorithm, there occurs a problem such that a reciprocal number, such as α⁻⁹, is calculated to match with the highest degree coefficients of the dividend polynomial. More specifically, and assuming that the coefficients of the highest degree or two polynomials B(x) and S(x) are b and S, respectively, it is necessary to first calculate (b x S⁻¹). To accomplish that calculation circuitry corresponding to a read only memory (ROM) or random access memory (RAM) is needed to obtain the reciprocal number, thereby causing the amount of hardware and circuitry to be increased beyond a desirable level. OBJECTS AND SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a method and apparatus for decoding an error correction code that can eliminate the above-mentioned defects inherent in the conventional techniques, as well as a Euclidean algorithm arithmetic operation circuit that can be applied thereto. It is a further object of the present invention to provide a decoding method of the Reed-Solomon code employing an improved control method to realize arithmetic operating sections that are connected in cascade and an error position polynomial σ(x) and an error evaluation polynomial ω(x) that are obtained by real time processing. It is another object of the invention to provide a Euclidean algorithm arithmetic operation circuit having an improved control method in which arithmetic operating sections are cascade connected and an error position polynomial σ(x) and an error evaluation polynomial ω(x) are obtained by the real time processing. According to the present invention there is provided a method for decoding Reed-Solomon code to obtain an error position polynomial σ(x) and an error evaluation polynomial ω(x) by a Euclidean algorithm for correcting t symbol errors, comprising the following steps in the following order: obtaining a syndrome polynomial S(x); receiving a polynomial B(x) to be decoded and having an initial value x 2t ; delaying the polynomial B(x) to reduce the degree thereof by one; multiplying the term of highest degree of the syndrome polynomial S(x) and the term of highest degree of the polynomial B(x) having an initial value x 2t , which is determined by the number t of symbol errors to be corrected to obtain a product; sequentially reducing the degree of the product of said polynomials by one and repeating the step of multiplying, wherein the data sequence of the product polynomial and that of the polynomial B(x) are interchanged according to the state of a flag indicative of the difference between the product polynomial and polynomial B(x), providing a flag (CR) indicating whether the data sequences have been interchanged until polynomials h(x) and g(x) are obtained that satisfy the relation of f(x).B(x) + g(X).S(x) = h(x) where the degree of h(x) < the degree of g(x) ≦ t; and setting said polynomial g(x) to said error position polynomial σ(x); and setting said polynomial h(x) to said error evaluation polynomial ω(x). The present invention also provides corresponding apparatus. The above and other objects, features, and advantages of the present invention will be become apparent from the following detailed description of illustrative embodiments thereof to be read in conjunction with the accompanying drawings, in which like numerals represent the same or similar elements. Figs. 1A to 1H are schematic diagrams of decoding circuits of Reed-Solomon code useful in explaining the present invention; Fig. 2 is a block diagram of a fundamental unit of a preferred embodiment according to the present invention; Fig. 3 is a block diagram of an arithmetic operating section used in the circuits of Figs. 1A-1H; Fig. 4 is a flowchart useful in explaining the operation of a control section in the embodiment of Fig. 2; Figs. 5A and 5B, are schematic diagrams showing examples of errors occurring in a data stream; Fig.s 6A and 6B are another example of errors in a data stream; Figs. 7A and 7B are a further example of errors in a data stream; Figs. 8A and 8B are still another example of errors in a data stream; Figs. 9A to 9H are schematic diagrams useful in explaining the operation of a fundamental unit according to the present invention; Figs. 10A to 10J are schematic diagrams useful in explaining a basic unit according to the present invention; Figs. 11A to 11F are schematic diagrams useful in explaining a fundamental operating unit according to the present invention; Figs. 12 is a circuit diagram of an operable embodiment of the present invention; Figs. 13A to 13C are tables useful in explaining the operation of the circuit of Fig. 12; and Figs. 14A to 14I are a timing charts representing the operation of the operable circuit of Fig. 12. DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS Before describing an embodiment of the present invention, a conventional decoding method of Reed-Solomon code using the Euclidean algorithm will be described. If it is assumed that t is the number of correctable symbols and n is the code length, then a parity check matrix H for correction of t errors of Reed-Solomon code will be expressed by: From the product of the foregoing parity check matrix H and the received signal, the syndromes are generated and the following syndrome polynomials are defined: The following polynomial, in which the values generated in the above equations are used as coefficients, is referred to as a syndrome polynomial. S(x) = S₀ + S₁x +S₂x² + ... + S 2t-1 x 2t-1 There are various kinds of polynomials known for error correction, and they all satisfy the following relation: (x) · x 2t + σ(x) · S(x) = ω(x) where, Among the above equations, the error position polynomial σ(x) and the error evaluation polynomial ω(x) are required when the error correction is actually performed. Assuming that the above equations are always satisfied, x 2t is obviously known, and S(x) can be known from the reception signal. From x 2t and S(x), σ(x) and ω(x) can be obtained by using the Euclidean algorithm. In a well-known example, the Euclidean algorithm is used to solve a problem such as: "For given positive integers m and n, calculate the greatest common measure d and integers a and b that satisfy the expression (am + bn = d)". The Euclidean algorithm is also similarly used in the case of polynomials, in addition to being used simply with integers as in the above. More specifically, it is sufficient to derive a correspondence such that (m→x 2t ) and (n→S(x)). Nevertheless, in the above example involving integers, the greatest common measure d is obtained by executing the Euclidean algorithm to its final stage. Similarly, in the case of obtaining σ(x) and ω(x) to execute the error correction, the greatest common measure is not obtained until the final stage of the algorithm is executed, however, if the following conditions are satisfied during the algorithm, the execution of the algorithm can be stopped. t ≧ deg σ(x) > deg ω(x) (deg denotes a degree of the polynomial) In a practical example of obtaining σ(x) and ω(x) by using the Euclidean algorithm relating to the case of a correction code of 4-sample errors, when the received signal consists of n symbols, the values that are substituted as x in the error position polynomial (x) are sequentially: 1,α⁻¹, α⁻², ..., α -(P-1) ...,α -(n-1) , from the end of the received signal toward the beginning thereof. Thus, in this example, the number P indicates the number that is counted from the end of the received signal. As an example, assuming that the end of the received signal is the 0th position, and errors are generated at the first to fourth positions. A correction is now considered with respect to the case where these errors have an error pattern of (α⁴, α,α⁷, α²). The syndromes in this case are: S₀ = α⁴α + αα² + α⁷α³ + α²α⁴ = α⁵ + α³ + α¹⁰ + α⁶=α⁸ S₁ = α⁴α² + αα⁴ + α⁷α⁶ + α²α⁸ = α⁶ + α⁵ + α¹³ + α¹⁰ = 0 S₂ = α⁴α³ + αα⁶ + α⁷α⁹ + α²α¹² = α⁷ + α⁷ + α + α¹⁴ = α⁷ S₃ = α⁴α⁴ + αα⁸ + α⁷α¹² + α²α¹⁶ = α⁸ + α⁹ + α⁴ + α³ = α² S₄ = α⁴α⁵ + αα¹⁰ + α⁷α¹⁵ + α²α²⁰ α⁹ + α¹¹ + α⁷ + α⁷ = α² S₅ = α⁴α⁶ + αα¹² + α⁷α¹⁸ + α²α²⁴ = α¹⁰ + α¹³ + α¹⁰ + α¹¹ = α⁴ S₆ = α⁴α⁷ + αα¹⁴ + α⁷α²¹ + α²α²⁸ = α¹¹ + 1 + α¹³ + 1 = α⁴ S₇ = α⁴α⁸ + αα¹⁶ + α⁷α²⁴ + α²α³² = α¹² + α² + α + α⁴ = α⁹ S(x) = α⁹x⁷ + α⁴x⁶ + α⁴x⁵ + α²x⁴ + α²x³ + α⁷x² + α⁸ σ(x) and ω(x) are obtained by using the foregoing syndrome polynomial S(x) and x 2t , and the procedure of the Euclidean algorithm is competed by: deg ω(x) < deg σ(x) ≦ 4 B(x) = (α⁻⁹x + α) S(x) + R1(x) B(x) = x⁸ R1(x) = x⁶ + α⁴x⁵ + α¹³x⁴ + α⁸x³ α⁸x² + α¹⁴x + α⁹ S(x) = (α⁹x + α¹¹) R1(x) + R2(x) R2(x) = α¹⁴x⁵ + α⁹x⁴ + α⁴x³ = α¹³x² + α¹²x + α⁴ R1(x) = (α⁻¹⁴x + α³)R2(x) + R3(x) R3(x) = α²x⁴ + α¹⁰x³ + α¹⁴x² + α¹¹x + 1 R2(x) = (α¹²x + α⁻²)R3(x) + R4(x) R4(x) = α⁹x³ + α⁴x² + α⁹x + α¹¹ The above arithmetic operations can be summarized as follows: R1 = B + Q1S R2 = S + Q2R1 = S +Q2(B + Q1S) = Q2B + (1 + Q2Q1)S R3 = R1 + Q3R2 = B + Q1S + Q3[Q2B + (1 + Q2Q1) S] = (1 + Q3Q2)B + (Q1 + Q3 + Q3Q2Q1)S R4 = R2 + Q4R3 = Q2B + (1 + Q2Q1)S + Q4(1 + Q3Q2)B + Q4(Q1 + Q3 + Q3Q2Q1)S ∴R4 = (Q2 + Q4 + Q4Q3Q2)B + (1 + Q2Q1 + Q4Q1 + Q4Q3 + Q4Q3Q2Q1)S In these equations, R₄ corresponds to ω(x) the first term of the right side corresponds to the error. position polynomial (x), and the second term of the right side corresponds to the error evaluation polynomial (x). Q1 = α⁻⁹x + α, Q2 = α⁹x + α¹¹, Q3 = α⁻¹⁴ + α³, Q4 = α¹²x + α⁻² Therefore, σ(x) = α¹³x⁴ + α⁶ x³ + α⁹x² + αx + α³ ω(x) = α⁹x³ + α⁴x² + α⁹x + α¹¹ deg σ(x) =4, deg ω(x) = 3 By differentiating σ(x), σ′(x) = α⁶x² + α is obtained, and the error positions and error pattern are derived by using the error position polynomial and error evaluation polynomial. For errors of [ x = α⁻¹]: σ(α⁻¹) = α⁹ + α³ + α⁷ + 1 +α³ = 0 Thus, it can be known that this position is an error position. σ′(α⁻¹) = α⁴ + α = 1 ω(α⁻¹) = α⁶ + α² + α⁸ + α¹¹ = α⁴ Therefore, the error pattern is e₋₁ = ω(α⁻¹) / σ′(α⁻¹) = α⁴ For errors of [x = α⁻²]: σ(α⁻²) = α⁵ + 1 + α⁵ + α¹⁴ + α³ = 0 Thus, it is known that this position is an error position. σ′(α⁻²) = α² + α = α⁵ ω(α⁻²) = α³ + 1 + α⁷ + α¹¹ = α⁶ Accordingly, the error pattern is e₋₂ = ω(α⁻²)/σ′(α⁻²) = α For errors of [x = α⁻³]: σ(α⁻³) = α + α⁻³ + α³ + α⁻² + α³ = 0 Therefore, it is known that this position is an error position. σ′(α ⁻³) = 1 + α = α⁴ ω(α⁻³) = 1 + α⁻² + α⁶ + α¹¹ = α¹¹ Accordingly, the error pattern is e₋₃ = ω(α⁻³/σ′(α⁻³) = α⁷ For errors of [x = α⁻⁴]: σ(α⁻⁴) = α⁻³ + α⁻⁶ + α + α⁻³ + α³ = 0 Therefore, it is known that this position is an error position. σ′(α⁻⁴) = α⁻² + α = α¹² ω(α⁻⁴) = α⁻³ + α⁻⁴ + α⁵ + α¹¹ = α¹⁴ Thus, the error pattern is e₋₄ = ω(α⁻⁴) / σ′(α⁻⁴) = α² As mentioned above, it will be understood that the error positions and error pattern obtained by σ(x) and ω(x) are the same as those that have initially been set. In the case where the decoding apparatus of the Reed-Solomon code using the Euclidean algorithm, as described above, is realized by actual circuitry and not a software simulation, there occurs a problem in that a reciprocal number, such as α⁻⁹, is calculated to match the highest degree coefficients of the dividend polynomial. That is, assuming that the coefficients of the highest degree of two polynomials B(x) and S(x) are b and S, respectively, it is necessary to first calculate (b x S⁻¹). To accomplish this it is necessary to use circuits corresponding to a ROM or to a RAM to obtain the reciprocal number, which causes the amount of hardware to be increased significantly. Therefore, one proposal to overcome this shortcoming is described in "IEEE TRANSACTIONS ON COMPUTERS", Vol. c-34, No. 5, May, 1985, pages 393 to 403, which employs a Euclidean algorithm that does not use the arithmetic operation to obtain the reciprocal number. This proposed method will be described using an example similar to the example of correcting four errors described hereinabove: B(x) = x⁸ S(x) = α⁹x⁷ + α⁴x⁶ + α⁴x⁵ + α²x⁴ α²x³ + α⁷x² + α⁸ The calculations are based on a system in which the degree is sequentially reduced while multiplying the mutual highest degree coefficients. Step 1: Since the highest degree coefficient of r1(x) is 7, this equation can be further divided by S(x). Step 2: Since deg R1(x) is less than deg S(x), S(x) is further divided by R1(x). By combining Steps 1 and 2 above: α⁹B = xS + r1 α⁹r1 = α⁴S + R1 By removing or so-called erasing r1 from the above equations, we have: (α⁹)²B = (α⁹x + α⁴) S + R1 Therefore, when considering the processes for σ(x) and ω(x), α⁹B + xS = r1 (α⁹)²B + ( α⁹x + α⁴ )S = R1 The underlined terms are the portions that become σ(x) and ω(x). Therefore, until Step 2, the degree of (α⁹x + α⁴) is still the first degree and the degree of R1 is still the sixth degree and, indeed, it is necessary to perform the arithmetic operation until they become the fourth and third degrees, respectively. Therefore, the above procedure is continued. Step 3: Since the highest degree coefficient of r2(x) is 6, r2 can be further divided by R1. Step 4: Since deg R2 is less than deg R1, R1 is then divided by R2. Step 5: Step 6: Step 7: Step 8: Now, since R4(X), which can become ω(x), becomes a ternary equation, the above procedure is stopped. The results of the above arithmetic operations can be summarized as: α⁹B = 1xS + r1 → α⁹B + xS = r1 α⁹r1 = α⁴S + R1 → α³B + (α⁹x + α⁴)S = R1 α³S = α⁹xR1 + r2→ α¹²xB + (α³x² + α¹³x + α³)S = r2 α³r2 = α¹⁴R1 + R2 → (x + α²)B + (α⁶x² + α¹⁰x + α²)S = R2 α⁵R1 = α³xR2 = r3 → (α⁵x² + α⁵x + α⁸)B + (α⁹x³ + α¹³x² + α¹²x + α⁹)S = r3 α⁵r3 = α¹⁰R2 + R3 → (α⁸x² + α)B + (α¹⁴x³ + α⁹x² + αx + α⁵)S = R3 1 · R2 + α⁵xR3 + r4 → (α¹³x³ + α¹³ x + α²)B + (α⁴x⁴ + α¹⁴x³ + α²)S = r4 1 · r4 = α⁶R3 + R4 → (α¹³x³ + α¹⁴x² + α¹³x + α¹²)B + (α⁴ x⁴ + α¹²x³ + x² + α⁷x + α⁹)S = R4 Only when R4 is obtained, the relation of: deg R4 < deg (α⁴x⁴ + α¹²x³ + x² + α⁷x + α⁹) ≦ t ( = 4) is satisfied, so that this procedure is stopped. Therefore, we have σ(x) = α⁴x⁴ + α¹²x³ + x² + α⁷x + α⁹ ω(x) = Re(x) = x³ + α¹⁰x² + x + α² By multiplying these equations with α⁹, the resultant equations become the same as σ(x) and ω(x) that were obtained by using α⁻⁹ described above, that is, the error positions are obviously obtained. With respect to the equations to derive the error pattern, by multiplying both of the numerator and denominator with α⁹, the error pattern itself does not change and the correct answer is obtained. Finally, it is also possible to divide one degree by one while multiplying the mutual highest degree coefficients. Figs. 1A to 1H represent a construction that can be considered in the case where the processes, which are executed in accordance with the order of the above steps 1 through 3, are realized as a circuit. In Figs. 1A to 1H eight respective arithmetic operating sections 2A to 2H are cascade connected and each arithmetics operating section has a product sum arithmetic operating circuit of the same constitution. The product sum circuit for first and second input signals comprises a first multiplier 13 to which the first input signal is supplied; a register 14 connected to another input of multiplier 13; a second multiplier 17 to which the second input signal is supplied; a first register 16 connected to another input of multiplier 17; a second register 18 that acts to delay the second input signal by one clock and then to output it; and an adder 15 that adds the output signal of first multiplier 13 and the output signal of second multiplier 17. Similarly, the product sum circuit for third and fourth input signals comprises a third multiplier 23 to which the third input signal is supplied; a third register 24 connected to another input of third multiplier 23; a fourth multiplier 27 to which the fourth input signal is supplied; a fourth register 26 connected to another input of fourth multiplier 27; a register 28 to delay the fourth input signal by one clock and then to output it; and an adder 25 to add the output signal of third multiplier 23 and the output signal of fourth multiplier 27. In the circuits shown in Figs. 1A to 1H, the advance of data by one clock denotes that the polynomial is multiplied by x. On the other hand, the delay of data by one clock means that the polynomial is multiplied by x⁻¹ and the polynomial degree is reduced by one. Fig. 1A represents inputs and outputs of the arithmetic operating sections when the processes in step 1 above are performed and Fig. 1B represents inputs and outputs of the arithmetic operating sections when the processes in step 2 above are performed. Similarly, Figs. 1C through 1H represent inputs and outputs of the arithmetic operating section when the processes in steps 3 through 8, respectively are performed. As described above, the processes automatically to obtain the error position polynomial σ(x) and error evaluation polynomial ω(x) involve the derivation of the polynomials g(x) and h(x) that satisfy the following relations: f(x) · B(x) + g(x) · S(x) = h(x) deg h(x) < deg g(x) ≦ t In other words, there is provided a circuit that always outputs the polynomials f i (x) and g i (x) that satisfy the relation: f i (x)B + g i (x)A = f i (x) where i denotes the number of arithmetic operation procedures using the polynomials B and A. Because deg g₁ ≦ deg g₂ ≦ deg g₃ ≦ deg g₄ . . . deg h₁ ≦ deg h₂ ≦ deg h₃ ≦ deg h₄ . . . after going through several procedures, there comes the point in time when the relation: deg h i < deg g i ≦ t is satisfied. Although the construction to obtain the error position polynomial σ(x) and error evaluation polynomial ω(x) is considered, Figs. 1A to 1H constitute only the arithmetic operating sections and nothing is clarified with respect to the control of the replacement of the first and second input signals, that is, the exchange of the divisor polynomial and dividend polynomial, and the detection that the relation of the difference between the degrees becomes: deg ω(x) is less than deg σ(x). An embodiment of the method and apparatus for decoding an error correction code and the Euclidean algorithm arithmetic operation circuit that is applied thereto according to the present invention is described hereinbelow. More specifically, a fundamental constitution of the control section and arithmetic operating section are shown in Fig. 2. In the case of t-error correction code, a plurality of the basic sections shown in Fig. 2 are connected in cascade. In Fig 2, four data transmission lines and two flag transmission lines are provided. More specifically, the data of the P series are supplied on the first data line, the data of the Q series are supplied on the second data line, the data of the R series are supplied on the third data line, and the data of the S series are supplied on the fourth data line. CR and IX denote flags for control and these flags are supplied on the corresponding respective flag transmission lines. The basic apparatus consists of a data control section 1 and an arithmetic operating section 2, in which data control section 1 includes a cross control circuit 3. Cross control circuit 3 controls whether the first and second data lines P1 and Q1 are crossed or not and also controls whether the third and fourth data lines R1 and S1 are crossed or not. Registers 4 to 7 are connected to the flag transmission line inputs CR and IX and to the second and fourth data transmission lines Q1 and S1, respectively. To perform the flag processes data control section 1 further includes an OR gate 8 and an AND gate 9. Arithmetic operating section 2 includes an adder 11 to process a flag 1X, a register 12, and a product sum arithmetic operating circuit for the data. The product sum arithmetic operating circuit for the P and Q series comprises a first multiplier 13, a register 14, an adder 15, a register 16, and a second multiplier 17. Similarly, the product sum arithmetic operating circuit for the R and S series comprises a third multiplier 23, a register 24, an adder 25, a register 26, and a fourth multiplier 27. When only the product sum for the P and Q series are to be extracted the product sum arithmetic operating circuit has an arrangement as shown in Fig. 3. As the P series, a polynomial F(x), having the highest degree coefficient: f, is supplied. As the Q series, polynomial x n G(x), having the highest degree coefficient: g, is supplied and as the output of the P series: R(x) = g G(x) + f x n G(x) is obtained. The condition such that the arithmetic operating section will perform the normal arithmetic operations is that the highest degree coefficients f and g can be simultaneously loaded into the registers 14 and 16, respectively. This is equivalent to : deg f(x) = deg x n G(x) and, also, g = 0. As represented in Fig. 3, in the case where: deg f(x)> deg (g(x), and two polynomials having the difference of n degrees are set to a dividend polynomial and to a divisor polynomial, the degree of the polynomial R(x) of the output is reduced by at least one degree. Therefore, to divide F(x) by G(x), it is sufficient to use only (n+1) arithmetic operating sections. In order to continue the new algorithm arithmetic operations, it is sufficient to cross the data lines such that R(x) of the final stage output P₄ and the output G(x) of Q₄ are respectively input to the Q and P series at the next stage. Data control section 1 has the following two roles. First, it performs the control to determine the time when the polynomials of two systems are to be crossed and the divisor polynomial and dividend polynomial are to be exchanged. Second, it detects that the arithmetic operation stop condition of (deg ω(x)< deg σ(x)) is satisfied. According to the present invention, when the first control is performed, the real time processes are executed without having a buffer memory such that all of the coefficients of the polynomial can be stored. To enable this real time processing, the flags IX and CR are used. The flag IX denotes the different of degrees of two polynomials before the division arithmetic operation its actually started, and in the Galois field GF (S⁸), eight bits are generally necessary for this. The flag CR is the flag to indicate that the P series and the Q series, as well as the R series and S series, are crossed any time that the conditions are satisfied. When the flag CR is at a high level, this means that the data series are crossed, and when the flag CR is at low level, it means that they are not crossed and there is no need to cross them. The above phrase "if the conditions are satisfied" with respect to the flag CR denotes the condition such that the highest degree coefficients of the input polynomials of the P and Q series can be simultaneously loaded into registers 14 and 16. On the other hand, the point that (IX = -1) means that the degree of the divisor polynomial, which is the output of Q₄, is larger by one degree than the degree of the remainder polynomial, which is the output of data line P₄, as the result of the algorithm arithmetic operation. In this case, the P series and Q series are exchanged and the algorithm arithmetic operations must be continued by the new divisor polynomial. At such time, by deciding whether the P series and Q series are exchanged and the arithmetic operation should be started or not, a difference occurs relative to whether the flag CF₄ that is transferred to the next stage should be set to low (L) or high (H) or is held to the L level. In this manner, flags CR and IX are signals that should be always considered as a pair. Because this control method of the flags IX and CR is somewhat involved, it is shown more clearly in the flowchart of Fig. 4. Referring then to Fig. 4, the operations commence with the setting at block 31 of the initial conditions. Namely, the flags are set such that CR = H (high level) and IX = 1. The data of S(x) is supplied as the P series, x 2t is supplied as the Q series, 1 is supplied as the R series, and O is supplied as the S series, all of which occur at this initial step 31. The delay of one stage is provided for each of the Q and S series at operation 32 and the decision whether CR = H occurs at step 33. At decisional block 34 the decision whether IX = 1 is performed. That is, the determination is made with respect to whether the degree of the divisor polynomial is larger than the degree of the dividend polynomial. At the two decisional blocks 35 and 36 the decision is made with regard to whether the highest degrees have been simultaneously input or not. The processes to cross the respective data series are performed at 37 and 38, respectively. The processes for performing the algorithm arithmetic operations occur at blocks 39, 41, and 43. When the algorithm arithmetic operation is performed, the flag IX is set to (+1) or (-1). The instruction that no algorithm arithmetic operation is to be performed and that the flag IX is to be increased by (+3) and the flag CR is to be set to the H level occurs at block 40 and at block 42 it is provided that no algorithm arithmetic operation is performed and flag IX is increased by (+1). The decision with respect to whether the condition of (deg ω(x) < deg σ(x)) is satisfied or not is made at block 44 and when this condition is satisfied, the arithmetic operation is stopped. Now, an example in which the present invention is applied to 4-error correction is described in which Fig. 5A represents the case that the received data series consists of n symbols. More specifically, the values of (1, α⁻¹, α⁻², ...α -(n-1) ) are sequentially input as x of the error position polynomial ω(x) or the error evaluation polynomial σ(x) starting from the last of the received series, as shown in Fig. 5B. Fig. 6A represents data in which four errors, indicated by hatched portions, occur and the case of a specific error pattern as shown in Fig. 6B is considered. In this example it is assumed that the generation of syndromes is completed, and the syndrome polynomial S(x) is obtained and the syndrome polynomial S(x) is input, so that the processes shown in the flowchart of Fig. 4 are started. First, the initialization at 31 is executed and next, at stage 32, the delay of one clock is inserted into the Q series, that is, into the data series of B(x). Thus, the phases of the highest degree coefficient 1 and ⁹ of the P and Q series become the same. In step 33, because (CH = H), step 36 follows and then because the simultaneous input is executed, step 38 follows. In the operation represented at 38, the process to cross the data is performed. B(x) and S(x) are respectively input as the P and Q series in the arithmetic operating section, as shown in Fig. 9A. On the other hand, because the data series are crossed in step 38, (CR₁ = H) is changed to (CR₄ = L). In addition, in the arithmetic operating section 2A of Fig. 9A, the algorithm arithmetic operation is actually performed. The polynomial whose degree was reduced by 1 is output from the input polynomial P3 (the eighth degree). Therefore, the operation in which the flag IX indicative of the relative degree difference between the P and Q series was reduced by 1 is set to a new value of IX (IX₄) is performed. Thus, as described above in the operation of the circuit of Fig. 9A, the processes in steps represented at 31, 32, 33, 36, 38, 43, and 44 are sequentially executed in accordance with the flowchart shown in Fig. 4. These operations are repeated until the conditions required to stop the arithmetic operation are satisfied. Fig. 9B shows the processes at the second stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially executed. Fig. 9C shows the processes at the third stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially performed. Fig. 9E shows the processes at th fifth stage at which the processes in steps 32, 33, 34, 35, 37, 39, and 41 are sequentially executed. Fig. 9F shows the processes at the sixth stage at which the processes in steps 32, 33, 34, 41, 44 are sequentially performed. Fig. 9G shows the processes at the seventh stage at which the processes in steps 32, 33, 34, 35, 37, 39, and 44 are sequentially executed. Fig. 9H shows the processes at the eighth stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially performed. Since the condition in step 44 is satisfied at this stage, step 45 to stop the arithmetic operation follows and the processes are finished. An example of a 5-error correction code, as represented by the hatched portions in Fig. 7A, is now explained with respect to the case where five symbol errors exist and the three upper coefficients of the syndrome polynomial are set to 0. The three upper coefficients are set to 0 in the case of the error pattern of α⁷, α, α², 1,α², as shown in Fig. 7B. The coefficients of the syndrome polynomial S(x) are: S₀ = α³, S₁ = α², S₂ = α¹¹, S₃ = α¹³, S₄ = α, S₅ = α¹², S₆ = 1 S₇, S₈, S₉ = 0 The operations of the control section 1 and arithmetic operating section 2, when the present invention is applied to the foregoing example, are as shown in Figs. 10A to 10J. As in the operation of the system shown in Figs. 9A to 9H, the processes are executed sequentially from Fig. 10A to Fig. 10B, Fig. 10C, etc. In the process performed by the circuit of FIg. 10A in accordance with the flowchart of in Fig. 4, the processes in steps 31, 32, 33, 36, 42, and 44 are sequentially executed. Fig. 10B shows the processes at the second stage at which the processes in steps 32, 33, 36, 42, and 44 are sequentially executed. Fig. 10C shows the processes at the third stage at which processes in steps 32, 33, 36, 42, and 44 are sequentially performed. Fig 10D shows the processes at the fourth stage at which the processes in steps 32, 33, 36, 38, 43, 44 are sequentially performed. Fig. 10E shows the processes at the fifth stage at which the processes in steps 32, 33, 34 41, and 44 are sequentially executed. Fig. 10F shows the processes at the sixth stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially performed. Fig. 10G shows the processes at the seventh stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially executed. Fig. 10H shows the processes at the eighth stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially performed. Fig. 10I shows the processes at the ninth stage at which the processes in steps 32, 33, 34, 35, 37, 39, and 44 are sequentially executed. Fig. 10J shows the processes at the tenth stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially performed. Because the condition of operation 44 is satisfied at this stage, step 45 to stop the arithmetic operation follows and the processes are finished. The example in which all of the foregoing three upper coefficients are set to 0 differs from the example of the 3-error correction code described previously. More specifically, because all of the three upper coefficients are 0, when the series of (B(x) = x¹⁰) is merely delayed by one clock, the highest degree coefficients of the P and Q series cannot be loaded into the register at the same time. This is so because since the degree of th syndrome polynomial S(x) is six, B(x) needs to be delayed by four stages. These delaying processes are executed by data control sections 1A, 1B, 1C, and 1D. At this time, the processes in steps 33, 36, and 42 in the flowchart of Fig. 4 are executed. By repeating these delaying processes three times and crossing the data at the fourth time, the algorithm arithmetic operation is performed. The flag CR is set to H until this crossing process is executed. On the other hand, the relative degree difference of two polynomials increases until it reaches four. When the arithmetic operation is not performed (NO OPERATION), 1 ( = α°) and 0 are loaded into the registers 14, 16, 24, and 26, respectively. Further, the data lines are not crossed until the eighth stage of (IX = -1) after the start of the actual arithmetic operation in the data control section ID t the fourth stage. Another example of 5-error correction code is describe in relation to Figs. 8A-8B and 11A-11F. As shown by the hatched portions in Fig. 8A, three symbol errors exist and the two second and third upper coefficients of the syndrome polynomial are set to 0. The two upper coefficients are set to 0 in the case of the error pattern of α⁵, 1, and α³ as shown in Fig. 8B. The coefficients of the syndrome polynomial S(x) are: S₀ = α, S₁ = α¹⁴, S₂ = α², S₃ = α⁷, S₄ = α¹³, S₅ = α⁷, S₆ = α¹⁴, S₇ and S₈ = 0, S₉ = α² The operations of the control section 1 and arithmetic operating section 2 when the invention is applied to the foregoing example are shown in Figs. 11A-11F. In a manner similar to Figs. 9A to 9H and 10A to 10J, the processes are executed sequentially from Fig. 11A to Fig. 11B, Fig. 11C, ...Fig. 11F. In Fig. 11A, the processes of the steps at 31, 32, 33, 36, 38, 43, and 44 are sequentially executed in accordance with the flowchart shown in Fig. 4. Fig. 11B shows the processes at the second stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially performed. Fig. 11C shows the processes at the third stage at which the processes in steps 32, 33, 34, 35, 40, and 44 are sequentially performed. Fig. 11D shows the processes at the fourth stage at which the processes in steps 32, 33, 36, 38, 43, and 44 are sequentially performed. Fig. 11E shows the processes at the fifth stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially performed. Fig. 11F shows the processes at the sixth stage at which the processes in steps 32, 33, 34, 41, and 44 are sequentially performed. Because the condition in step 44 is satisfied at this stage, step 45 to stop the arithmetic operation is executed and the processes are finished. In the foregoing example attention is directed to the operation of the data control section 1C at the third stage in Fig. 11C. Since (IX = -1), the cross control of the data control section IC is performed so as to set the signal fed to OR gate 8 to the high level (H). This means that even when (CR₁ = L), it is necessary to cross the data lines at some position after this stage. Therefore, a check is made to see if it is possible to cross in the data control section 1C or not. For this purpose, the polynomial series in which the delay of one clock is added for the Q series and the polynomial series of the P series are compared, thereby deciding whether the highest degree coefficients are simultaneously loaded into the register or not. In this example, when the highest degree coefficients of the Q series is α², the P series is still 0. Therefore, since in the data control section 1C, it is impossible to cross, the signal to AND gate 9 is set to H to set the Flag (CR₄ = H), thereby transferring the flag so as to cross at the next and subsequent stages. At this time, the contents of registers 14 and 24 are set to 1 and the contents of registers 16 and 26 are set to 0 so as not to perform the arithmetic operating processes. Further, in the arithmetic operating section 2C at the third stage of Fig. 11C, the process to increase the flag IX by (+3) is performed. When the cross is performed when (IX = -1), it is generally sufficient to execute a process to increase the flag IX by (+1). On the other hand, even when the highest degree coefficients cannot be loaded and the arithmetic operating section is made inoperative, 1 is added to IX. In the arithmetic operating section 2C in Fig. 11C at the third stage in the foregoing example, the foregoing two situations simultaneously occur, so that it is considered that it is sufficient to add 2 to the flag IX. Nevertheless, it is generally necessary to add 3. An example of a practical circuit embodiment of the algorithm arithmetic operation is shown in Fig. 2. In Fig. 12, a symbol of F00 denotes a D-type flip-flop; J00 indicates a JK-type flip-flop; and T1 to T4 represent clock enable D-type flip-flops. In comparing the fundamental construction of Figs. 9A - 9H, for example, with the circuit of Fig 2, the OR gate 8 corresponds to OR gate OR7 and the AND gate 9 corresponds to AND gate AD7. On the other hand, multipliers 13 and 17 correspond to multipliers MUL1 and MUL2, adder 15 corresponds to adder ADD1, and registers 14 and 16 correspond to flip-flops T1 and T2. Similarly, multipliers 23 and 27 correspond to multipliers MUL3 and MUL4, adder 25 corresponds to adder ADD2, and registers 24 and 26 correspond to flip-flops T3 and T4. Further, the flag CR is represented by CROSS in the circuit of fig 12. A distinguishing point of the circuit arrangement of fig 12 relates to the handling of the flag IX. In the foregoing description, the flag IX has been independently transmitted and received among the stages, however, the flag IX generally needs about five bits and to obtain the maximum capability of the code, eight bits are usually necessary. Therefore, when the circuit of each stage is realised as an integrated circuit, for example, sixteen input and output pins are needed. This results in an increase in cost and is disadvantageous. On the other hand, although the ordinary adder 11 has been provided to add or subtract the flag IX, it is preferable that adder 11 be omitted. Because of the foregoing reasons, in the arrangement of fig 12, the flag IX is added to the head of the P series, thereby reducing the number of input and output pins. Further, the additions and subtractions of the flag IX are executed by the multiplier MUL1 and the adder for the flag IX is omitted. That is, by considering that the addition of IX is α IX , the addition and subtraction of IX is replaced to the addition and subtraction of the index. In this case, to detect (IX - -1), a comparator COMP of eight bits is provided and when α⁻¹ is detected the comparator COMP outputs a high level (H). An output signal of the comparator COMP s latched into a flip-flop F102 with a clock enable signal. A signal INV indicative of the attribute of the data series which has started is formed by this flip-flop F102 and the signal INV is input to the OR gate OR7. The CROSS signal from the preceding stage is supplied to the OR gate OR7 through flip-flops F21 and F22. A mode signal MD in fig 12 has two roles, one of which is to signal the start of the input of the polynomial series, and the second of which is to indicate pulse width, that is, the maximum degree widths of P, Q, R and S plus one clock for IX. Therefore, the data of the fundamental circuit is set and the mode is reset by the MD signal. Flip-flops J72, J82 and J92 are JK flip-flops that produce the signals that are set to the high level H by only the number of degrees of the polynomials which are input to the P, Q and R series. JK flip-flops are used so that even if the coefficients after the highest degree coefficient are set to "0", the output is not set to a low level L. By use of this output, the negative signal of flip-flop J72 and the output signal of flip-flop F83 that is obtained by delaying flip-flop J872 by one stage are compared, thereby discriminating whether the highest degree coefficients of the P and Q series can be simultaneously input to the registers T1 and T2 or not. This discrimination signal is the signal from AND gate AD7 and is once latched by flip-flop J74. If this signal is set to a high level H, it is expressed as CRINH to mean the inhibition of the cross (CROSS INHIBIT). In the flowchart of Fig. 4, this discrimination corresponds to the discriminating steps at 35 and 36, in which (CRINH = H) corresponds to NO and (CRINH = L) corresponds to YES in steps 35 and 36. By comparing the negative output of flip-flop J72 and the output signal of flip-flop J92, the condition to stop the arithmetic operation as in step 34 of the flowchart of Fig. 4 is detected. If the output signal of flip-flop J93 is set to a high level H, all of the arithmetic operations are stopped and the number of delay stages of the P and R series can be also matched with that of the Q and S series. This control is performed by multiplexers MUX1 and MUX4, MUX8, and MUX9. On the other hand, when the maximum degree is only reduced by 1 in the algorithm arithmetic operation, the multiplexer MUX7 selects the 0 input, thereby reducing the pulse width of the mode signal MD by one clock. Figs. 13A to 13C represent in tabular form the selecting operations that are executed by the indicated data selectors, and in Figs. 13A to 13C, the corresponding relations with the steps in the flowchart of Fig. 4 are also shown. Figs. 14A to 14I are timing charts showing the operation of the circuit of Fig. 12, which relate to the example of 4-error correction, as described above. Fig. 14A shows the operation of the circuit at the first stage and the operation of each of the second to the ninth stages is respectively shown in Figs. 14B to 14I. According to the present invention, by merely cascade connecting the fundamental or basic circuits, it is possible to constitute a decoding circuit of Red-Solomon code capable to correcting any number of errors. In particular, according to the invention, the arithmetic operations are continuously executed in a real time manner without using a buffer memory and it is effective for high speed data such as digital video data. Further, according to the invention, in the case where the flag that denotes the difference of degrees of a dividend polynomial and a divisor polynomial is transmitted to the next stage, the flag is time-division multiplexed in the data sequence. Therefore, the number of input and/or output pins are reduced when the inventive system is realized by an integrated circuit. Moreover, a multiplication circuit for the operation of polynomials can be applied instead of an adder because the addition and subtraction of the flags that denote the difference of degrees are transformed into a multiplication.

Claims: A method for decoding Reed-Solomon code to obtain an error position polynomial σ(x) and an error evaluation polynomial ω(x) by a Euclidean algorithm for correcting t symbol errors, comprising the following steps in the following order: obtaining a syndrome polynomial S(x); receiving a polynomial B(x) to be decoded and having an initial value x 2t ; delaying the polynomial B(x) to reduce the degree thereof by one; multiplying the term of highest degree of the syndrome polynomial S(x) and the term of highest degree of the polynomial B(x) having an initial value x 2t , which is determined by the number t of symbol errors to be corrected to obtain a product; sequentially reducing the degree of the product of said polynomials by one and repeating the step of multiplying, wherein the data sequence of the product polynomial and that of the polynomial B(x) are interchanged according to the state of a flag indicative of the difference between the product polynomial and polynomial B(x), providing a flag (CR) indicating whether the data sequences have been interchanged until polynomials h(x) and g(x) are obtained that satisfy the relation of f(x)·B(x) + g(X)·S(x) = h(x) where the degree of h(x) < the degree of g(x) ≦ t; and setting said polynomial g(x) to said error position polynomial σ(x); and setting said polynomial h(x) to said error evaluation polynomial ω(x). A method according to claim 1, further comprising the step of stopping said step of sequentially reducing the degree when said degree of the product polynomial equals 3. A Euclidean algorithm arithmetic operation circuit for decoding, according to the method of Claim 1, data using a Reed-Solomon code, in which a first flag (CR) indicates an interchange of data on a first data input line with data on a second input line and a second flag (IX) denotes the difference in degree between first and second polynomials representing the data on the first and second input lines respectively, comprising: means for determining whether the highest degrees of said first and second polynomials are present and producing an output indicative thereof; arithmetic operating means (2A) for performing an arithmetic operation on said first and second polynomials; means for changing the value of said second flag (IX) by one upon every arithmetic operation of said polynomials in response to a first state of said output of said determining means and for changing the value of said second flag by three in response to a second state of said output from said determining means; means for delaying said second polynomial to reduce the degree of said second polynomial by one; means for multiplying the mutual highest degree coefficients of said first polynomial and said second polynomial by time-division multiplying after said second polynomial has been delayed; means for detecting the difference of degree between said first and second polynomials; and means for interchanging the data sequences of said first and second polynomials in response to the first flag (CR). A circuit according to claim 3, wherein said means for changing performs adding and subtracting by one and includes means for transforming the addition and subtraction into the multiplication of elements of a finite field.

Inventors: SHIROTA NORIHISA, SHIROTA, NORIHISA
Applicants: SONY CORP, SONY CORPORATION
Application year: 1988
Main classification: H03M13
IPC codes: H03M13