From c46f765dfce6e4623ae381cb2a0c9430dc4435a2 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 22 Oct 2020 18:16:05 +0100 Subject: [PATCH] correctly test length of IOs --- c4m/nmigen/jtag/tap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/c4m/nmigen/jtag/tap.py b/c4m/nmigen/jtag/tap.py index af27add..8c2ea43 100755 --- a/c4m/nmigen/jtag/tap.py +++ b/c4m/nmigen/jtag/tap.py @@ -538,6 +538,8 @@ class TAP(Elaboratable): def _elaborate_ios(self, *, m, capture, shift, update, bd2io, bd2core): length = sum(IOConn.lengths[conn._iotype] for conn in self._ios) + if length == 0: + return None io_sr = Signal(length) io_bd = Signal(length) @@ -595,8 +597,7 @@ class TAP(Elaboratable): raise("Internal error") assert idx == length, "Internal error" - if io_sr: - return io_sr[-1] + return io_sr[-1] def add_shiftreg(self, *, ircode, length, domain="sync", name=None, src_loc_at=0): -- 2.30.2