Struct dp_crc_t¶
A CRC model: width, polynomial, initial register, output reflection, output XOR and input reflection. More...
#include <dp_crc.h>
Public Attributes¶
| Type | Name |
|---|---|
| uint64_t | init |
| uint64_t | poly |
| int | refin |
| int | refout |
| unsigned | width |
| uint64_t | xorout |
Detailed Description¶
The polynomial is written in normal form, MSB-first, without the top term: CRC-32's x^32 + x^26 + ... + 1 is 0x04C11DB7, and CRC-8's x^8 + x^2 + x + 1 is 0x07.
Public Attributes Documentation¶
variable init¶
initial register, width bits
variable poly¶
generator polynomial, normal form, width bits
variable refin¶
non-zero: dp_crc_bytes() feeds each octet LSB-first; the catalogue's refin. dp_crc_bits() ignores it: its stream is already in bit order. Last, so a literal written before this field existed compiles as refin = 0: write models with designated initializers.
variable refout¶
non-zero: bit-reverse the register before xorout
variable width¶
register width in bits, 1..64
variable xorout¶
XORed into the (possibly reflected) register
The documentation for this class was generated from the following file native/inc/doppler/dp_crc.h