From ba61c77e48a66bbe344c4333ad98bfbc82eea53d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 22 Oct 2020 18:13:57 +0100 Subject: [PATCH] do not need to do IOconn --- c4m/nmigen/jtag/tap.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/c4m/nmigen/jtag/tap.py b/c4m/nmigen/jtag/tap.py index 73541df..af27add 100755 --- a/c4m/nmigen/jtag/tap.py +++ b/c4m/nmigen/jtag/tap.py @@ -412,8 +412,9 @@ class TAP(Elaboratable): m.d.comb += tdo.eq(irblock.tdo) with m.Elif(select_id): m.d.comb += tdo.eq(idblock.tdo) - with m.Elif(select_io): - m.d.comb += tdo.eq(io_tdo) + if io_tdo is not None: + with m.Elif(select_io): + m.d.comb += tdo.eq(io_tdo) # shiftregs block self._elaborate_shiftregs( @@ -594,8 +595,8 @@ class TAP(Elaboratable): raise("Internal error") assert idx == length, "Internal error" - return io_sr[-1] - + if io_sr: + return io_sr[-1] def add_shiftreg(self, *, ircode, length, domain="sync", name=None, src_loc_at=0): -- 2.30.2