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