CRC Append: Difference between revisions
Jump to navigation
Jump to search
(Add block documentation for CRC Add (the documentation is still not finished, but already useful)) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Block Docs]] | [[Category:Block Docs]] | ||
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 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. | ||
Line 6: | Line 5: | ||
The block uses the same notation as [http://www.sunshine2k.de/coding/javascript/crc/crc_js.html 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. | The block uses the same notation as [http://www.sunshine2k.de/coding/javascript/crc/crc_js.html 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. | ||
<code>Added in 3.10.2.0</code> | |||
== Parameters == | == Parameters == | ||
Line 36: | Line 35: | ||
== Example Flowgraph == | == Example Flowgraph == | ||
[[File:Pkt_13_fg.png|799px]] | |||
== Source Files == | == Source Files == |
Latest revision as of 14:11, 1 March 2023
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
Source Files
- C++ files
- [1]
- Header files
- [2]
- Public header files
- [3]
- Block definition
- GRC yaml