This expression corresponds to the leftmost bit in the intermediate values in the long division (if '1' subtract the polynomial).Wait, why is it crc[4] ^ data ?
If (crc[4] ^ data) = '1' then apply the x^2 term from the polynomial when crc[1] is shifted into crc5_serial[2] ( invert crc[1] )What about crc5_serial[2] = crc[1] ^ crc[4] ^ data; ?
The condition for applying the polynomial is (crc[4] ^ data).but what I do not understand is why 'data' and 'crc[4]' appear only inside the logic for 'crc5_serial[0]' and 'crc5_serial[2] ' ?
The bits you see in the shift register of the "standard" serial CRC are not the intermediate results you see when you do the long divison.The condition for applying the polynomial is (crc[4] ^ data). ???
The drawback with the top one (Wikipedia) is that nothing happens for the first M=8 clock cycles, and you must append M zeros after the input message.
The bottom one is the "standard" serial CRC implementation which starts immediately and doesn't need appended input zeros.
No, only the top one needs appended input zeros, but it will need it also when it is converted to a parallel version.Wait, I am really confused about your reasoning/explanation about zero appending for BOTH picture screenshots of serial implementation ?
The top one is implemented exactly as the definition of the CRC (a "Long division"), which specifies that M zero bits must be appended to the input message before division by the polynomial.what I do not understand is why the top version needs to append input zeroes, and why the bottom version does not need to append input zeroes ?
The bottom one uses a smart optimization to give the same result without the appended zeros. It isn't obvious, but it basically always calculates the intermediate value in the shift register assuming that the following M bits are zero, and does a correction when the "real" input bit arrives. When the last "real" bit has been processed, it has the final result since it has assumed that the following M bits are zero.
The shift register will contain the remainder for the currently received input bits appended with M zeros, divided by the polynomial.assuming that the following M bits are zero ??
For M=8 and the input message 10101010, after processing the 3 first input bits the shift register will contain the remainder for 10100000000 divided by the polynomial.
After the last (8th) message bit, the shift register will contain the remainder for 1010101000000000 divided by the polynomial, which is the final result that we want, calculated in 8 clock cycles.
For the bottom one (the optimized) you don't need to shift in the M zeros after the message, but the value in the shift register is always the remainder of (the currently received input bits + M zeros) divided the polynomial.calculated in 8 clock cycles ??
For bottom version, shifting in 8 bits of the input message into the shift register already required 8 clock cylces ...
Why the value in the shift register is always the remainder of (the currently received input bits + M zeros) divided the polynomial. ?
the first bit comes in, the value becomes 0x07 which would represent x^2 + x + 1.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?