Integrating The Crc Blocks For Tx; Integrating The Crc Blocks For Rx - Xilinx Virtex-5 RocketIO GTP User Manual

Table of Contents

Advertisement

R

Integrating the CRC Blocks for TX

To use a CRC32 or CRC64 primitive to add CRC to frames for transmission or storage, the
following logic needs to be built in the FPGA and connected to the CRC block:

Integrating the CRC Blocks for RX

To use a CRC32 or CRC64 primitive to check the CRC on incoming data, the following
logic needs to be built in the FPGA and connected to the CRC block:
Virtex-5 RocketIO GTP Transceiver User Guide
UG196 (v1.3) May 25, 2007
The Start of Frame (SOF) must trigger CRCRESET.
If the datapath is not as wide as the maximum data width of the CRC primitive,
CRCDATAWIDTH must be tied off so that only the bytes in the datapath are valid.
The CRC output from the CRC block must be added to the frame, usually after the last
data byte and before an End of Frame (EOF) character.
The SOF must trigger CRCRESET. This usually requires some sort of decoder to find
the SOF character in the incoming datastream.
The EOF must trigger a CRC check.
If fixed length frames are used, this can be done with a counter.
If variable length frames are used, this typically requires setting a count based on
a length value in the frame, or decoding an End of Frame character in the
incoming datastream.
The CRC check must be performed. There are two common methods of CRC
checking:
The compare method
Calculate CRC over all the data in the frame, then extract the CRC from the frame
and compare it to the calculated CRC. The EOF trigger is used to indicate which
CRCOUT value should be used and which bytes of the frame contain the
transmitted CRC.
The residue method
Calculate CRC over all the data in the frame and the transmitted CRC, and then
compare the result to the residue for the CRC32 polynomial. If the two values
match, the CRC check passes. The residue value for CRC32, after bit inversion and
byte reversal, is 32'h1CDF4421.
Remove the transmitted CRC from the frame, if necessary.
www.xilinx.com
Description
193

Advertisement

Table of Contents
loading

Table of Contents