Communications Blockset    
Binary-Output RS Decoder

Decode a Reed-Solomon code to recover binary vector data

Library

Block sublibrary of Channel Coding

Description

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 should match those in the corresponding Binary-Input RS Encoder block.

The Reed-Solomon code has message length K and codeword length N. You specify both N and K directly in the block mask. 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 the section Restrictions on the M and the Codeword Length N. The difference N-K must be an even integer.

The input and output are binary-valued signals that represent messages and codewords, respectively. The input must be a frame-based column vector whose length is an integer multiple of M*K. The output is a frame-based column vector whose length is the same integer multiple of M*N. For more information on representing data for Reed-Solomon codes, see the section Integer Format (Reed-Solomon only)."

The default value of M is the smallest integer that is greater than or equal to log2(N+1), that is ceil(log2(N+1)). You can change the value of M from the default by specifying the primitive polynomial for GF(2M), as described in the section Specifying the Primitive Polynomial below. If N is less than 2M-1, the block uses a shortened Reed-Solomon code.

You can also specify the generator polynomial for the Reed-Solomon code, as described in the section Specifying the Generator Polynomial.

Each M*K input bits represent K integers between 0 and 2M-1. Similarly, each M*N output bits represent N integers between 0 and 2M-1. These integers in turn represent elements of the Galois field GF(2M).

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 could 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.

You can disable the second output by clearing the box next to Output port for number of corrected errors. This removes the block's second output port.

Dialog Box

Codeword length N
The codeword length. The input has vector length M*N.
Message length K
The message length. The first output has vector length M*K.
Specify primitive polynomial
When you select this box, you can specify the primitive polynomial as a binary row vector.
Primitive polynomial
Binary row vector representing the primitive polynomial in descending order of powers.
Specify generator polynomial
When you select this box, you can specify the generator polynomial as an integer row vector.
Generator polynomial
Integer row vector, whose entries are in the range from 0 to 2M-1, representing the generator polynomial in descending order of powers.
Output port for number of corrected errors
When you select this box, the block outputs the number of corrected errors in each word through a second output port.

Pair Block

Binary-Input RS Encoder

See Also

Integer-Output RS Decoder


  Binary Linear Encoder Binary Symmetric Channel