csr: add assert to ensure CSR size < busword (thanks tweakoz)

This commit is contained in:
Florent Kermarrec 2019-07-03 13:43:34 +02:00
parent 0116b2b708
commit 4ee9c53f18
1 changed files with 1 additions and 0 deletions

View File

@ -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)