The present embodiments relate to Reed-Solomon encoding, and to circuitry for performing such encoding, particularly on an integrated circuit.
Many modern applications encode data prior to transmission of the data on a network using error correcting codes such as Reed-Solomon codes. Such codes are capable of providing powerful error correction capability. For example, a Reed-Solomon code of length n and including n−k check symbols may detect any combination of up to 2t=n−k erroneous symbols and correct any combination of up to t symbols.
Most known techniques for Reed-Solomon encoding are based on polynomial division. The direct application of this method allows for calculation of check symbols, which are sometimes also referred to as parity check symbols, based on the input of one data symbol at a time. With k symbols in a message word, k clock cycles are needed to calculate n−k check symbols. By substitution, it may be possible to calculate the check symbols based on the input of a number of data symbols at once, but the feedback nature of such a calculation means that the critical path grows with each additional parallel input symbol, and the encoder operational frequency is decreased quickly.
Moreover, increasing communications, storage, and processing demands require ever more efficient error correction including Reed-Solomon forward error correction (FEC). Consequently, it is desirable to provide improved mechanisms for implementing error correction.
An integrated circuit may configured to implement a Reed-Solomon encoder circuit. The encoder circuit may include partial syndrome calculation circuitry and matrix multiplication circuitry. The partial syndrome calculation circuitry may receive a message and generate corresponding partial syndrome values. The matrix multiplication circuitry may receive the partial syndrome values and generate corresponding parity check symbols.
The matrix multiplication circuitry may include an array of Galois Field multipliers (e.g., constant or variable Galois Field multipliers) for multiplying the partial syndrome values by corresponding predetermined Lagrangian coefficients. The matrix multiplication circuitry may also include Galois Field adders for summing products output from the multipliers.
In one suitable arrangement, the matrix multiplication circuitry may generate the parity symbols in a single clock cycle. In another suitable arrangement, the matrix multiplication circuitry may generate the parity symbols over two or more clock cycles. In such arrangements, the matrix multiplication circuitry may include multiple tables for storing the predetermined Lagrangian coefficients, where the tables can be indexed using a counter to output varying coefficients at each successive clock cycle.
Further features of the invention, its nature and various advantages will be more apparent from the accompanying drawings and following detailed description.
The present embodiments provided herein relate to Reed-Solomon encoding and to circuitry for performing such encoding, particularly in an integrated circuit.
Many modern applications encode data prior to transmission of the data on a network. As part of the data encoding, error correcting codes such as Reed-Solomon codes are often included to allow for the detection and/or correction of data signals that were corrupted during the data transmission. Reed-Solomon codes are often used because they provide powerful error correction capabilities.
However, most known techniques for Reed-Solomon encoding are based on polynomial division, and the feedback nature of such techniques implies that the critical path grows with each additional parallel input. As a result, the encoder operational frequency is decreased quickly. At the same time, increasing communications, storage, and processing demands require ever more efficient error correction.
Consequently, it is desirable to provide improved mechanisms of encoding Reed-Solomon code words. For example, it is desirable to provide a Reed-Solomon encoder that can be easily parallelized and have obvious points of inserting pipelining so that the Reed-Solomon encoder can be used in very fast systems (e.g., 100G Ethernet or 400G Ethernet).
In certain embodiments, Reed-Solomon encoding and/or decoding circuitry may be implemented in an integrated circuit that is coupled to a network, as an example.
It will be recognized by one skilled in the art, that the present exemplary embodiments may be practiced without some or all of these specific details. In other instances, well-known operations have not been described in detail in order not to unnecessarily obscure the present embodiments.
An illustrative embodiment of an integrated circuit 101 is shown in
Storage circuitry 110 may have random-access memory (RAM), read-only memory (ROM), or other addressable memory elements. Storage circuitry 110 may be a single-port memory, a dual-port memory, a quad-port memory, or have any other arbitrary number of ports. If desired, storage circuitry 110 may be implemented as a single-port memory with control circuitry that emulates dual-port, quad-port, or other multi-port behavior. Processing circuitry 102 may access storage circuitry 110 by sending read and/or write requests over interconnection resources 103 to storage circuitry 110. In some embodiments, external components may access storage circuitry 110 via external interconnection resources 105, input-output circuitry 104, and interconnection resources 103. In response to receiving a read request, storage circuitry 110 may retrieve the requested data and send the retrieved data over interconnection resources 103 to the requestor. In case of a write request, storage circuitry 110 may store the received data.
Internal interconnection resources 103 such as conductive lines and busses may be used to send data from one component to another component or to broadcast data from one component to one or more other components. External interconnection resources 105 such as conductive lines and busses, optical interconnect infrastructure, or wired and wireless networks with optional intermediate switches may be used to communicate with other devices.
Input-output circuitry 104 may include parallel input-output circuitry, differential input-output circuitry, serial data transceiver circuitry, or other input-output circuitry suitable to transmit and receive data. If desired, input-output circuitry 104 may include error detection and/or error correction circuitry. For example, input-output circuitry 104 may include Reed-Solomon encoding and/or decoding circuitry that encode data signals by creating Reed-Solomon code words based on the data signals before the data transmission or decode Reed-Solomon code words after the data reception to allow for error correction and reconstitution of the data signals.
Reed-Solomon encoder circuit 210 may receive a data symbol vector m (220 in
Reed-Solomon encoding operates over a finite field, and the n-symbol Reed-Solomon code word 230 may be defined as:
C(X)=X(n-k)M(X)+P(X) (1)
where X(n-k) shifts data symbol vector m such that the data symbol vector m doesn't overlap with the parity check symbols p.
The Reed-Solomon code word 230 may be transmitted over a connection and received by a Reed-Solomon decoder circuit as a word r that has n symbols. Word r may include error word e in addition to Reed-Solomon code word c (i.e., r=c+e). The Reed-Solomon decoder circuit may check the word r to detect and correct the error with the goal of restoring the message. For example, the Reed-Solomon decoder circuit may compute a syndrome vector syn for the received word using a parity check matrix S, which may have n rows and 2t=(n−k) columns:
syn=r*S=c*S+e*S (2)
Consider the scenario in which the word r is received without an error (i.e., e=0 and r=c). In this scenario, equation 2 is equal to zero (i.e., syn=c*S=0), because S is the parity check matrix of the Reed-Solomon code and the Reed-Solomon code word c evaluated at any root is zero.
Thus, if desired, the Reed-Solomon encoder circuit 210 may use the parity check matrix for the encoding and derive the parity check symbols so that the produced code word is orthogonal to the parity check matrix. In this scenario, the Reed-Solomon encoding problem may be stated as a matrix problem in the form:
m*S
u
+p*S
d=0 (3)
where m is the k-symbol message, p is the (n−k) parity check symbols, Su includes the first k rows of S, Sd the last (n−k) rows of S. For example, matrices Su and Sd may be defined as:
Matrices Su and Sd may be computed using the generator polynomial of the finite field, which may be sometimes also referred to as the field polynomial. The field polynomial is usually provided by an industry standard. For example, the 100G Ethernet standard IEEE 802.3bj defines a Reed-Solomon code with n=528, k=514, t=14, and a field polynomial X̂10+X̂3+1.
Thus, all elements in matrices Su and Sd may be computed once. If desired, matrices Su and Sd may be stored in storage circuits. For example, Reed-Solomon encoder circuit 210 may include storage circuits 296 and 298 to store matrices Su and Sd, respectively. If desired, storage circuits 292 and 294 outside Reed-Solomon encoder circuit 210 may store matrices Su and Sd, respectively, and Reed-Solomon encoder circuit 210 may receive the matrices at input ports 242 and 244, respectively. In some scenarios, one matrix of matrices Su and Sd may be stored inside Reed-Solomon encoder circuit 210 and the other matrix may be stored outside Reed-Solomon encoder circuit 210.
Reed-Solomon encoder circuit 210 may receive message m as data symbol vector 220 at input port 240. Multiplier 280 may multiply message m with matrix Su to determine a partial syndrome vector v (i.e., v=m*Su). Multiplier 280 can therefore sometimes be referred to as a partial syndrome generator. For example, multiplier 280 may perform a syndrome calculation on the message and continue the syndrome calculation with zeroes inserted where the unknown parity symbols would be. In another example, multiplier 280 may perform a syndrome calculation on the message, stop the syndrome calculation after the last message symbol, and frequency shift the partially computed syndrome in the frequency domain by multiplying the partially computed syndrome with a set of constants.
At this point, a numerical method is introduced to calculate parity check symbols p. This problem can be summarized as a solution of xA=−b, where A is matrix Sd, x is the row vector p, and b is the row vector of partial syndromes m*Su. By inspection, Sd is a Vandermonde matrix, which is an invertible matrix. Thus, the parity check symbols p may be computed as follows:
p*S
d
*S
d
−1
=−m*S
u
*S
d
−1 (6)
Since Sd*Sd−1 is equal to one, −m is equal to m in any extension of the binary field GF(2) and v is equal to m*Su, equation 6 simplifies to:
p=v*S
d
−1 (7)
In accordance with an embodiment, the solution to equation 7 can be found using Lagrangian polynomials. The required vector p corresponds to a certain polynomial P(X):
P(X)Σi=0n-k-1piXi (8)
where the coefficients {pi} of P(X) are the elements of the vector p. Suitable values for these coefficients can be calculated using Lagrangian interpolation:
P(X)=Σj=0n-k-1vjLj(X) (9)
{vj} are the coefficients of the partial syndrome obtained by computing v=m*Su. In the following we verify that the coefficients {pi} are actually the parity check symbols satisfying equation 7. Note that Lj(αj)=1 while Lj(αi)=0 if i≠j. This means that:
P(αj)=vj (11)
where equation 11 holds for any j in 0 . . . n−k−1. Combining equation 8 with equation 11 gives:
P(αj)=Σi=0n-k-1piαji=vj (12)
However, Σi=0n-k-1piαji is precisely the jth element of the vector p*Sd. This means that:
{p*Sd}j=vj (13)
Since equation 13 holds for all j in 0 . . . n−k−1 (i.e. for all rows of the vector), we get:
p*S
d
=v (14)
Since Sd is invertible, we also get:
p=v*S
d
−1 (15)
as required by equation 7.
As a simple example with (n−k)=3, the polynomial can be expanded as follows:
The coefficients for each vj remains constant (since α is known for a given finite field) and only the syndromes vj will change with each new message.
As another example, consider a scenario in which a Reed-Solomon code word is defined such that n=30, k=24, and m=8, with field polynomial X8+X4+X3+X2+1. Since (n−k) is equal to six in this example, the corresponding polynomial will have six terms can be expanded as follows:
Now, consider that an illustrative 24 symbol message contains monotonically decreasing values m={30, 29, 28, . . . , 8, 7} and that the partial syndromes m*Su={115, 192, 21, 217, 192, 24}. In other words, {v0, v1, v2, v3, v4, v5} is equal to {24, 192, 217, 21, 192, 115}, respectively.
The roots of the field 1, α, α2, α3, α4, and α5 can be calculated from the field polynomial, and are equal to 1, 2, 4, 8, 16, and 32, respectively. Substituting these values into equation 17, the denominator of the first term is equal to 6, and the numerator is:
X
5+62X4+63X3+229X2+197X+38 (18)
Thus, the first Lagrange polynomial term (i.e., the coefficient of v0) is equal to:
122X5+254X4+132X3+84X2+175X+250 (19)
Similarly, the second to fifth Lagrange polynomial terms can be computed and are equal to:
187X5+93X4+X3+153X2+209X+175 (20)
46X5+108X4+131X3+12X2+153X+84 (21)
133X5+105X4+234X3+131X2+X+132 (22)
60X5+154X4+105X3+108X2+93X+254 (23)
86X5+60X4+133X3+46X2+187X+122 (24)
Although equations 19-24 seem fairly complicated, they can all be computed in advance since they are constant for any given code word. As a result, calculation of the parity check symbols now becomes a simple matrix multiplication operation based on the Lagrange polynomial terms and the calculated partial syndromes m*Su. Substituting the partial syndromes into equation 17, the parity check symbols can be computed as follows:
P(X)p5X5+p4X4+p3X3+P2X2+p1X+P0=(122X5+254X4+132X3+84X2+175X+250)*24+(187X5+93X4+X3+153X2+209X+175)*192+(46X5+108X4+131X3+12X2+153X+84)*217+(133X5+105X4+234X3+131X2+X+132)*21+(60X5+154X4+105X3+108X2+93X+254)*192+(86X5+60X4+133X3+46X2+187X+122)*115 (25)
Where p5 is equal to the sums of all the X5 products, which is equal to 116 (=24*122+192*187+ . . . +115*86, e.g., using Galois field arithmetic). Similarly p4 is equal to the sums of all the X4 products; p3 is equal to the sums of all the X3 products; etc. As a reminder 24=v0, 192=v1, 217=v3, etc. All remaining parity check symbols can be computed in this way.
Aggregation circuit 260 of
A first method involves using a decoder style syndrome circuit that can be applied to the message, and then (n−k) zero valued symbols can be input to the syndrome circuit to create shifted syndrome values. This type of syndrome circuit can be efficiently parallelized to process multiple message symbols at a time, as described in U.S. Pat. No. 8,347,192, which is hereby incorporated by reference in its entirety. This method may take advantage of existing syndrome circuitry, but at the cost of (n−k) additional clock cycles.
A second method involves using the syndrome circuit on the message, and then shifting all of the syndromes in a single multiplication step (e.g., using (n−k) Galois Field (“GF( )”) multipliers). This method may require additional logic (although GF( ) multipliers are relatively small), but will save on the order of (n−k) clock cycles.
A third method involves using the syndrome circuit on the message as in the second method, while using an alternate form of the matrix multiplication values. In particular, each Lagrangian polynomial can be multiplied by a respective syndrome shift value. Performing multiplication in this way takes advantage of the fact that the Lagrangian polynomial terms are constants, which can be computed in advance (e.g., the Lagrangian coefficients can be stored as predetermined values).
A fourth method involves performing a direct matrix multiplication of the message m with the syndrome matrix Su. This method is optimal for very high speed applications, but requires more resources. The various methods described above are merely illustrative and are not intended to limit the scope of the present invention. If desired, other suitable ways for computing the partial syndrome values can be employed.
In the example of
Still referring to
Matrix multiplication circuitry 304 may receive the partial syndromes generated from circuitry 302 and is configured to calculate all parity (check) symbols simultaneously in one clock cycle. Matrix multiplication circuitry 304 may be effectively configured to perform all the multiplication and addition operations of equation 25. Circuitry 304 may take each of the received partial syndromes v and multiply them by all the terms in each Lagrangian polynomial. Each product can then be summed with all of the other products of the same coefficient index for each polynomial (e.g., all the X5 products can be added together to produce parity symbol p5, all the X4 products can be added together to produce p4, all the X3 products can be added together to produce p3, etc.).
For example, for parity symbol pn-k-1: v0 is multiplied by the (n−k)th coefficient L1,n-k-1 in the first Lagrangian polynomial using constant GF( ) multiplier 310-1; v1 is multiplied by the (n−k)th coefficient L2,n-k-1 in the second Lagrangian polynomial using constant GF( ) multiplier 310-2; and vn-k-1 is multiplied by the (n−k)th coefficient Ln-k,n-k-1 in the last Lagrangian polynomial using constant GF( ) multiplier 310′. In this example, Lagrangian coefficients L1,n-k-1=122, L2,n-k-1=187, and Ln-k,n-k-1=86 (see, e.g., equation 25).
Similarly, for parity symbol p0: v0 is multiplied by the constant L1,0 in the first Lagrangian polynomial using constant GF( ) multiplier 310-1; v1 is multiplied by constant L2,0 in the second Lagrangian polynomial using constant GF( ) multiplier 310-2; and vn-k-1 is multiplied by constant Ln-k,0 in the last Lagrangian polynomial using constant GF( ) multiplier 310′. In this example, Lagrangian constant coefficients L1,0=250, L2,0=175, and Ln-k,0=122 (see, e.g., equation 25).
Note that constant GF( ) multipliers 310 can be used since all Lagrangian coefficients are constant and can be precomputed in advance. The predetermined Lagrangian coefficients may be held locally in storage circuits 296 or 298 (see, e.g.,
In accordance with another suitable embodiment,
Matrix multiplication circuitry 404 may receive partial syndromes v from partial syndrome calculation circuitry 402 and output corresponding parity symbols over multiple clock cycles. Depending on the parallelism of encoder 404, two or more clock cycles can be required for outputting the parity check symbols. As an example of a Reed-Solomon encoding with n=528, k=514, and parallelism=8, 66 clocks are required for the entire codeword, with the last two clock cycles for outputting the 14 parity check symbols. As another example with n=544, k=514, and parallelism=8, 68 clocks are required for the entire codeword, with the last four clock cycles required outputting the 30 parity check symbols.
In yet other suitable configurations, many more clock cycles can be used to generate the parity symbols. This can be used to create a smaller, longer latency encoder. For example, a Reed-Solomon encoding with n=544, k=514, and parallelism=8, the entire codeword must be transmitted in 68 clock cycles. If the parity generation were to take 30 clock cycles, then the message could be delayed 30 clock cycles before being sent. Even if the parity generation took 60 clock cycle, there would be enough time to output the codeword. The advantage for multi-cycle codeword is resource savings. The single-cycle codeword generation will require (n−k)2 GF( ) multipliers. In the scenario where (n−k)=30, 900 GF( ) multipliers would be required.
A two-cycle codeword generation, as shown in the exemplary configuration of
Referring specifically to
In the second cycle, counter 407 may provide a second address value to both tables 406 and 408 to output the lowest indexed coefficients of each Lagrangian polynomial, which are all provided in parallel to each GF( ) multiplier 410. The different products associated with each parity symbol can be summed together using GF( ) adders such as adders 412 and 414. The (n−k)/2 multipliers 410 for each of the (n−k) syndromes can then be used to generate the lowest indexed parity symbols from P(n-k)/2 down to P0 during the second cycle.
The configuration of
At step 502, matrix multiplication circuitry may be used to compute parity check symbols based on the partial syndromes generated during step 500 and based on predetermined Lagrangian coefficients. In one suitable arrangement, matrix multiplication circuitry 304 of
The steps of
The foregoing is merely illustrative of the principles of this invention and various modifications can be made by those skilled in the art. The foregoing embodiments may be implemented individually or in any combination.