Added SVF_Executor class that allows to execute a SVF file through a JTAG_Master...
[c4m-jtag.git] / sim / cocotb / c4m_jtag.py
index 48d2677cc5920daa1423d4c6cf82d7efaa8f537f..bdac25ca5c5f17f3e6bc750744e95ded23849ffc 100644 (file)
@@ -3,6 +3,9 @@ from cocotb.triggers import Timer
 from cocotb.utils import get_sim_steps
 from cocotb.binary import BinaryValue
 
+class JTAGException(Exception):
+    pass
+
 class JTAG_Clock(object):
     """
     Class for the JTAG clock, run cycle by cycle
@@ -62,7 +65,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)