|
gem5
v22.1.0.0
|
A pattern that checks whether the value is an N bits sign-extended value, that is, all the MSB starting from the Nth are equal to the (N-1)th bit. More...
#include <dictionary_compressor.hh>
Public Member Functions | |
| SignExtendedPattern (const int number, const uint64_t code, const uint64_t metadata_length, const DictionaryEntry bytes, const bool allocate=false) | |
| DictionaryEntry | decompress (const DictionaryEntry dict_bytes) const override |
| Decompress the pattern. More... | |
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. More... | |
| virtual | ~Pattern ()=default |
| Default destructor. More... | |
| int | getPatternNumber () const |
| Get enum number associated to this pattern. More... | |
| uint8_t | getCode () const |
| Get code of this pattern. More... | |
| uint8_t | getMatchLocation () const |
| Get the index of the dictionary match location. More... | |
| virtual std::size_t | getSizeBits () const |
| Get size, in bits, of the pattern (excluding prefix). More... | |
| bool | shouldAllocate () const |
| Determine if pattern allocates a dictionary entry. More... | |
| std::string | print () const |
| Extract pattern's information to a string. More... | |
Static Public Member Functions | |
| static bool | isPattern (const DictionaryEntry &bytes, const DictionaryEntry &dict_bytes, const int match_location) |
Private Attributes | |
| const T | bits: N |
| The non-extended original value. More... | |
Additional Inherited Members | |
Protected Attributes inherited from gem5::compression::DictionaryCompressor< T >::Pattern | |
| const int | patternNumber |
| Pattern enum number. More... | |
| const uint8_t | code |
| Code associated to the pattern. More... | |
| const uint8_t | length |
| Length, in bits, of the code and match location. More... | |
| const uint8_t | numUnmatchedBits |
| Number of unmatched bits. More... | |
| const int | matchLocation |
| Index representing the the match location. More... | |
| const bool | allocate |
| Wether the pattern allocates a dictionary entry or not. More... | |
A pattern that checks whether the value is an N bits sign-extended value, that is, all the MSB starting from the Nth are equal to the (N-1)th bit.
Therefore, if N = 8, and T has 16 bits, the values within the ranges [0x0000, 0x007F] and [0xFF80, 0xFFFF] would match this pattern.
| N | The number of bits in the non-extended original value. It must fit in a dictionary entry. |
Definition at line 757 of file dictionary_compressor.hh.
|
inline |
Definition at line 768 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.
Definition at line 788 of file dictionary_compressor.hh.
References gem5::bits(), and gem5::compression::DictionaryCompressor< T >::toDictionaryEntry().
|
inlinestatic |
Definition at line 780 of file dictionary_compressor.hh.
References data, and gem5::compression::DictionaryCompressor< T >::fromDictionaryEntry().
|
private |
The non-extended original value.
Definition at line 765 of file dictionary_compressor.hh.