hmmm.... AddressEncoder needs to be of width way_count
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 22 Apr 2019 03:44:35 +0000 (04:44 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 22 Apr 2019 03:44:35 +0000 (04:44 +0100)
TLB/src/SetAssociativeCache.py

index af1de20c0058a6ca9413fddcb279a0626ed04221..c4e030e06ca623fc69ae02b7c8f9189bad159a64 100644 (file)
@@ -92,7 +92,7 @@ class SetAssociativeCache():
         self.data_size = data_size  # The bit count of the data to be stored
 
         # Finds valid entries
-        self.encoder = AddressEncoder(way_count.bit_length())
+        self.encoder = AddressEncoder(way_count)
 
         self.plru = PLRU(way_count) # Single block to handle plru calculations
         self.plru_array = Array() # PLRU data on each set