Go to the documentation of this file.
36 #ifndef __MEM_CACHE_COMPRESSORS_BASE_HH__
37 #define __MEM_CACHE_COMPRESSORS_BASE_HH__
51 struct BaseCacheCompressorParams;
82 typedef uint64_t
Chunk;
187 virtual std::unique_ptr<CompressionData>
compress(
198 uint64_t* cache_line) = 0;
201 typedef BaseCacheCompressorParams
Params;
203 virtual ~Base() =
default;
217 std::unique_ptr<CompressionData>
289 #endif //__MEM_CACHE_COMPRESSORS_BASE_HH__
This is a simple scalar statistic, like a counter.
statistics::Formula avgCompressionSizeBits
Average data size after compression, in number of bits.
const unsigned chunkSizeBits
Chunk size, in number of bits.
virtual void decompress(const CompressionData *comp_data, uint64_t *cache_line)=0
Apply the decompression process to the compressed data.
const Cycles decompChunksPerCycle
Degree of parallelization of the decompression process.
statistics::Vector compressionSize
Number of blocks that were compressed to this power of two size.
Cycles getDecompressionLatency(const CacheBlk *blk)
Get the decompression latency if the block is compressed.
statistics::Scalar failedCompressions
Number of failed compressions.
uint64_t Chunk
A chunk is a basic lexical unit.
BaseCacheCompressorParams Params
A vector of scalar stats.
const std::size_t blkSize
Uncompressed cache line size (in bytes).
const Cycles compExtraLatency
Extra latency added to compression due to packaging, shifting or other operations.
BaseStats(Base &compressor)
statistics::Scalar decompressions
Number of decompressions performed.
virtual void setCache(BaseCache *_cache)
The cache can only be set once.
void fromChunks(const std::vector< Chunk > &chunks, uint64_t *data) const
This function re-joins the chunks to recreate the original data.
Cycles is a wrapper class for representing cycle counts, i.e.
std::size_t _size
Compressed cache line size (in bits).
const Cycles decompExtraLatency
Extra latency added to decompression due to packaging, shifting or other operations.
std::size_t getSize() const
Get compression size (in bytes).
BaseCache * cache
Pointer to the parent cache.
std::vector< Chunk > toChunks(const uint64_t *data) const
This function splits the raw data into chunks, so that it can be parsed by the compressor.
virtual ~CompressionData()
Virtual destructor.
Base cache compressor interface.
static void setSizeBits(CacheBlk *blk, const std::size_t size_bits)
Set the size of the compressed block, in bits.
std::size_t getSizeBits() const
Get compression size (in bits).
Abstract superclass for simulation objects.
void regStats() override
Callback to set stat parameters.
gem5::compression::Base::BaseStats stats
statistics::Scalar compressions
Number of compressions performed.
statistics::Scalar compressionSizeBits
Total compressed data size, in number of bits.
virtual std::unique_ptr< CompressionData > compress(const std::vector< Chunk > &chunks, Cycles &comp_lat, Cycles &decomp_lat)=0
Apply the compression process to the cache line.
const Cycles compChunksPerCycle
Degree of parallelization of the compression process.
static void setDecompressionLatency(CacheBlk *blk, const Cycles lat)
Set the decompression latency of compressed block.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
const std::size_t sizeThreshold
Size in bytes at which a compression is classified as bad and therefore the compressed block is resto...
CompressionData()
Default constructor.
void setSizeBits(std::size_t size)
Set compression size (in bits).
Generated on Sun Jul 30 2023 01:56:51 for gem5 by doxygen 1.8.17