set is a python keyword, renamed to "cset" - short for "cache set"
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 10 Apr 2019 17:40:57 +0000 (18:40 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 10 Apr 2019 17:40:57 +0000 (18:40 +0100)
TLB/src/SetAssociativeCache.py

index 4e5a863a54781e009db07a0bd9d8aa3eef933233..37ad94d6b803107eb7c30eaa4389dfe6e74be994 100644 (file)
@@ -55,7 +55,7 @@ class SetAssociativeCache():
         # Input
         self.enable = Signal(1) # Whether the cache is enabled
         self.command = Signal(2)  # 00=None, 01=Read, 10=Write (see SA_XX)
-        self.set = Signal(max=set_count) # The set to be checked
+        self.cset = Signal(max=set_count) # The set to be checked
         self.tag = Signal(tag_size) # The tag to find
         self.data_i = Signal(data_size + tag_size) # The input data
 
@@ -78,8 +78,8 @@ class SetAssociativeCache():
         # value
         for i in range(self.way_count):
             m.d.comb += [
-                self.write_port_array[i].addr.eq(self.set),
-                self.read_port_array[i].addr.eq(self.set)
+                self.write_port_array[i].addr.eq(self.cset),
+                self.read_port_array[i].addr.eq(self.cset)
             ]
             # Pull out active bit from data
             data = self.read_port_array[i].data;