From: Luke Kenneth Casson Leighton Date: Mon, 16 Mar 2020 12:39:03 +0000 (+0000) Subject: connect up expander output, set up is_match to check bitmap and wrapped bitmap X-Git-Tag: div_pipeline~1696 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=132c33df8294ecbba20b79ccb924efc5af2575b4;p=soc.git connect up expander output, set up is_match to check bitmap and wrapped bitmap (crossing cache line boundary) --- diff --git a/src/soc/scoreboard/addr_match.py b/src/soc/scoreboard/addr_match.py index 4a099bf2..3f48008a 100644 --- a/src/soc/scoreboard/addr_match.py +++ b/src/soc/scoreboard/addr_match.py @@ -159,43 +159,45 @@ class PartialAddrBitmap(PartialAddrMatch): therefore, because this now covers two addresses, we need *two* comparisons per address *not* one. """ - def __init__(self, n_adr, bitwid, bitlen): - self.bitwid = bitwid # number of bits to turn into unary - self.midlen = bitlen-bitwid + def __init__(self, n_adr, lsbwid, bitlen): + self.lsbwid = lsbwid # number of bits to turn into unary + self.midlen = bitlen-lsbwid PartialAddrMatch.__init__(self, n_adr, self.midlen) # input: length of the LOAD/STORE - self.len_i = Array(Signal(bitwid, reset_less=True, + self.len_i = Array(Signal(lsbwid, reset_less=True, name="len") for i in range(n_adr)) # input: full address self.faddrs_i = Array(Signal(bitlen, reset_less=True, name="fadr") for i in range(n_adr)) # intermediary: address + 1 - self.addr1s = Array(Signal(self.bitwid, reset_less=True, + self.addr1s = Array(Signal(self.midlen, reset_less=True, name="adr1") \ for i in range(n_adr)) + # expanded lengths, needed in match + expwid = 1+self.lsbwid # XXX assume LD/ST no greater than 8 + self.explen = Array(Signal(1<> 1 + expwid2 = expwid + hexp + print (self.lsbwid, expwid) + return ((self.addrs_r[i] == self.addrs_r[j]) & \ + (self.explen[i][:expwid] & self.explen[j][:expwid]).bool() | + (self.addr1s[i] == self.addrs_r[j]) & \ + (self.explen[i][expwid:expwid2] & self.explen[j][:hexp]).bool()) def __iter__(self): yield from self.faddrs_i