From: Florent Kermarrec Date: Wed, 3 Jul 2019 11:43:34 +0000 (+0200) Subject: csr: add assert to ensure CSR size < busword (thanks tweakoz) X-Git-Tag: 24jan2021_ls180~1131 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ee9c53f185ac6dd9c4aa69a7547e9bc037acc25;p=litex.git csr: add assert to ensure CSR size < busword (thanks tweakoz) --- diff --git a/litex/soc/interconnect/csr.py b/litex/soc/interconnect/csr.py index 4ee7a41c..4165dbd2 100644 --- a/litex/soc/interconnect/csr.py +++ b/litex/soc/interconnect/csr.py @@ -340,6 +340,7 @@ class GenericBank(Module): self.simple_csrs = [] for c in description: if isinstance(c, CSR): + assert c.size <= busword self.simple_csrs.append(c) else: c.finalize(busword)