mem-cache: Add an uncompressed pattern to compressors
[gem5.git] / src / mem / cache / compressors / Compressors.py
index 1d9de198060c5f9dee1c3abafefdecb98de644f1..4ed72190c0b6ace92c503909dda122adc3300fe5 100644 (file)
@@ -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'
@@ -45,3 +56,8 @@ class BDI(BaseCacheCompressor):
     use_more_compressors = Param.Bool(True, "True if should use all possible" \
         "combinations of base and delta for the compressors. False if using" \
         "only the lowest possible delta size for each base size.");
+
+class CPack(BaseDictionaryCompressor):
+    type = 'CPack'
+    cxx_class = 'CPack'
+    cxx_header = "mem/cache/compressors/cpack.hh"