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(
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):