Package: comm
Decode data using a ReedSolomon decoder
The HDLoptimized HDLRSDecoder
System object™ recovers
a message vector from a ReedSolomon codeword vector. For proper decoding,
the property values for this object should match those in the corresponding HDLRSEncoder
System object.
To recover a message vector from a ReedSolomon codeword vector optimized for HDL code generation:
Define and set up your HDL RS decoder object. See Construction.
Call step
to recover a message
vector from a ReedSolomon codeword vector according to the properties
of comm.HDLRSDecoder
. The behavior of step
is
specific to each object in the toolbox.
Note:
Starting in R2016b, instead of using the 
Each input frame must contain more than (NK)*2
symbols,
and fewer than or equal to N
symbols. A shortened
code is inferred when the number of valid data samples between startIn
and endIn
is
less than N
. A shortened code still requires N
cycles
to perform the Chien search. If the input is less than N
symbols,
leave a guard interval of at least Nsize
inactive
cycles before starting the next frame.
The decoder can operate on up to 4 messages at a time. If the object receives the start of a fifth message before completely decoding the first message, the object drops data samples from the first message. To avoid this issue, increase the number of inactive cycles between input messages.
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.
H = comm.HDLRSDecoder
creates an HDLoptimized
RS decoder System object, H
, that performs
ReedSolomon (RS) decoding.
H = comm.HDLRSDecoder(Name,Value)
creates
an HDLoptimized RS decoder System object, H
,
with additional options specified by one or more Name,Value
pair
arguments, where Name is a property name and Value is the corresponding
value. Name must appear inside single quotes (''
).
You can specify several namevalue pair arguments in any order as Name1,Value1,...,NameN,ValueN
.
H = comm.HDLRSDecoder(N,K,Name,Value)
creates
an HDLoptimized RS decoder System object, H
,
with the CodewordLength
property set to N
,
the MessageLength
property set to K
,
and other specified property names set to the specified values.

B value for polynomial generation 

Source of B, the starting power for roots of the primitive polynomial Specify the source of the B value as one of these values:
Default: Auto 

Codeword length Specify the codeword length of the RS code as a doubleprecision,
positive, integer scalar value. The default is If you set the When you set the If the value of this property is less than 2^{M}–1, the object assumes a shortened RS code. 

Message length Specify the message length as a doubleprecision, positive integer
scalar value. The default is 

Enable number of errors output When you set this property to true, the step method outputs number of corrected errors. The number of corrected errors is not valid when errOut is asserted, since there were more errors than could be corrected. The default is false. 

Source of primitive polynomial Specify the source of the primitive polynomial as When you set this property to When you set this property to 

Primitive polynomial Specify the primitive polynomial that defines the finite field This property applies when you set the 
clone  Create HDLRSDecoder System object with same property values 
isLocked  Locked status for input attributes and nontunable properties 
release  Allow property value and input characteristics change 
step  Perform ReedSolomon decoding 