comm.HDLRSDecoder
Decode message using Reed-Solomon decoder
Description
The HDL-optimized HDLRSDecoder
System object™ recovers a message vector from a Reed-Solomon (RS) codeword vector. For
proper decoding, the code and polynomial property values for this object must match
those values in the corresponding encoder.
To recover a message vector from a Reed-Solomon codeword vector:
Create the
comm.HDLRSDecoder
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Troubleshooting
Each input frame must contain more than
(N-K)*2
symbols and fewer than or exactlyN
symbols. The object infers a shortened code when the number of valid data samples betweenstartIn
andendIn
is less thanN
. A shortened code still requiresN
cycles to perform the Chien search. If the input message is less thanN
symbols, leave a guard interval of at leastN - size
inactive cycles before starting the next frame, wheresize
is the message length.The decoder can operate on up to four 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 codeword 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.
Creation
Syntax
Description
creates an
HDL-optimized RS decoder System object, RSDec
= comm.HDLRSDecoderRSDec
, that performs Reed-Solomon
decoding.
sets properties using one or more name-value pairs. Enclose each property name
in single quotes. For example,
RSDec
= comm.HDLRSDecoder(Name,Value)
comm.HDLRSDecoder('BSource','Property','B',2)
sets the RSDec
= comm.HDLRSDecoder(N,K,Name,Value)CodewordLength
property to N
,
the MessageLength
property to K
, and
other specified property names to the specified values.
Properties
Usage
Syntax
Description
[
decodes the input data, and also returns the number of errors detected and
corrected. To use this syntax, set the Y
,startOut
,endOut
,validOut
,errOut
,numErrors
] = RSDec(X
,startIn
,endIn
,validIn
)NumErrorsOutputPort
property to true
. If errOut
is
1
(true
), then the object detected
uncorrectable errors in the output frame, and numErrors
is
invalid.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Extended Capabilities
Version History
Introduced in R2012b