namespace details

// typedefs

typedef ap_uint <BITS_PER_LOOP> Digit

// enums

enum blockStatus
enum xfBlockType_t
enum xfLitBlockType_t
enum xfSymbolCompMode_t

// structs

struct FseBSState
struct HuffmanTable

// global variables

static const uint8_t RADIX
static const uint8_t BITS_PER_LOOP
static const ap_uint <c_tgnSymbolBits> INTERNAL_NODE
const ap_uint <32> c_magicNumber
const uint32_t c_skipFrameMagicNumber
const uint32_t c_skippableFrameMask
const uint8_t c_maxZstdHfBits
const uint16_t c_maxCharLit
const uint16_t c_maxCharDefOffset
const uint16_t c_maxCharOffset
const uint16_t c_maxCharMatchlen
const uint16_t c_maxCharHuffman
const uint16_t c_maxLitV
const uint8_t c_maxCodeLL
const uint8_t c_maxCodeML
const uint8_t c_maxCodeOF
const uint8_t c_fseMaxTableLogHF
const uint8_t c_fseMaxTableLogLL
const uint8_t c_fseMaxTableLogML
const uint8_t c_fseMaxTableLogOF
const uint8_t c_fseMinTableLog
const uint8_t c_fseMaxTableLog
const uint32_t c_baseLL[c_maxCharLit+1]
const uint32_t c_baseML[c_maxCharMatchlen+1]
const uint8_t c_extraBitsLL[c_maxCharLit+1]
const uint8_t c_extraBitsML[c_maxCharMatchlen+1]
const int16_t c_defaultDistribution[c_maxCharLit+c_maxCharDefOffset+c_maxCharMatchlen+3]
const uint8_t c_litlenCode[64]
const uint8_t c_matlenCode[128]
const uint32_t c_bitMask[32]
const uint32_t c_litlenDeltaCode
const uint32_t c_matlenDeltaCode
const uint32_t c_rtbTable[8]
uint16_t c_testSeqData[70][3]
const char c_testLitData[462]
const uint8_t c_hfCodeTable[122]
const uint8_t c_hfBitlenTable[122]
const int16_t c_litNormTable[64]
const int16_t c_llNormTable[64]
const int16_t c_mlNormTable[64]
const int16_t c_ofNormTable[64]

crc32

#include "checksum_wrapper.hpp"
template <int W>
void crc32 (
    hls::stream <ap_uint <32>>& crcInitStrm,
    hls::stream <ap_uint <8*W>>& inStrm,
    hls::stream <ap_uint <5>>& inPackLenStrm,
    hls::stream <bool>& endInPackLenStrm,
    hls::stream <ap_uint <32>>& outStrm,
    hls::stream <bool>& endOutStrm
    )

crc32 computes the CRC32 check value of an input data.

Parameters:

W byte number of input data, the value of W includes 1, 2, 4, 8, 16.
crcInitStrm initialize crc32 value
inStrm input messages to be checked
inPackLenStrm effetive lengths of input message pack, 1~W. 0 means end of message
endInPackLenStrm end flag of inPackLenStrm, 1 “false” for 1 message, 1 “true” means no message anymore.
outStrm crc32 result to output
endOutStrm end flag of outStrm

huffmanProcessingUnit

#include "huffman_encoder.hpp"
void huffmanProcessingUnit (
    hls::stream <ap_uint <9>>& inStream,
    hls::stream <ap_uint <32>>& outStream,
    hls::stream <uint32_t>& inputSizeStream
    )

This module does updates lz77 byte data to 32bit data.

Parameters:

inStream input packet of 8bit contains either literal or marker or match length or distance information.
outStream output 32bit compressed data
inputSizeStream input size of each block

huffmanProcessingUnitStatic

#include "huffman_encoder.hpp"
void huffmanProcessingUnitStatic (
    hls::stream <ap_uint <9>>& inStream,
    hls::stream <ap_uint <32>>& outStream,
    hls::stream <bool>& inEos,
    hls::stream <bool>& endOfBlock
    )

This module does updates lz77 byte data to 32bit data.

Parameters:

inStream input packet of 8bit contains either literal or marker or match length or distance information.
outStream output 32bit compressed data
inputSizeStream input size of each block

huffmanProcessingUnit

#include "huffman_encoder.hpp"
void huffmanProcessingUnit (
    hls::stream <IntVectorStream_dt <9, 1>>& inStream,
    hls::stream <IntVectorStream_dt <32, 1>>& outStream
    )

This module does updates lz77 byte data to 32bit data.

Parameters:

inStream input packet of 8bit contains either literal or marker or match length or distance information.
outStream output 32bit compressed data