CRC Check

From GNU Radio
Revision as of 14:12, 1 March 2023 by Duggabe (talk | contribs) (→‎Example Flowgraph)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


The CRC Check block receives a PDU containing a CRC at its end, and checks whether the CRC is correct. The PDU is sent over the ok or fail output ports according to the result of this check. It can support any CRC whose size is a multiple of 8 bits between 8 and 64 bits.

The block uses the same notation as this online CRC calculator to define the CRC code parameters. The calculator includes a list of commonly used CRC codes, so it is a useful resource to find the parameters that are needed for this block. The default parameters of CRC Check correspond to the CRC-32 code.

Added in 3.10.2.0

Parameters

CRC size (bits)
The size of the CRC in bits. It must be a multiple of 8 bits between 8 and 64.
CRC polynomial
The CRC polynomial.
Initial register value
The initial value to load into the CRC register.
Final XOR value
The value that is XORed with the CRC immediately before producing the final result.
LSB-first input
A boolean that indicates if the input bytes should be processed least-significant bit first or not.
LSB-first result
A boolean that indicates if the output should be treated LSB-first, thus inverting the order of all the bits in the output.
LSB CRC in PDU
A boolean that indicates if the CRC field to be appended to the PDU should be least-significant-byte first.
Discard CRC
A boolean that selects whether the CRC should be removed from the output PDU.
Header bytes to skip
Indicates the number of bytes at the beginning of the input PDU to consider as header. These header bytes are not used for the calculation of the CRC, but are included in the output PDU.

Example Flowgraph

Pkt 13 fg.png

Source Files

C++ files
[1]
Header files
[2]
Public header files
[3]
Block definition
GRC yaml