patchAVR 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

Sun 29 Aug 2021 09:20:55 PM UTC, original submission:  

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

Benoit Steinmetz <sten>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #51831:  main.c added by sten (1KiB - text/x-csrc)
file #51832:  orig_crc.c added by sten (116B - text/x-csrc)
file #51833:  run_test.sh added by sten (51B - application/x-sh)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sten (Submitted the item)
  •  

    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

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code