Parallel Reed-Solomon (15, K, D) Encoder/Decoder

In this article, we propose a Reed Solomon error correcting encoder/decoder with the complete description of a concrete implementation starting from a VHDL description of this decoder. The design on FPGA of the (15, k, d) Reed Solomon decoder is studied and simulated in order to implement an encoder/decoder function.The proposed architecture of the decoder can achieve a high data rate, in our case, 5 clock cycles, and having a reasonable complexity (1010 CLBs).


INTRODUCTION
Nowadays, we live in a world where communications play an important role both in our daily lives and in their involvement in the economic and technological fields.We constantly need to increase the flow of transmission while maintaining and improving their quality.But without a concern of reliability, all improvement efforts would be futile because it would necessarily mean that some data are to be rebroadcast An error correcting code allows the correcting of one or several errors in a code word by adding redundant symbols to the information, otherwise called, control symbols.
Different possible codes exist but in this document we will only deal with Reed Solomon codes because for the moment being, they represent the best compromise between effectiveness (symbols of parity added to the information) and complexity (coding difficulty).The theory will present two decoding methods concerning Reed -Solomon codes.The first solution is the method of the Euclidean division adopted in this article, while the second method will highlight the Berlekamp-Massey algorithm.
In this work, we will present the hardware achievement of Reed Solomon encoder/decoder circuits for a (15, k, d) Code.The hardware implementation will be carried out by using programmable logic circuits of the type FPGA Altera, all translated into VHDL language.The VHDL implementation will be treated and simulated using Quartus II.
After recalling the principle of encoding/decoding of Reed-Solomon code, this paper presents the design and VHDL implementation on FPGA of (15, k, d) Reed-Solomon decoders following a pipeline and / or parallelized structure.

A. (15, k, d) Reed-Solomon codes
The codes of Reed Solomon are non binary BCH codes belonging to the Galois fields GF (q=2 4 ).Each symbol q-areas of the body can be represented by m binary elements.The main Reed Solomon code parameters are (n, k, d) with n representing the length words of the codes, k representing the length of the information messages and d its Hamming distance.The (15, k, d) Reed Solomon code is wholly defined by the generator polynomial g (x).The primitive and irreducible polynomial is of the form P(x) = x 4 + x +1.The Galois field contains 16 elements and α is a root of P(x).The generator polynomial g (x) characterizes the properties of the code.The size of the symbols is 4 bits [1], [2].

B. RS encoder
The minimal distance d allows determining the ability of correction of the error correcting codes.The parameters are defined:  the length of the code : The polynomial generator g (x) is defined as: For the (15, k, d) Reed Solomon code, the information M (x) can be put in the following polynomial form: where The redundancy is the remainder of the division: x n-k *M(x) by the generator polynomial g(x).All the additions are made in modulo two arithmetic.The rest can be written in the following form: The remainder R (x) thus obtained completes the message to make the codeword C (x), in this way the literal expression of C(x) is given by: The coding is systematic.The polynomials coefficients M (x), R (x) and C (x) can be represented either in the form of discrete values included between 0 and 15, or in the form of the power of α..

C. RS decoder
The code word C (x) transmitted may be subject to alterations due to the environment.The received code word C'(x) is equal to: E (x) represents the expression of the errors polynomial.

III. VHDL CIRCUIT DESIGN
The FPGA have known a great improvement in size and speed.Also, the FPGA constitute a more appropriate platform for the implementation of the applications of the error detecting correcting codes.
Several studies on Reed Solomon "encoders/decoders" have already been carried out both at the university [5][6] or industrial [7][8] levels.The VHDL description of the Reed Solomon code is made so that every block of the proposed architecture is described in an independent entity.

A. Encoding
In this study, we have chosen the RS codes with parameters: (n, k, d) = (15, 9, 7) and (15, 11, 5).The circuit which instils the key encoding equation is given in figure1: The generator polynomial coefficient is given by Tab 1.The figure 2 shows the input / output pins of the RS encoder.

