[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #45067] inconsistency & errors in crc.h documentatio
From: |
Joerg Wunsch |
Subject: |
[avr-libc-dev] [bug #45067] inconsistency & errors in crc.h documentation |
Date: |
Sun, 10 May 2015 18:22:54 +0000 |
User-agent: |
Mozilla/5.0 (X11; FreeBSD amd64; rv:36.0) Gecko/20100101 Firefox/36.0 |
Follow-up Comment #1, bug #45067 (project avr-libc):
Unfortunately, the bit order of the CRC polynomial appears to
be one of the things where there is never consensus about. :(
Just because you cite pycrc as one source, you'll as well be
able to find numerous other sources quoting the opposite.
In your case of the Xmodem CRC, the official protocol
documentation[1] declares the polynomial the same way our
documentation does:
7.1 CRC Calculation
7.1.1 Formal_Definition
To calculate the 16 bit CRC the message bits are considered to be the
coefficients of a polynomial. This message polynomial is first
multiplied
by X^16 and then divided by the generator polynomial (X^16 + X^12 + X^5
+
1) using modulo two arithmetic.
[1]http://techheap.packetizer.com/communication/modems/xmodem-ymodem_reference.html
In essence, the difference between Xmodem and CCITT is only
the bit order of the polynomial, since in both cases, the
official doucumentation declares the polynomial being
x^16 + x^12 + x^5 + 1, but in Xmodem, that translates into
a hex value of 0x1021, while in CCITT, it translates into
0x8048.
Yes, I wish all these people would have agreed to a common
definition. :) The only useful option I see is that we
could explain these ambiguities in deeper detail in the
introduction to make people aware of it.
Opinions?
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?45067>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/