Lines Matching refs:CRC
1 A brief CRC tutorial.
3 A CRC is a long-division remainder. You add the CRC to the message,
4 and the whole thing (message+CRC) is a multiple of the given
5 CRC polynomial. To check the CRC, you can either check that the
6 CRC matches the recomputed value, *or* you can check that the
7 remainder computed on the message+CRC is 0. This latter approach
9 protocols put the end-of-frame flag after the CRC.
18 To produce a 32-bit CRC, the divisor is actually a 33-bit CRC polynomial.
20 CRC is written in hex with the most significant bit omitted. (If you're
23 Note that a CRC is computed over a string of *bits*, so you have
28 is sent last. And when appending a CRC word to a message, you should
38 When computing a CRC, we don't care about the quotient, so we can
43 A big-endian CRC written this way would be coded like:
55 Also, to add the CRC to a message, we need a 32-bit-long hole for it at
62 for the CRC can be skipped entirely. This changes the code to:
120 (The table entries are simply the CRC-32 of the given one-byte messages.)
130 See "High Octane CRC Generation with the Intel Slicing-by-8 Algorithm",
150 Each step, 32 bits of data is fetched, XORed with the CRC, and the result
153 final CRC is simply the XOR of the 4 table look-ups.
160 in parallel. Each step, the 32-bit CRC is shifted 64 bits and XORed
163 on the previous CRC at all. Thus, those 4 table look-ups may commence
169 Two more details about CRC implementation in the real world:
173 a basic CRC will not detect appended zero bits (or bytes). To enable
174 a CRC to detect this condition, it's common to invert the CRC before
176 as zero, but some fixed non-zero value. (The CRC of the inversion
180 similar solution is used. Instead of starting the CRC computation with