Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20713 Discussions

16-bit CRC Vs 32-bit CRC

Altera_Forum
Honored Contributor II
6,337 Views

Does anyone know the advantage of using a 16-bit CRC circuitry vs a 32-bit CRC circuitry?

0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
4,843 Views

Additional question: 

 

Where can we find this information; how long will the CRCERROR pin stays high after detecting an error?
0 Kudos
Altera_Forum
Honored Contributor II
4,843 Views

A 16bit CRC is able to detect a single bit error within 2^16 bit (8kBytes), while a 32bit CRC can detect a singlebit error within 2^32bits (500MBytes) 

 

Rene
0 Kudos
Altera_Forum
Honored Contributor II
4,843 Views

Does it mean that the 16-bit CRC is actually faster as the coverage area is smaller?

0 Kudos
Altera_Forum
Honored Contributor II
4,843 Views

That may well be. The CRC is basically a self feeded shift register of the named length. So yes, a CRC16 reaches a higher frequency than a 32bit shift register. On the other hand there are faster implementations than the shift register approach. This operates with tables. I've worked with a CRC16 that was using a 256byte table and operated on a word (16bit) at once. It was run on a PC as well as on a controller, years before FPGAs came out. So if speed is an issue, have a look at the table based CRC implementation. It is available for the CRC16 as well as for the CRC32.  

 

Rene
0 Kudos
Altera_Forum
Honored Contributor II
4,844 Views

If you don't have to protect more bits that a CRC16 can cover, you better stay with the CRC16 and add a few bits for a better protection. There are codes that can uncover multiple errors as well as forward error correction. 

 

Rene
0 Kudos
Altera_Forum
Honored Contributor II
4,844 Views

Guys it seams that you forgot one thing.  

The quality of the CRC depends on the size of th input. 

 

You can produce a CRC16 for a 32 bits word, 64 bits word and so on.... 

So it means that in some case the value of the CRC will be the same for 2 differents input values.... In this case, some errors might not be detected.  

 

I hope this help
0 Kudos
Altera_Forum
Honored Contributor II
4,844 Views

A CRC is calculated over all bytes of a block, it is a polynominal over all bits actually.

0 Kudos
Altera_Forum
Honored Contributor II
4,844 Views

And that's why I underline that the quality depends on the size of your bloc also and not only of the CRC result size

0 Kudos
Reply