CRC Append

From GNU Radio
Revision as of 14:11, 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 Append block receives a PDU, calculates the CRC of the PDU data, appends it to the PDU, and sends that as its output. 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 Append 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.
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