I’m developing a software utility to transfer some data to a pci-e board. To avoid the data transfer fault, I’ve add a CRC field in every packet, so that the pci-e board can verify the received data with the CRC value.
Then we found out that the CRC value failed to pass the verification.
I’m using the boost::crc_32_type to generate the CRC value while the hardware guy told me that the CRC implementation in the board is from http://www.easics.com/webtools/crctool and they’re using the 64 data bus width version of CRC32 – ETHERNET / AAL5.
So, is it possible to use boost::crc_32_type to work with the one they’re using?
Any suggestions will be greatly appreciated!
[edit 2013.02.20]
- the working crc template shall have the following definition:
boost::crc_optimal<32, 0x04C11DB7, 0xFFFFFFFF, 0x0, false, false> - the order of every 8 bytes shall be reversed before being processed
- std::for_each is used instead of process_bytes to get the result, I still don’t quite understand the difference between them though.
You can use
crc_32_type– first you have to make sure your bytes are going in the same order as the bytes the hardware guys are. The convention used by the EASICS code is that the first byte in the stream goes into Data[63:56].