From: Luke Kenneth Casson Leighton Date: Tue, 9 Jun 2020 17:33:22 +0000 (+0100) Subject: allow LenExpand to output both byte- and bit- mask expansion X-Git-Tag: div_pipeline~446 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4d90bf6e19f4a16adba68b8af9a7ae5005a7062;p=soc.git allow LenExpand to output both byte- and bit- mask expansion --- diff --git a/src/soc/scoreboard/addr_match.py b/src/soc/scoreboard/addr_match.py index 704e1b9b..1fa56524 100644 --- a/src/soc/scoreboard/addr_match.py +++ b/src/soc/scoreboard/addr_match.py @@ -126,28 +126,35 @@ class LenExpand(Elaboratable): def __init__(self, bit_len, cover=1): self.bit_len = bit_len self.cover = cover - cl = log2_int(cover) self.len_i = Signal(bit_len, reset_less=True) self.addr_i = Signal(bit_len, reset_less=True) - self.lexp_o = Signal((cover<<(bit_len))+(cl< 1: + self.rexp_o = Signal(self.llen(cover), reset_less=True) print ("LenExpand", bit_len, cover, self.lexp_o.shape()) + def llen(self, cover): + cl = log2_int(self.cover) + return (cover<<(self.bit_len))+(cl<