From f2783a4fe3e54b7e43137cafa70063b1094aff2d Mon Sep 17 00:00:00 2001 From: Tobias Platen Date: Wed, 27 May 2020 11:27:06 +0200 Subject: [PATCH] elaborate function for DataMerger --- src/soc/experiment/l0_cache.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/soc/experiment/l0_cache.py b/src/soc/experiment/l0_cache.py index de6b4ca3..e9fdfcd8 100644 --- a/src/soc/experiment/l0_cache.py +++ b/src/soc/experiment/l0_cache.py @@ -190,6 +190,23 @@ class DataMerger(Elaboratable): self.data_i = Array(ul) self.data_o = DataMergerRecord() + def elaborate(self, platform): + m = Module() + 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): + pick.i.eq(pick.i||(1<