AVR C Runtime Library - Patches: patch #10101, util/crc16.h: improved...
You are not allowed to post comments on this tracker with your current authentication level.
patch #10101: util/crc16.h: improved _crc_xmodem_update (smaller & faster)
Submitter: | Benoit Steinmetz <sten> | ||
Submitted: | Sun 29 Aug 2021 09:20:55 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Attached Files
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2021-08-29 | sten | Attached File | - | ![]() |
Added patch_crc_xmodem_update.txt, #51830 |
Attached File | - | ![]() |
Added main.c, #51831 | ||
Attached File | - | ![]() |
Added orig_crc.c, #51832 | ||
Attached File | - | ![]() |
Added run_test.sh, #51833 |
The attached patch improves the _crc_xmodem_update algorithm. The improved algorithm uses 14 instructions instead of the original 25. Additionally the temporary variables have less strict constraints (=r instead of =d), and r0 is not clobbered.
I have successfully tested the new algorithm with all possible inputs (65536 * 256) against the original algorithm. The test was run in simulavr. See attached files main.c, orig_crc.c and run_test.sh