Detect errors in input data using CRC
This HDL-optimized cyclic redundancy code (CRC) detector System
object™ computes a checksum on the input data and compares the result against the input
checksum. Instead of frame processing, the HDLCRCDetector
System
object processes streaming data. The object has frame synchronization control signals
for both input and output data streams.
To compute and compare checksums:
Create the comm.HDLCRCDetector
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? (MATLAB).
creates an
HDL-optimized CRC detector System
object, CRCDet
= comm.HDLCRCDetectorCRCDet
, that detects errors in the input data
according to a specified generator polynomial.
sets
properties using one or more name-value pairs. Enclose each property name in single
quotes. For example,
CRCDet
= comm.HDLCRCDetector(Name,Value
)
CRCDet = comm.HDLCRCDetector('Polynomial',[1 0 0 0 1 0 0 0 0], ... 'FinalXORValue',[1 1 0 0 0 0 0 0]);
creates an HDL-optimized CRC detector System
object, CRCDet
= comm.HDLCRCDetector(poly
,Name,Value
)CRCDet
, with the Polynomial
property set to poly
, and the other specified
property names set to the specified values.
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)