gem5  v20.0.0.3
Functions
crc.hh File Reference
#include "base/bitfield.hh"

Go to the source code of this file.

Functions

template<uint32_t Poly>
uint32_t crc32 (const uint8_t *data, uint32_t crc, std::size_t size)
 Evaluate the CRC32 of the first size bytes of a data buffer, using a specific polynomium and an initial value. More...
 

Function Documentation

◆ crc32()

template<uint32_t Poly>
uint32_t crc32 ( const uint8_t *  data,
uint32_t  crc,
std::size_t  size 
)

Evaluate the CRC32 of the first size bytes of a data buffer, using a specific polynomium and an initial value.

The crc is accomplished by reversing the input, the initial value and the output (remainder).

Parameters
dataInput data buffer pointer
crcInitial value of the checksum
sizeNumber of bytes
Returns
32-bit remainder of the checksum

Definition at line 57 of file crc.hh.

References ArmISA::i, ArmISA::j, and reverseBits().


Generated on Fri Jul 3 2020 15:53:08 for gem5 by doxygen 1.8.13