Connect tdi to tdo for boundary scan without IOs.
authorStaf Verhaegen <staf@stafverhaegen.be>
Wed, 21 Apr 2021 17:19:32 +0000 (19:19 +0200)
committerStaf Verhaegen <staf@stafverhaegen.be>
Wed, 21 Apr 2021 17:42:15 +0000 (19:42 +0200)
c4m/nmigen/jtag/tap.py

index 9e260c3d9df74086331d1d6aa59f10625a54e6a0..a6b702fd7786c751355eac1f2a0ab92a8307c53a 100755 (executable)
@@ -399,9 +399,8 @@ class TAP(Elaboratable):
             m.d.comb += tdo.eq(irblock.tdo)
         with m.Elif(select_id):
             m.d.comb += tdo.eq(idblock.tdo)
-        if io_tdo is not None:
-            with m.Elif(select_io):
-                m.d.comb += tdo.eq(io_tdo)
+        with m.Elif(select_io):
+            m.d.comb += tdo.eq(io_tdo)
 
         # shiftregs block
         self._elaborate_shiftregs(
@@ -440,7 +439,7 @@ class TAP(Elaboratable):
         }
         length = sum(connlength[conn._iotype] for conn in self._ios)
         if length == 0:
-            return None
+            return self.bus.tdi
 
         io_sr = Signal(length)
         io_bd = Signal(length)