Académique Documents
Professionnel Documents
Culture Documents
, 2011
Abstract In this paper, Reed Solomon (RS) Encoder and performs detection and correction of information (data)
Decoder and their hardware implementation in cyclone II Field symbols in a codeword. The RS encoded data is processed to
Programmable Gate Array (FPGA) is analyzed. RS codes are non- determine whether any errors have occurred during
binary cyclic error correcting block codes. Here redundant symbols transmission. Once the number of errors is determined, the
are generated in the encoder using a generator polynomial and added decoder decides if they are within the range of correction.
to the very end of the message symbols. Then RS Decoder
After determining this, the decoder corrects the errors in the
determines the locations and magnitudes of errors in the received
polynomial. The paper covers the RS encoding and decoding
received data.
algorithm, simulation results, basic FPGA technology and the k 2t
implementation details of the proposed RS encoder and decoder
architecture. Register transfer level (RTL) of RS encoder and decoder
is designed, simulated and implemented separately using Verilog in
s Data Parity
cyclone II FPGA. The design can also be synthesized to other FPGA
architectures.
n
Fig. 1 The Structure of a RS Codeword [4]
Keywords FPGA, RS, RTL,Verilog
The results constitute simulation of Verilog codes of
I. INTRODUCTION different modules of the Reed Solomon Encoder and Decoder
in Quartus II. The design was successfully implemented in the
R EED Solomon (RS) codes [1], encoders and decoders are
extremely powerful error correcting tools that increase
transmission quality to a great extent. RS codes operate on the
cyclone II FPGA using the Altera DE1 board.
This paper presents an efficient design and implementation
of RS Encoder and Decoder in FPGAs. The following
information by dividing the message stream into blocks of chronology is being followed to present the paper. In section
data, adding redundancy per block depending only on the II, the operation and architecture of RS Encoder is discussed.
current inputs. The symbols in RS coding are elements of a Then in section III, RS Decoding algorithm is given. Section
finite field or Galois Field (GF). A GF is a set that consists of IV deals with the design architecture. Design hierarchies for
finite number of elements. Encoding is achieved by affixing both RS Encoder and Decoder are shown and the basic blocks
the remainder of a GF polynomial division into the message. are described. Then in section V, we discussed
This division is accomplished by a Linear Feedback Shift implementation strategies where details of design architecture
Register (LFSR) implementation. The mathematics of RS and hardware blocks are shown. Further on, in section VI,
encoding is based on finite field arithmetic [2], [3]. GF implementation results are presented and in section VII,
multipliers are used for encoding the information block. The conclusion is drawn based on our results.
function of the decoder is to process the received codeword to
compute an estimate of the original message symbols. II. RS ENCODER
Typically about ten times more resources are required to
decode and correct the corrupted data. The codes are The Reed Solomon Encoder reads in k data symbols
represented by the format RS (n, k) where n is the total computes the n k symbols, append the parity symbols to the
number of s-bit wide symbols, and k is the number of s-bit k data symbols for a total of n symbols. The encoder is
wide information (data) symbols in a codeword. RS Decoder essentially a 2t tap shift register where each register is m bits
wide. The multiplier coefficients are the coefficients of the RS
Aqib Al Azad is a graduate student from Department of Electrical generator polynomial. The general idea is the construction of a
Engineering and Computer Science, North South University, Dhaka, polynomial, the coefficient produced will be symbols such that
Bangladesh (e-mail: aqibazad@ymail.com).
Minhazul Huq is a graduate student from Department of Electrical the generator polynomial will exactly divide the data/parity
Engineering and Computer Science, North South University, Dhaka, polynomial. [5]
Bangladesh (e-mail: minhazhuq@yahoo.com). The transmitted codeword is systematically encoded and
Iqbalur Rahman Rokon is a Faculty member in North South University, defined in as a function of the transmitted message m(x), the
Dhaka, Bangladesh. Former Sr. Engineer, VLSI Chip Research and
Development (R&D), Emulex Corporation, California, USA (Phone: +88-
generator polynomial g(x) and the number of parity symbols
01726246189 ; e-mail: irahman@northsouth.edu ). 2t as given below.
117
International Conference on Advancements in Electronics and Power Engineering (ICAEPE'2011) Bangkok Dec., 2011
A. Operation
RS codes are systematic, so for encoding, the
information symbols in the codeword are placed as the higher
power coefficients. This requires that information symbols
must be shifted from power level of (n-1) down to (n-k) and
the remaining positions from power (n-k-1) to 0 be filled with
zeros. Therefore any RS encoder design should effectively Fig. 2 Architecture of RS Encoder
perform the following two operations, namely division and
shifting. Both operations can be easily implemented using III. RS DECODER
Linear-Feedback Shift Registers [5], [6], [7]. The decoding procedure for Reed- Solomon codes
Reed-Solomon codes may be shortened by involves determining the locations and magnitudes of the
(conceptually) making a number of data symbols zero at the errors in the received polynomial R(x). Locations are those
encoder, not transmitting them, and then re-inserting them at powers of x (x2, x3, and others) in the received polynomials
the decoder. Encoder architecture is shown in Fig. 2. whose coefficients are in error. Magnitudes of the errors are
The Encoder architecture shows that one input to each symbols that are added to the corrupted symbol to find the
multiplier is a constant field element, which is a coefficient of original encoded symbol. These locations and magnitudes
the polynomial g(x). For a particular block, the information constitute the error polynomial. Also, if the decoder is built to
polynomial M(x) is given into the encoder symbol by symbol. support erasure decoding, then the erasure polynomial has to
These symbols appear at the output of the encoder after a be found. An erasure is an error with a known location. Thus,
desired latency, where control logic feeds it back through an only the magnitudes of the erasures have to be found for
adder to produce the related parity. This process continues erasure decoding. A RS (n, k) code can successfully correct as
until all of the k symbols of M(x) are input to the encoder. many as 2t = n-k erasures if no errors are present. With both
During this time, the control logic at the output enables only errors and erasures present, the decoder can successfully
the input data path, while keeping the parity path disabled. decode if n-k 2t +e, where t is the number of errors, and e is
With an output latency of about one clock cycle, the encoder the number of erasures [9].
outputs the last information symbol at (k+1)th clock pulse.
A. Operation
Also, during the first k clock cycles, the feedback control logic
feeds the adder output to the bus. After the last symbol has When a RS Decoder corrects a symbol, it replaces the
been input into the encoder (at the kth clock pulse), a wait incorrect symbol with the correct one, whether the error was
period of at least n-k clock cycles occurs. During this waiting caused by one bit being corrupted or all of the bits being
time, the feedback control logic disables the adder output from corrupted. Thus, if a symbol is wrong, it might as well be
being fed back and supplies a constant zero symbol to the bus. wrong in all of its bit positions. This gives RS codes
Also, the output control logic disables the input data path and tremendous burst-noise advantages over binary codes [10]. RS
allows the encoder to output the parity symbols (k+2th to Decoder mainly works on five steps:
n+1th clock pulse). Hence, a new block can be started at the 1. Calculate the syndromes.
n+1th clock pulse [6]. 2. Use the syndromes to determine the error
locator polynomial.
B. Architecture 3. Find the roots of the error locator
The encoder is architected using the Linear Feedback polynomial. The inverses of these roots give the
Shift Register Design. The coefficients , 0<i<15 are derived locations of errors.
as, 4. Use the syndromes, roots, and error locator
g(x) = x 16 + 59x 15 + 13x 14 + 104x 13 + 189x 12 + 68x 11 polynomial to determine the error magnitudes.
5. Use the information about error location and
+ 209x 10 + 30x 9 + 8x 8 + 163x 7 + 65x 6 (3)
magnitude to actually correct the errors.
+ 41x 5 + 229x 4 + 98x 3 + 50x 2 + 36x + 59
Each message is accompanied by a pulse signal, which The first step is to calculate the syndrom values [11]
indicates the beginning of a message. After 239 clock cycles, from the received codeword. These are then used to find the
the encoder starts concatenating the 16 calculated parities to coefficients of the error locator polynomial 1 .... v and the
the message to make a codeword of 255 symbols [8]. error magnitude polynomial 0 .... v-1 using the Euclidean
algorithm [12]. The error locations are figured out by the
Chien search [13] and the error magnitudes are calculated
118
International Conference on Advancements in Electronics and Power Engineering (ICAEPE'2011) Bangkok Dec., 2011
using Forney's method [14]. The error magnitude vector Y 3) Parity check: The parity check block allows the
comes out of the Chien/Forney block in reverse order, so it is encoder to output parity symbols.
passed through a FIFO block before it is added to the received
C. Block description of RS Decoder
codeword R(x). As these calculations involve all the symbols
of the received code word, it is necessary to restore the 1) SCBlock: At the end of received word, all cells store
message until the results of the calculation are available. Then, the syndrome values and Syndrome Computation (SC) block
to correct the errors, each error value is added (modulo 2) to sets its flag high if one or more syndrome values are not zero.
the symbol at the appropriate location in the received 2) KESBlock: The Key equation solver (KES) block
codeword [15]. provides two polynomial -error locator polynomial and error
magnitude polynomial.
B. Architecture 3) CSEEBlock: Chien Search and Error Evaluator
(CSEE) block identifies error location while computes its error
magnitude.
4) FIFO register: FIFO register stores 32 received
word symbols. To match the order of the bytes in error vector
and received codeword FIFO is applied as the error vector is
produced in the reverse order of the received codeword.
5) Controller: The controller provides synchronization
among all four modules -SC, KES, CSEE and FIFO Registers.
B. Block description of RS Encoder Fig. 7 and Fig. 8 show the internal block diagram for
1) Polynomial generator: For the design we used the RS Encoder and Decoder respectively. Fig. 9 and Fig. 10
following field generator polynomial illustrate the implemented components inside the chip.
p(x) = x 8 + x 4 + x 3 + x 2 + x 1 + 1 (4)
Additionally, the interconnections of the components are
shown.
and the generator polynomial
g(x) = g 0 + g 1 (x) + g 2 (x 2 ) + + g 2t 1 (x 2t 1 ) + x 2t (5)
2) Data-rom: We provide a ROM as the message to
encode.
119
International Conference on Advancements in Electronics and Power Engineering (ICAEPE'2011) Bangkok Dec., 2011
VI. RESULTS
Table I and Table II show synthesis results of RS
Encoder and RS Decoder.
TABLE III
SYNTHESIS SUMMARY FOR RS ENCODER
TABLE IV
SYNTHESIS SUMMARY FOR RS DECODER
120
International Conference on Advancements in Electronics and Power Engineering (ICAEPE'2011) Bangkok Dec., 2011
Fig. 11 and Fig. 12 describe the simulation waveform of error detection and correction techniques have been used
RS Encoder and Decoder. which are essential for reliable communication over a noisy
For RS Encoder, the simulation result verifies our channel. The results demonstrate that the Reed Solomon codes
design. The encoder has an error indicator that points out the are very efficient for the detection and correction of burst
presence of errors in the data. errors. RS codes are used significantly in Wireless
Communication (mobile phones, microwave links), Deep
Space and Satellite Communications Networks (CCSDS),
mass storage devices (hard disk drives, DVD, barcodes),
digital TV, digital video broadcasting (DVB), and Broadband
Modems (ADSL, VDSL, SDSL, HDSL etc). Technologies are
becoming smarter and compact day by day, so we hope our
work will add new dimension in that trend. This design will
play a remarkable role with its significant speed and
efficiency.
ACKNOWLEDGMENT
At first the authors would want to thank Allah for
giving them the opportunity to do this work. They would also
1st code 2nd code 1st recvd. 2nd recvd. 3rd code 3rdrecvd.
like to thank Dr. M Abdul Awal, Chairman of EECS
word word codeword codeword word codeword Department, North South University for providing the
facilities for the completion of this work.
Fig. 12 Output of RS Decoder
121