Reset:
Signal allowing the reset the encoder.

Input:
Input signal of symbols to encode.

Out:
Output signal of encoded symbols.
Figure 3 shows the functional simulation of our (15, 9) encoder circuit, the latter has a complexity of 38 LEs.

B. Decoding
For decoding we have used the following architecture:

 Syndrome S(x)
A syndrome for a Reed Solomon code is a polynomial with 2 * t coefficients (table 2) that depend only errors and are calculated by substituting 2 * t roots of the polynomial generator in C'(x).

 TAB 2: SYNDROME POLYNOMIAL COEFFICIENTS FOR THE RS CODES
 Polynomial locaters and evaluators.The decoding method of Reed Solomon codes is based on the solving of key equation: where S (x): Syndrome polynomial.σ(x) : Error locator polynomial.

) (x  Error evaluator polynomial
The Euclid algorithm allows to calculate these polynomials.The positions of the errors are located at the roots of the error locator polynomial which are calculated by brute force using the Chien-search.The error values are then calculated using Forney algorithm.
The circuit represented in figure 5 reflects Euclid algorithm. Performance of Reed-Solomon code The Figure 6 shows the performances of RS decoders (15.9) and RS (15.11), altered by AWGN channel noise with a BPSK modulation.

IV. TESTS AND RESULTS
The methodology of simulation adopted in this work is to form the codeword C (x) using the encoding algorithm.The errors Injection consists of adding modulo 2 the codeword C(x) and the error polynomial E(x).The simulation example treats the case of a message with two errors.The codeword to be transmitted is the following sequence depending on the chosen code:   The message at the output of the two encoders is shown by table 3. The received message is: .0 , ,  The figure 7 shows the syndrome coefficients and the figure 8 shows the coefficients of the two polynomials    The Altera's FPGA FLEX10K on which we separately tested the different blocks, from the beginning, contains 1728 LEs and 189 input / output pins.The chosen encoder/decoder architecture, presented in the previous sections, was described in VHDL and embedded on FPGA (EPF10K30RI2404) using the software Quartus II from the Altera company.The area occupied by each circuit is given in the following The architecture chosen for this implementation reduces the number of cycles N necessary to have decoded data:   For the case of (15, k, d) Reed Solomon code the operations require a latency of 5 Timing Clock cycles.As for the architecture adopted in [1], 8 Timing Clock cycles are required.
The area occupied for the decoder for the (15, 9, 7) RS code is approximately of 972 LEs, and 868 LEs for the decoder of (15, 11) code RS.That is to say, we have reduced the area occupied in relation to the results in [1] [2] [9] [10].

V. CONCLUSION
The design of the encoder/decoder was described in VHDL and validated on FPGA (type FLEX10K30) using the software Quartus II of the company Alteras.The results showed that the area occupied and the latency is very convincing.Indeed, we have decreased the latency and the area occupied by adopting architecture in which each block is pipeline and/or parallelized.
the error correction capability of the code  The Hamming distance :

TAB 1 :Figure 2 :
Figure 2: The input / output pins of the encoder.

Figure 4 :
Figure 4: The Architecture Used For The (15, K, D) Reed Solomon Decoder.

Tab 3 :
The codeword at the output of the two encodersThe received message is affected by two errors in positions 2 and 9 with the amplitudes and 13  respectively.

Figure 7a :
Figure 7a: syndrome of the received message of code RS(15,9)

Figure 9b :
Figure 9b : Detection Of The Positions And The Amplitudes Of The Two Errors For RS(15,11) Code

1 N
: Number of Timing Clock cycles needed in calculating the syndrome (1 cycle in our case).

2 N:
Number of cycles to calculate σ(x) and )

3 N:
Number of cycles necessary to determine the position and the correction of errors (1 cycle).

table 4 :
TAB 4: THE AREA OCCUPIED BY DIFFERENT BLOCKS