Decode Reed-Solomon code to recover binary vector data
Block sublibrary of Error Detection and Correction
The Binary-Output RS Decoder block recovers a binary message vector from a binary Reed-Solomon codeword vector. For proper decoding, the parameter values in this block must match those in the corresponding Binary-Input RS Encoder block.
The Reed-Solomon code has message length Kand codeword length N – number of punctures. You specify N and K directly in the dialog box. The symbols for the code are binary sequences of length M, corresponding to elements of the Galois field GF(2M), where the first bit in each sequence is the most significant bit. Restrictions on M and N are described in Restrictions on the M and the Codeword Length N.
The block can output shortened codewords when you specify the shortened message length, S. In this case, specify codeword length N and message length K as the full-length (N, K) code that is shortened to an (N–K+S, S) code.
The input and output are binary-valued signals that represent codewords and messages, respectively. The input and output signal lengths are listed in the Input and Output Signal Length in BCH and RS Blocks table on the BCH Decoder reference page. The output signal inherits its data type from the input signal. For information about the data types each block port supports, see the Supported Data Types table.
For more information on representing data for Reed-Solomon codes, see Integer Format (Reed-Solomon Only).
If the decoder is processing multiple codewords per frame, then the same puncture pattern holds for all codewords.
The default value of M is
that is, the smallest integer greater than or equal to log2(N+1).
You can change the value of M from the default
by specifying the primitive polynomial for GF(2M),
as described in Specify the Primitive Polynomial.
You can also specify the generator polynomial for the Reed-Solomon code, as described in Specify the Generator Polynomial.
The second output is a vector of the number of errors detected
during decoding of the codeword. A –1 indicates that the block
detected more errors than it can correct using the coding scheme.
An (N,K) Reed-Solomon code can
correct up to
floor((N-K)/2) symbol errors (not
bit errors) in each codeword.
To disable the second output, remove its port from the block by clearing the Output port for number of corrected errors check box.
This block supports puncturing when you select the Punctured
code parameter. This selection enables the Puncture
vector parameter, which takes in a binary vector to specify
the puncturing pattern. For a puncture vector,
that the data symbol passes unaltered, and
that the data symbol gets punctured, or removed, from the data stream.
This convention is carried for both the encoder and the decoder. For
more information, see Shortening, Puncturing, and Erasures.
The codeword length. The input has vector length NC*M*(N – NP), where NC is the number of codewords output, and NP is the number of punctures per codeword.
The message length. The first output has vector length NM*M*K, where NM is the number of messages per frame being output.
Selecting this check box enables the Shortened message length S text box.
The shortened message length. When you specify this parameter, provide full-length N and K values to specify the (N, K) code that is shortened to an (N–K+S, S) code.
Selecting this check box enables the Generator polynomial text box.
Integer row vector, whose values are in the range from 0 to 2M–1, representing the generator polynomial in descending order of powers. Each coefficient is an element of the Galois field defined by the primitive polynomial.
This parameter applies only when you select Specify generator polynomial.
Selecting this check box enables the Primitive polynomial text box.
Binary row vector representing the primitive polynomial in descending order of powers.
This parameter applies only when you select Specify primitive polynomial.
Selecting this check box enables the Puncture vector text box.
A column vector of length N-K.
For a puncture vector,
1 represents an M-bit
symbol that passes unaltered, and
an M-bit symbol that gets punctured, or removed,
from the data stream.
The default value is
This parameter applies only when you select Punctured code.
Selecting this check box opens the erasures port,
Through the port, you can input a binary column vector that is 1/M times as long as the codeword input.
Erasure values of
1 correspond to erased
symbols in the same position in the bit-packed codeword. Values of
to nonerased symbols.
When you select this check box, the block outputs the number of corrected errors in each word through a second output port. When a received word in the input contains more than (N-K)/2 symbol errors, a decoding failure occurs. The value –1 indicates the corresponding position in the second output vector.
Output type of the block, specified as
Same as input,
double. The default is
Same as input.
|Port||Supported Data Types|
This block uses the Berlekamp-Massey decoding algorithm. For information about this algorithm, see Algorithms for BCH and RS Errors-only Decoding.
 Wicker, Stephen B., Error Control Systems for Digital Communication and Storage, Upper Saddle River, N.J., Prentice Hall, 1995.
 Berlekamp, Elwyn R., Algebraic Coding Theory, New York, McGraw-Hill, 1968.
 Clark, George C., Jr., and J. Bibb Cain, Error-Correction Coding for Digital Communications, New York, Plenum Press, 1981.