Reed-Solomon codes

Below are two programs written in C for simulating encoding and decoding procedures of RS codes, which is the topic of Chapter 4 of the book. These programs implement errors-and-erasures decoding with (1) Berlekamp-Massey (BM) algorithm and (2) Euclidean algorithm for any shortened RS code with arbitrary starting root of its generator polynomial (or starting zero of the code).

In the programs below, the Reed-Somolon code is specified by the finite field GF(2^m), the code length (length <= 2^m-1), the number of redundant symbols (length-k), and the initial zero of the code, init_zero.

Update 8/17/03: Added a line to check for zero in computation of the erasure polynomial. Many thanks to Matteo Albanese, a graduate student at Politecnico di Milano, for pointing this out!

Encoding and errors-and-erasures decoding of an RS code, BM algorithm:
rs_eedec_bm.c

Errors and erasures correction using the modified Berlekamp-Massey algorithm. For more details and an example, see the book.

See also: rs_eedec_bm_c4p3.c and rs_eedec_bm_c4p5.c

Encoding and errors-and-erasures decoding of an RS code, Euclidean algorithm:
rs_eedec_euc.c

Errors and erasures correction using the modified Euclidean algorithm. For more details and an example, see the book.

Simulation of an RS (7,5,3) code with binary modulation over an AWGN channel:
AWGN_binRS753.m

Performance of M-ary QAM over an AWGN channel with RS coding over GF(M):
RS coded MQAM.mdl

Note: This is a Simulink model created with Matlab version 7.1 ...

BACK TO CONTENTS


This page was last updated on August 7, 2008, by Robert H. Morelos-Zaragoza.