From: Luke Kenneth Casson Leighton Date: Sat, 14 Mar 2020 11:56:07 +0000 (+0000) Subject: add beginnings of PartialAddrBitmap elaborate X-Git-Tag: div_pipeline~1702 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c3ee3852518f27c62513e77b1eae0b41089b579;p=soc.git add beginnings of PartialAddrBitmap elaborate --- diff --git a/src/soc/scoreboard/addr_match.py b/src/soc/scoreboard/addr_match.py index e03b036f..8e81157c 100644 --- a/src/soc/scoreboard/addr_match.py +++ b/src/soc/scoreboard/addr_match.py @@ -31,6 +31,7 @@ Notes: from nmigen.compat.sim import run_simulation from nmigen.cli import verilog, rtlil from nmigen import Module, Signal, Const, Array, Cat, Elaboratable +from nmigen.lib.coding import Decoder from nmutil.latch import latchregister, SRLatch @@ -61,7 +62,7 @@ class PartialAddrMatch(Elaboratable): sync = m.d.sync # array of address-latches - m.submodules.l = l = SRLatch(llen=self.n_adr, sync=False) + m.submodules.l = self.l = l = SRLatch(llen=self.n_adr, sync=False) self.addrs_r = addrs_r = Array(Signal(self.bitwid, name="a_r") \ for i in range(self.n_adr)) @@ -106,6 +107,30 @@ class PartialAddrBitmap(PartialAddrMatch): PartialAddrMatch.__init__(self, n_adr, bitwid) self.bitlen = bitlen # number of bits to turn into unary + # inputs: length of the LOAD/STORE + self.len_i = Array(Signal(bitwid, name="len") for i in range(n_adr)) + + def elaborate(self, platform): + m = PartialAddrMatch.elaborate(self, platform) + + # intermediaries + addrs_r, l = self.addrs_r, self.l + expwid = 8 + (1<