mem-cache: Use cache's max CR on perfect compressor
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Tue, 5 Nov 2019 12:32:46 +0000 (13:32 +0100)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Mon, 31 Aug 2020 17:45:43 +0000 (17:45 +0000)
Use cache's max_compression_ratio to setup the max_compression_ratio
of the PerfectCompressor.

Change-Id: Ib44aa61975fb2cc52f27f64a86c9df9c5531aa1a
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33387
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/cache/compressors/Compressors.py

index 2497e82e00ae5f817f83bb1fe2d4adec0bdbc8c9..d7dfdab6b944fe4720f3eda5e3f1afc81a307a25 100644 (file)
@@ -125,7 +125,7 @@ class PerfectCompressor(BaseCacheCompressor):
     cxx_header = "mem/cache/compressors/perfect.hh"
 
     chunk_size_bits = 64
-    max_compression_ratio = Param.Int(2,
+    max_compression_ratio = Param.Int(Parent.max_compression_ratio,
         "Maximum compression ratio allowed")
     compression_latency = Param.Cycles(1,
         "Number of cycles to perform data compression")