From: Luke Kenneth Casson Leighton Date: Sun, 13 Sep 2020 10:36:59 +0000 (+0100) Subject: minor error in plru X-Git-Tag: semi_working_ecp5~79 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=995498dbcdbb523f6906a965fce0eea52de01e24;p=soc.git minor error in plru --- diff --git a/src/soc/experiment/plru.py b/src/soc/experiment/plru.py index 3400f8cd..baa68ce2 100644 --- a/src/soc/experiment/plru.py +++ b/src/soc/experiment/plru.py @@ -28,10 +28,7 @@ class PLRU(Elaboratable): comb += self.lru_o[self.BITS-1-i].eq(tree[node]) if i != self.BITS-1: comb += node2.eq(node << 1) - else: - comb += node2.eq(node) - if i != self.BITS-1: - with m.If(tree[node]): + with m.If(tree[node2]): comb += node_next.eq(node2 + 2) with m.Else(): comb += node_next.eq(node2 + 1) @@ -48,9 +45,6 @@ class PLRU(Elaboratable): sync += tree[node].eq(~abit) if i != self.BITS-1: comb += node2.eq(node << 1) - else: - comb += node2.eq(node) - if i != self.BITS-1: with m.If(abit): comb += node_next.eq(node2 + 2) with m.Else():