JTAG_master class: fix bug that wrongly changed state to Scan when TMS is 0
[c4m-jtag.git] / sim / cocotb / c4m_jtag.py
index 48d2677cc5920daa1423d4c6cf82d7efaa8f537f..529e66bc589a99e8c70b6343cdafc22463a2dcbf 100644 (file)
@@ -62,7 +62,7 @@ class JTAG_Master(object):
 
     @cocotb.coroutine
     def cycle_clock(self, cycles=1):
-        if self.state == "Run" and self.tms:
+        if self.state == "Run" and self.tms == 1:
             self.state = "Scan"
         yield self.clkgen.Cycle(cycles)