Skip to content

Commit

Permalink
build: io: SDRIO/Tristate: check len after wrap
Browse files Browse the repository at this point in the history
check len after wrap, because len won't work on int and bool.

Signed-off-by: Fin Maaß <[email protected]>
  • Loading branch information
maass-hamburg committed Dec 5, 2024
1 parent fd6c9f8 commit a5da61a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion litex/build/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ def __init__(self, i, o, clk):

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)
if clk is None:
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
Expand Down

0 comments on commit a5da61a

Please sign in to comment.