From 4ee9c53f185ac6dd9c4aa69a7547e9bc037acc25 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 3 Jul 2019 13:43:34 +0200 Subject: [PATCH] csr: add assert to ensure CSR size < busword (thanks tweakoz) --- litex/soc/interconnect/csr.py | 1 + 1 file changed, 1 insertion(+) 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) -- 2.30.2