Most fast CRC routines use a fixed lookup table with 256 entries. Since the entries are fixed they usually go into ROM, not RAM. For 32 bits, each entry would be 4 bytes, so you would need 1024 bytes of ROM.
Thad
Most fast CRC routines use a fixed lookup table with 256 entries. Since the entries are fixed they usually go into ROM, not RAM. For 32 bits, each entry would be 4 bytes, so you would need 1024 bytes of ROM.
Thad
Note that it isn't a 256 _byte_ table: it is a 256 _entry_ table. The size of the CRC determines the size of the entry. The word size of the host processor usually has nothing to do with it (unless it imposes restrictions on the size of entries in an indexed table).
For a 32-bit CRC, each table entry is 32 bits, hence you need 256 "words" on a 32-bit processor (1024 bytes).
The original poster was talking about a 16-bit CRC. In this case, the
256 entries would each be 16 bits, and therefore occupy 512 bytes of ROM.-- David Empson dempson@actrix.gen.nz
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.