X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmem%2Fcache%2Fcompressors%2FCompressors.py;h=4ed72190c0b6ace92c503909dda122adc3300fe5;hb=7973e49187a977b26cc3abc8a5b1393eb1a1f294;hp=b266ccc95492ad245b4074623ead680b54ea2287;hpb=28059ffcdf50871b1be573c29a656da9473287d1;p=gem5.git diff --git a/src/mem/cache/compressors/Compressors.py b/src/mem/cache/compressors/Compressors.py index b266ccc95..4ed72190c 100644 --- a/src/mem/cache/compressors/Compressors.py +++ b/src/mem/cache/compressors/Compressors.py @@ -36,6 +36,17 @@ class BaseCacheCompressor(SimObject): cxx_header = "mem/cache/compressors/base.hh" block_size = Param.Int(Parent.cache_line_size, "Block size in bytes") + size_threshold = Param.Unsigned(Parent.cache_line_size, "Minimum size, " + "in bytes, in which a block must be compressed to. Otherwise it is " + "stored in its uncompressed state") + +class BaseDictionaryCompressor(BaseCacheCompressor): + type = 'BaseDictionaryCompressor' + abstract = True + cxx_header = "mem/cache/compressors/dictionary_compressor.hh" + + dictionary_size = Param.Int(Parent.cache_line_size, + "Number of dictionary entries") class BDI(BaseCacheCompressor): type = 'BDI' @@ -46,7 +57,7 @@ class BDI(BaseCacheCompressor): "combinations of base and delta for the compressors. False if using" \ "only the lowest possible delta size for each base size."); -class CPack(BaseCacheCompressor): +class CPack(BaseDictionaryCompressor): type = 'CPack' cxx_class = 'CPack' cxx_header = "mem/cache/compressors/cpack.hh"