SerialLite II IP Core User Guide

ID 683179
Date 7/13/2021
Public
Document Table of Contents

2.8.13. Data Integrity Protection: CRC

If you need error protection, you may add CRC checking to your packet.

The CRC is automatically generated in transmission and is automatically checked on reception. On the data port, a CRC check failure results in the packet being marked as bad using the rxrdp_err/rxhpp_err signal on the Atlantic interface. You decide independently for each port whether CRC usage is enabled.

The SerialLite II IP core supports both 16-bit and 32-bit CRC algorithms. You decide which CRC algorithm to use independently for each port.
  • The 16-bit algorithm generates a two-byte result, and uses the following polynomial equation:
    G(x) = X16 + X12 + X5 + 1
  • The 32-bit algorithm generates a four-byte result, and uses the following polynomial equation:
    G(x) = X32 + X26 + X23 + X22 + X16 + X12 + X11 + X10 + X8 + X7 + X5 + X4 + X2 + X + 1

The 16-bit version provides excellent protection for packets smaller than about 1 KBytes. For larger packets, CRC-32 can be considered, but it requires significantly more logic, especially in implementations requiring many lanes. At 16 lanes, CRC-32 logic may constitute as much as half of the logic of the entire SerialLite II instantiation. Therefore, CRC-32 should only be used when absolutely necessary.