resolve issue in coriolis2 with passing nmigen expressions rather
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 25 Oct 2020 11:26:26 +0000 (11:26 +0000)
committerStaf Verhaegen <staf@stafverhaegen.be>
Thu, 22 Apr 2021 09:15:52 +0000 (11:15 +0200)
than signals to a submodule

c4m/nmigen/jtag/tap.py

index 625a70606db483a4fae6cb6e1f0ae14281954483..44e0ad49bf73cfe8932a28f3f8336639e7dd7020 100755 (executable)
@@ -377,7 +377,11 @@ class TAP(Elaboratable):
         ir = irblock.ir
 
         # ID block
-        select_id = fsm.isdr & ((ir == cmd_idcode) | (ir == cmd_bypass))
+        select_id = Signal()
+        id_bypass = Signal()
+        m.d.comb += select_id.eq(fsm.isdr &
+                                 ((ir == cmd_idcode) | (ir == cmd_bypass)))
+        m.d.comb += id_bypass.eq(ir == cmd_bypass)
         m.submodules._idblock = idblock = _IDBypassBlock(
             manufacturer_id=self._manufacturer_id,
             part_number=self._part_number,
@@ -385,7 +389,7 @@ class TAP(Elaboratable):
             capture=(select_id & fsm.capture),
             shift=(select_id & fsm.shift),
             update=(select_id & fsm.update),
-            bypass=(ir == cmd_bypass),
+            bypass=id_bypass,
             name=self.name+"_id",
         )