mem-cache: Implement BDI sub-compressors
[gem5.git] / src / mem / cache / compressors / bdi.cc
index e29179fc0ac9a939b83351b01d194afe50565489..a8068c6146593920655d7992709ce66af74286a8 100644 (file)
@@ -166,7 +166,7 @@ BDI::BDICompDataBaseDelta<TB, TD>::calculateCompressedSize()
     std::size_t size = encodingBits;
 
     // Number of bits used by BitMask
-    size += bitMask.size()*std::ceil(std::log2(bases.size()));
+    size += bitMask.size()*std::ceil(std::log2(maxNumBases));
 
     // Number of bits used by Bases. bases[0] is implicit in a hardware
     // implementation, therefore its size is 0