From a5da61a18d64be8e79c86582983d499a91e1f5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fin=20Maa=C3=9F?= Date: Thu, 14 Nov 2024 10:31:58 +0100 Subject: [PATCH] build: io: SDRIO/Tristate: check len after wrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit check len after wrap, because len won't work on int and bool. Signed-off-by: Fin Maaß --- litex/build/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/build/io.py b/litex/build/io.py index 480748c71..6559cd2d4 100644 --- a/litex/build/io.py +++ b/litex/build/io.py @@ -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