Encode data using a ReedSolomon encoder
Block sublibrary of Error Correction and Detection
ReedSolomon encoding follows the same standards as any other cyclic redundancy code. The IntegerInput RS Encoder HDL Optimized block can be used to model many communication system Forward Error Correcting (FEC) codes.
For more about the ReedSolomon encoder, see the IntegerInput RS Encoder block reference. For more information on representing data for ReedSolomon codes, see Integer Format (ReedSolomon Only).
The IntegerInput RS Encoder HDL Optimized block has four input ports and four output ports.
Port  Direction  Description  Data Type 

dataIn  Input  Message data, one symbol at a time. The
wordlength of each symbol must be
ceil(log_{2}(codewordLength+1)) .  Integer or fixdt with
any binary point scaling.
double is allowed for
simulation but not for HDL code
generation. 
startIn  Input  Indicates the start of a frame of data.  Boolean

endIn  Input  Indicates the end of a frame of data.  Boolean 
validIn  Input  Indicates that input data is valid.  Boolean

dataOut  Output  Message data with the checksum appended. The data width is the same as the input data port.  Same as dataIn 
startOut  Output  Indicates the start of a frame of data.  Boolean

endOut  Output  Indicates the end of a frame of data, including checksum.  Boolean

validOut  Output  Indicates that output data is valid.  Boolean

The length of the code word,
N
, must be equal to
2^{M}1
,
where M
is the input word
length. M
can be between 3 and
16 bits.
The message length, K
.
The number of parity symbols,
NK
, must be a positive even
integer, greater than or equal to the input word
length, M
.
Each input frame, i.e. the number of valid
data samples between start
and
end
, must contain more than
NK
symbols, and fewer than or
equal to K
symbols. A shortened
code is inferred anytime the number of input data
samples in a frame is less than
K
.
Select Property
to enable the Primitive
polynomial parameter.
Binary row vector representing the primitive
polynomial in descending order of powers. When you
provide a primitive polynomial, the number of
input bits, M
, must be an
integer multiple of K
times the
order of the primitive polynomial.
This parameter applies when only when
Property
is selected
for Primitive
polynomial.
Select Property
to enable the Puncture pattern
vector parameter.
A column vector of length
NK
. In a puncture vector,
1
represents that the data
symbol passes unaltered. The value
0
represents that the data
symbol is punctured, or removed from the data
stream.
The default value is [ones(2,1);
zeros(2,1)]
.
This field is available only when
Property
is selected
for Source of puncture
pattern.
Select Property
to enable the B value
parameter. When you select
Auto
, the block uses
B = 1
.
The starting exponent of the roots.
This field is available only when you select
Property
for
Source of B, the starting power for
roots of the primitive
polynomial.
The generator polynomial is not specified
explicitly. However, it is defined by the code
word length, the message length, and the B value
for the starting exponent of the roots. To get the
value of B from a generator polynomial, use the
genpoly2b
function. The default
value is 1.