From 7ba6bd27618ba619814fc669ebc76fbf55cce966 Mon Sep 17 00:00:00 2001 From: Tobias Platen Date: Thu, 28 May 2020 14:22:45 +0200 Subject: [PATCH] fixes for l0_cache.py --- src/soc/experiment/l0_cache.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/soc/experiment/l0_cache.py b/src/soc/experiment/l0_cache.py index e9fdfcd8..6a1cefc7 100644 --- a/src/soc/experiment/l0_cache.py +++ b/src/soc/experiment/l0_cache.py @@ -195,17 +195,19 @@ class DataMerger(Elaboratable): comb, sync = m.d.comb, m.d.sync #(1) pick a row m.submodules.pick = pick = PriorityEncoder(self.array_size) - pick.i.eq(0) - for j in range(self.addr): - with m.If(self.addr_match_i[j]>0): + for j in range(self.array_size): + with m.If(self.addr_match_i[j].bool()): pick.i.eq(pick.i||(1<