cocotb/c4m_jtag: support trst_n to be None.
[c4m-jtag.git] / sim / cocotb / c4m_jtag.py
index bdac25ca5c5f17f3e6bc750744e95ded23849ffc..1dd13b1ee0d1a0c3e47859421735bc27db5dd0a5 100644 (file)
@@ -1,6 +1,5 @@
 import cocotb
 from cocotb.triggers import Timer
-from cocotb.utils import get_sim_steps
 from cocotb.binary import BinaryValue
 
 class JTAGException(Exception):
@@ -45,7 +44,8 @@ class JTAG_Master(object):
         tdi <= 0
         self.tdo = tdo
         self.trst_n = trst_n
-        trst_n <= 1
+        if trst_n is not None:
+            trst_n <= 1
         self.period = Timer(clk_period)
 
         # Standard commands