Louie NRT Story

[Algorithm] Cyclic Redundancy Check(CRC) 본문

코딩테스트

[Algorithm] Cyclic Redundancy Check(CRC)

hyeok0724.kim@gmail.com 2019. 11. 7. 23:05
반응형

1. Description

 - The CRC algorithm can be chosen from a fast but space-consuming implementation to slower but smaller versions especially suitable for embedded applications.

 

CRC-16

Width 16
Poly 0x8005
Reflect In True
XOR In 0x0000
Reflect Out True
XOR Out 0x0000
Short command pycrc.py --model crc-16
Extended command pycrc.py --width 16 --poly 0x8005 --reflect-in True --xor-in 0x0000 --reflect-out True --xor-out 0x0000
Check 0xbb3d

 

CRC-16-usb

Width 16
Poly 0x8005
Reflect In True
XOR In 0xffff
Reflect Out True
XOR Out 0xffff
Short command pycrc.py --model crc-16-usb
Extended command pycrc.py --width 16 --poly 0x8005 --reflect-in True --xor-in 0xffff --reflect-out True --xor-out 0xffff
Check 0xb4c8

 

CRC-16-modbus

Width 16
Poly 0x8005
Reflect In True
XOR In 0xffff
Reflect Out True
XOR Out 0x0000
Short command pycrc.py --model crc-16-modbus
Extended command pycrc.py --width 16 --poly 0x8005 --reflect-in True --xor-in 0xffff --reflect-out True --xor-out 0x0000
Check 0x4b37

 

CRC-16-genibus

Width 16
Poly 0x1021
Reflect In False
XOR In 0xffff
Reflect Out False
XOR Out 0xffff
Short command pycrc.py --model crc-16-genibus
Extended command pycrc.py --width 16 --poly 0x1021 --reflect-in False --xor-in 0xffff --reflect-out False --xor-out 0xffff
Check 0xd64e

 

CRC-16-ccitt

Width 16
Poly 0x1021
Reflect In False
XOR In 0x1d0f
Reflect Out False
XOR Out 0x0000
Short command pycrc.py --model crc-16-ccitt
Extended command pycrc.py --width 16 --poly 0x1021 --reflect-in False --xor-in 0x1d0f --reflect-out False --xor-out 0x0000
Check 0xe5cc

 

r-CRC-16

Width 16
Poly 0x0589
Reflect In False
XOR In 0x0000
Reflect Out False
XOR Out 0x0001
Short command pycrc.py --model r-crc-16
Extended command pycrc.py --width 16 --poly 0x0589 --reflect-in False --xor-in 0x0000 --reflect-out False --xor-out 0x0001
Check 0x007e

 

 

 

Reference: 

 - https://pycrc.org/index.html

 

pycrc, a free CRC source code generator

pycrc Pycrc is a free Cyclic Redundancy Check (CRC) C source code generator written in Python. The CRC algorithm can be chosen from a fast but space-consuming implementation to slower but smaller versions especially suitable for embedded applications. The

pycrc.org

 - http://reveng.sourceforge.net/crc-catalogue/

 

Catalogue of parametrised CRC algorithms

As of 21 November 2018, the names of all algorithms in this Catalogue have been standardized to the form CRC-width/label. Some existing labels have been revised to identify a more specific or original source of the algorithm. The algorithms' previous names

reveng.sourceforge.net

 

반응형
Comments