gem5 v24.0.0.0
|
A pattern that compares masked values against dictionary entries. More...
#include <dictionary_compressor.hh>
Public Member Functions | |
MaskedPattern (const int number, const uint64_t code, const uint64_t metadata_length, const int match_location, const DictionaryEntry bytes, const bool allocate=true) | |
DictionaryEntry | decompress (const DictionaryEntry dict_bytes) const override |
Decompress the pattern. | |
Public Member Functions inherited from gem5::compression::DictionaryCompressor< T >::Pattern | |
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. | |
Static Public Member Functions | |
static bool | isPattern (const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) |
Private Attributes | |
const T | bits |
A copy of the bits that do not belong to the mask. | |
Additional Inherited Members | |
Protected Attributes inherited from gem5::compression::DictionaryCompressor< T >::Pattern | |
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. | |
A pattern that compares masked values against dictionary entries.
If the masked dictionary entry matches perfectly the masked value to be compressed, there is a pattern match.
For example, if the mask is 0xFF00 (that is, this pattern matches the MSB), the value (V) 0xFF20 is being compressed, and the dictionary contains the value (D) 0xFF03, this is a match (V & mask == 0xFF00 == D & mask), and 0x0020 is added to the list of unmatched bits.
mask | A mask containing the bits that must match. |
Definition at line 463 of file dictionary_compressor.hh.
|
inline |
Definition at line 474 of file dictionary_compressor.hh.
|
inlineoverridevirtual |
Decompress the pattern.
Each pattern has its own way of interpreting its data.
dict_bytes | The bytes in the corresponding matching entry. |
Implements gem5::compression::DictionaryCompressor< T >::Pattern.
Reimplemented in gem5::compression::DictionaryCompressor< T >::MaskedValuePattern< value, mask >, and gem5::compression::DictionaryCompressor< T >::MaskedValuePattern< 0, 0xFFFFFFFFFFFFFFFF >.
Definition at line 498 of file dictionary_compressor.hh.
References gem5::bits(), gem5::compression::DictionaryCompressor< T >::fromDictionaryEntry(), gem5::ArmISA::mask, and gem5::compression::DictionaryCompressor< T >::toDictionaryEntry().
Referenced by gem5::compression::DictionaryCompressor< T >::MaskedValuePattern< value, mask >::decompress().
|
inlinestatic |
Definition at line 487 of file dictionary_compressor.hh.
References gem5::compression::DictionaryCompressor< T >::fromDictionaryEntry(), and gem5::ArmISA::mask.
Referenced by gem5::compression::DictionaryCompressor< T >::LocatedMaskedPattern< mask, location >::isPattern().
|
private |
A copy of the bits that do not belong to the mask.
Definition at line 471 of file dictionary_compressor.hh.