33 #ifndef __MEM_CACHE_COMPRESSORS_BASE_DELTA_IMPL_HH__
34 #define __MEM_CACHE_COMPRESSORS_BASE_DELTA_IMPL_HH__
36 #include "debug/CacheComp.hh"
47 template <
class BaseType, std::
size_t DeltaSizeBits>
53 template <
class BaseType, std::
size_t DeltaSizeBits>
63 template <
class BaseType, std::
size_t DeltaSizeBits>
73 template <
class BaseType, std::
size_t DeltaSizeBits>
74 std::unique_ptr<Base::CompressionData>
79 std::unique_ptr<Base::CompressionData> comp_data =
86 const int diff = DEFAULT_MAX_NUM_BASES -
90 DPRINTF(CacheComp,
"Base%dDelta%d compression failed\n",
91 8 *
sizeof(BaseType), DeltaSizeBits);
92 }
else if (diff > 0) {
93 comp_data->setSizeBits(comp_data->getSizeBits() +
94 8 *
sizeof(BaseType) * diff);
Definition of a base delta immediate compressor.
Cycles is a wrapper class for representing cycle counts, i.e.
BaseDelta(const Params &p)
std::unique_ptr< Base::CompressionData > compress(const std::vector< Base::Chunk > &chunks, Cycles &comp_lat, Cycles &decomp_lat) override
Apply the compression process to the cache line.
void addToDictionary(DictionaryEntry data) override
void resetDictionary() override
Clear all dictionary entries.
typename DictionaryCompressor< BaseType >::DictionaryEntry DictionaryEntry
BaseCacheCompressorParams Params
static void setSizeBits(CacheBlk *blk, const std::size_t size_bits)
Set the size of the compressed block, in bits.
A template version of the dictionary compressor that allows to choose the dictionary size.
virtual void resetDictionary()
Clear all dictionary entries.
std::unique_ptr< Base::CompressionData > compress(const std::vector< Chunk > &chunks)
Apply compression.
Implementation of a dictionary based cache compressor.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)