gem5 v24.0.0.0
|
The compressed data is composed of multiple pattern entries. More...
#include <dictionary_compressor.hh>
Public Member Functions | |
Pattern (const int number, const uint64_t code, const uint64_t metadata_length, const uint64_t num_unmatched_bits, const int match_location, const bool allocate=true) | |
Default constructor. | |
virtual | ~Pattern ()=default |
Default destructor. | |
int | getPatternNumber () const |
Get enum number associated to this pattern. | |
uint8_t | getCode () const |
Get code of this pattern. | |
uint8_t | getMatchLocation () const |
Get the index of the dictionary match location. | |
virtual std::size_t | getSizeBits () const |
Get size, in bits, of the pattern (excluding prefix). | |
bool | shouldAllocate () const |
Determine if pattern allocates a dictionary entry. | |
std::string | print () const |
Extract pattern's information to a string. | |
virtual DictionaryEntry | decompress (const DictionaryEntry dict_bytes) const =0 |
Decompress the pattern. | |
Protected Attributes | |
const int | patternNumber |
Pattern enum number. | |
const uint8_t | code |
Code associated to the pattern. | |
const uint8_t | length |
Length, in bits, of the code and match location. | |
const uint8_t | numUnmatchedBits |
Number of unmatched bits. | |
const int | matchLocation |
Index representing the the match location. | |
const bool | allocate |
Wether the pattern allocates a dictionary entry or not. | |
The compressed data is composed of multiple pattern entries.
To add a new pattern one should inherit from this class and implement isPattern() and decompress(). Then the new pattern must be added to the PatternFactory declaration in crescent order of size (in the DictionaryCompressor class).
Definition at line 285 of file dictionary_compressor.hh.
|
inline |
Default constructor.
number | Pattern number. |
code | Code associated to this pattern. |
metadata_length | Length, in bits, of the code and match location. |
num_unmatched_bits | Number of unmatched bits. |
match_location | Index of the match location. |
Definition at line 316 of file dictionary_compressor.hh.
|
virtualdefault |
Default destructor.
|
pure virtual |
Decompress the pattern.
Each pattern has its own way of interpreting its data.
dict_bytes | The bytes in the corresponding matching entry. |
Implemented in gem5::compression::DictionaryCompressor< T >::DeltaPattern< DeltaSizeBits >, gem5::compression::DictionaryCompressor< T >::MaskedPattern< mask >, gem5::compression::DictionaryCompressor< T >::MaskedValuePattern< value, mask >, gem5::compression::DictionaryCompressor< T >::MaskedValuePattern< 0, 0xFFFFFFFFFFFFFFFF >, gem5::compression::DictionaryCompressor< T >::RepeatedValuePattern< RepT >, gem5::compression::DictionaryCompressor< T >::SignExtendedPattern< N >, and gem5::compression::DictionaryCompressor< T >::UncompressedPattern.
Referenced by gem5::compression::DictionaryCompressor< T >::decompressValue().
|
inline |
|
inline |
Get the index of the dictionary match location.
Definition at line 347 of file dictionary_compressor.hh.
Referenced by gem5::compression::DictionaryCompressor< T >::decompressValue().
|
inline |
Get enum number associated to this pattern.
Definition at line 333 of file dictionary_compressor.hh.
|
inlinevirtual |
Get size, in bits, of the pattern (excluding prefix).
Corresponds to unmatched_data_size + code_length.
Definition at line 356 of file dictionary_compressor.hh.
|
inline |
Extract pattern's information to a string.
Definition at line 374 of file dictionary_compressor.hh.
References gem5::csprintf().
|
inline |
Determine if pattern allocates a dictionary entry.
Definition at line 366 of file dictionary_compressor.hh.
Referenced by gem5::compression::DictionaryCompressor< T >::decompressValue().
|
protected |
Wether the pattern allocates a dictionary entry or not.
Definition at line 304 of file dictionary_compressor.hh.
|
protected |
Code associated to the pattern.
Definition at line 292 of file dictionary_compressor.hh.
|
protected |
Length, in bits, of the code and match location.
Definition at line 295 of file dictionary_compressor.hh.
|
protected |
Index representing the the match location.
Definition at line 301 of file dictionary_compressor.hh.
|
protected |
Number of unmatched bits.
Definition at line 298 of file dictionary_compressor.hh.
|
protected |
Pattern enum number.
Definition at line 289 of file dictionary_compressor.hh.