rename plru input
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 14 Sep 2020 13:46:36 +0000 (14:46 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 14 Sep 2020 13:46:36 +0000 (14:46 +0100)
src/soc/experiment/dcache.py
src/soc/experiment/plru.py

index 25325c5bb476a55df4baf38ee2db4f9864a829b4..a95e28422e399b8357a192c199dd15f98adacb77 100644 (file)
@@ -660,7 +660,7 @@ class DCache(Elaboratable):
 
             comb += tlb_plru_acc_en.eq(r1.tlb_hit & (r1.tlb_hit_index == i))
             comb += tlb_plru.acc_en.eq(tlb_plru_acc_en)
-            comb += tlb_plru.acc.eq(r1.tlb_hit_way)
+            comb += tlb_plru.acc_i.eq(r1.tlb_hit_way)
             comb += tlb_plru_victim[i].eq(tlb_plru.lru_o)
 
     def tlb_search(self, m, tlb_req_index, r0, r0_valid,
@@ -774,7 +774,7 @@ class DCache(Elaboratable):
 
             comb += plru_acc_en.eq(r1.cache_hit & (r1.hit_index == i))
             comb += plru.acc_en.eq(plru_acc_en)
-            comb += plru.acc.eq(r1.hit_way)
+            comb += plru.acc_i.eq(r1.hit_way)
             comb += plru_victim[i].eq(plru.lru_o)
 
     def cache_tag_read(self, m, r0_stall, req_index, cache_tag_set, cache_tags):
index c8a59b39ed1ca6dd5f7366739f6f769ccc74200c..d2ba72324da697e74f821da6a5377fe8034a4dd1 100644 (file)
@@ -8,7 +8,7 @@ class PLRU(Elaboratable):
 
     def __init__(self, BITS=2):
         self.BITS = BITS
-        self.acc = Signal(BITS)
+        self.acc_i = Signal(BITS)
         self.acc_en = Signal()
         self.lru_o = Signal(BITS)
 
@@ -43,7 +43,7 @@ class PLRU(Elaboratable):
                 node2 = Signal(self.BITS)
                 # report "GET: i:" & integer'image(i) & " node:" & 
                 # integer'image(node) & " val:" & Signal()'image(tree(node))
-                abit = self.acc[self.BITS-1-i]
+                abit = self.acc_i[self.BITS-1-i]
                 sync += tree[node].eq(~abit)
                 if i != self.BITS-1:
                     comb += node2.eq(node << 1)
@@ -56,7 +56,7 @@ class PLRU(Elaboratable):
         return m
 
     def ports(self):
-        return [self.acc_en, self.lru_o, self.acc]
+        return [self.acc_en, self.lru_o, self.acc_i]
 
 if __name__ == '__main__':
     dut = PLRU(3)