Re: Searching Fast CRC

I'm using now a 32bits checlsum to test the ROM of my micro-controller

> (MB90F562, from Fujitsu). This test is enought to be TUV class 3 > compliant, but for the next level, the TUV ask me to implement a CRC. > I've coded the CRC 16 bits used in the "MODBUS" protocol. This one give > me satisfaction on an Hitachi 2134, but is to slow on the MB90F562 (due to > the FAR pointer needed, for me). So I try to find a more fast CRC (8 or > 16 bits) which don't use a lot of RAM. The ones i've find on google use a > lot (256 or more) of RAM. I've not this RAM...

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

Reply to
Thad Smith
Loading thread data ...

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
Reply to
David Empson

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.