build: io: SDRIO/Tristate: check len after wrap

check len after wrap, because len won't work on int and bool.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2024-11-14 10:31:58 +01:00
parent fd6c9f8363
commit a5da61a18d

View file

@ -84,7 +84,6 @@ class InferedSDRIO(Module):
class SDRIO(Special):
def __init__(self, i, o, clk=None):
assert len(i) == len(o)
Special.__init__(self)
self.i = wrap(i)
self.o = wrap(o)
@ -92,6 +91,7 @@ class SDRIO(Special):
clk = ClockSignal()
self.clk = wrap(clk)
self.clk_domain = None if not hasattr(clk, "cd") else clk.cd
assert len(self.i) == len(self.o)
def iter_expressions(self):
yield self, "i" , SPECIAL_INPUT