From e7a55fa7337444cc646af11b4665cd66a05ad785 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 480748c71a..6559cd2d4c 100644 --- a/litex/build/io.py +++ b/litex/build/io.py @@ -84,7 +84,6 @@ 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) @@ -92,6 +91,7 @@ def __init__(self, i, o, clk=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