G
gnuarm.del...@gmail.com
Guest
I had a newbie working on a bit wise CRC32 implementation and he could not get the results of any of the many online CRC32 generators available. So I coded up the same algorithm and tried it myself with similar results.
I tried digging around and found little that I could use to either evaluate an algorithm or to generate comparison data other than the final result. What I needed was something that could produce a result for each input bit. Most of the reference designs are for sequential languages which are byte oriented. Even if you present them with a single bit they treat it as a byte and perform the logic at a byte level. Heck, some of the calculators don\'t even allow hex data input, treating everything as an ascii character.
Finally I found this link...
https://leventozturk.com/engineering/crc/
Not very easy to use, much of the controls and labeling is rather cryptic. Eventually by stumbling around I found it I didn\'t touch anything on the controls other than selecting CRC32 and inputting the data as binary, lsb first I could get an output that agreed with my result before the final bit inversion used in CRC32.
Wow! If I knew more about web page design maybe I would build a page that makes this a bit easier.
The standard example code is C, written to calculate a result one bit at a time. However it won\'t work on less than a byte of data. In fact, it isn\'t good for comparing to a true bitwise implementation because before the loop where they calculate the result bitwise, the input byte is xor\'ed with the CRC register all at once mucking the data for comparison purposes.
Anyone else have similar problems?
BTW, with the standard bit order CRC32, polynomial 0x04C11DB7, the inverted output of an input \"ABCD1234\" (lsb first) would be 16#E928FF7E. Anyone care to confirm that?
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
I tried digging around and found little that I could use to either evaluate an algorithm or to generate comparison data other than the final result. What I needed was something that could produce a result for each input bit. Most of the reference designs are for sequential languages which are byte oriented. Even if you present them with a single bit they treat it as a byte and perform the logic at a byte level. Heck, some of the calculators don\'t even allow hex data input, treating everything as an ascii character.
Finally I found this link...
https://leventozturk.com/engineering/crc/
Not very easy to use, much of the controls and labeling is rather cryptic. Eventually by stumbling around I found it I didn\'t touch anything on the controls other than selecting CRC32 and inputting the data as binary, lsb first I could get an output that agreed with my result before the final bit inversion used in CRC32.
Wow! If I knew more about web page design maybe I would build a page that makes this a bit easier.
The standard example code is C, written to calculate a result one bit at a time. However it won\'t work on less than a byte of data. In fact, it isn\'t good for comparing to a true bitwise implementation because before the loop where they calculate the result bitwise, the input byte is xor\'ed with the CRC register all at once mucking the data for comparison purposes.
Anyone else have similar problems?
BTW, with the standard bit order CRC32, polynomial 0x04C11DB7, the inverted output of an input \"ABCD1234\" (lsb first) would be 16#E928FF7E. Anyone care to confirm that?
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209