encoding_in_tags = Param.Bool(False, "If set the bits to inform which "
"sub-compressor compressed some data are added to its corresponding "
"tag entry.")
+ extra_decomp_lat = Param.Unsigned(0, "Extra latency to be added to the "
+ "sub-compressor's decompression latency")
class PerfectCompressor(BaseCacheCompressor):
type = 'PerfectCompressor'
: Base(p), compressors(p->compressors),
numEncodingBits(p->encoding_in_tags ? 0 :
std::log2(alignToPowerOfTwo(compressors.size()))),
+ extraDecompressionLatency(p->extra_decomp_lat),
multiStats(stats, *this)
{
fatal_if(compressors.size() == 0, "There must be at least one compressor");
DPRINTF(CacheComp, "Best compressor: %d\n", best_index);
// Set decompression latency of the best compressor
- decomp_lat = results.top()->decompLat;
+ decomp_lat = results.top()->decompLat + extraDecompressionLatency;
// Update compressor ranking stats
for (int rank = 0; rank < compressors.size(); rank++) {
*/
const std::size_t numEncodingBits;
+ /**
+ * Extra decompression latency to be added to the sub-compressor's
+ * decompression latency. This can different from zero due to decoding,
+ * shifting, or packaging, for example.
+ */
+ const Cycles extraDecompressionLatency;
+
struct MultiStats : public Stats::Group
{
const Multi& compressor;