Communications Blockset | ![]() ![]() |
Decode a Reed-Solomon code to recover integer vector data
Library
Block sublibrary of Channel Coding
Description
The Integer-Output RS Decoder block recovers a message vector from a Reed-Solomon codeword vector. For proper decoding, the parameter values in this block should match those in the corresponding Integer-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 integers between 0 and 2M-1, which represent elements of the finite field GF(2M). Restrictions on M and N are described in the section Restrictions on M and the Codeword Length N following. The difference N - K must be an even integer.
The input and output are integer-valued signals that represent messages and codewords, respectively. The input must be a frame-based column vector whose length is an integer multiple of K. The output is a frame-based column vector whose length is the same integer multiple of 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.
An (N, K) Reed-Solomon code can correct up to floor((N-K)/2)
symbol errors (not bit errors) in each codeword.
The second output is 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.
The sample times of the input and output signals are equal.
Dialog Box
Pair Block
See Also
![]() | Integer-Input RS Encoder | Integer to Bit Converter | ![]() |