主要内容

Cyclic Redundancy Check Codes

Cyclic redundancy check (CRC) coding is an error-control coding technique for detecting errors that occur when transmitting a data frame. Unlike block or convolutional codes, CRC codes do not have a built-in error-correction capability. Instead, when a communications system detects a CRC coding error in a received codeword, the receiver requests the sender to retransmit the codeword.

In CRC coding, the transmitter applies a rule to each data frame to create extra CRC bits, called the checksum or syndrome, and then appends the checksum to the data frame. After receiving a transmitted codeword, the receiver applies the same rule to the received codeword. if the resulting checksum is nonzero, an error has occurred and the transmitter should resend the data frame.

Communications Toolbox™ supports CRC Coding using functions, objects, and blocks. You can perform error control by using the indirect or direct CRC algorithm. For more information, see the feature reference pages for algorithm descriptions.

Feature TypeUsage

Functions: crcConfig, crcGenerate, and crcDetect

  • Create a configuration object by using the crcConfig function.

  • To generate CRC code bits and append them to input data, call the crcGenerate function specifying an input message and the CRC configuration object.

  • To detect errors in input data using CRC code bits, call the crcDetect function specifying an codeword and the CRC configuration object.

Blocks: General CRC Generator and General CRC Syndrome Detector

  • Create a model that includes generator and detector blocks with matching configurations.

HDL Blocks: General CRC Generator HDL Optimized and General CRC Syndrome Detector HDL Optimized

  • Create a model that includes generator and detector blocks with matching configurations.

HDL System objects: comm.HDLCRCGenerator and comm.HDLCRCDetector

  • Create a model that includes generator and detector objects with matching configurations.

Note

HDL blocks and System objects follow fixed point design practices.

Selected Bibliography for CRC Coding

[1] Sklar, Bernard, and Fred Harris. Digital Communications: Fundamentals and Applications. Third edition, Pearson, 2021.

[2] Wicker, Stephen B. Error Control Systems for Digital Communication and Storage. Upper Saddle River, NJ: Prentice Hall, 1995.

See Also

Topics