From: Tobias Platen Date: Wed, 27 May 2020 09:27:06 +0000 (+0200) Subject: elaborate function for DataMerger X-Git-Tag: div_pipeline~802 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2783a4fe3e54b7e43137cafa70063b1094aff2d;p=soc.git elaborate function for DataMerger --- 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<