csr: add assert to ensure CSR size < busword (thanks tweakoz)
This commit is contained in:
parent
0116b2b708
commit
4ee9c53f18
|
@ -340,6 +340,7 @@ class GenericBank(Module):
|
||||||
self.simple_csrs = []
|
self.simple_csrs = []
|
||||||
for c in description:
|
for c in description:
|
||||||
if isinstance(c, CSR):
|
if isinstance(c, CSR):
|
||||||
|
assert c.size <= busword
|
||||||
self.simple_csrs.append(c)
|
self.simple_csrs.append(c)
|
||||||
else:
|
else:
|
||||||
c.finalize(busword)
|
c.finalize(busword)
|
||||||
|
|
Loading…
Reference in New Issue