+ if self.cjtagstate.value.startswith('CJTAG_'):
+ self.oacp += 1
+ if self.oacp > 4 and self.oaclen == 12:
+ self.cjtagstate = CSt.CJTAG_EC
+
+ if self.oacp == 8 and tms == 0:
+ self.oaclen = 36
+ if self.oacp > 8 and self.oaclen == 36:
+ self.cjtagstate = CSt.CJTAG_SPARE
+ if self.oacp > 13 and self.oaclen == 36:
+ self.cjtagstate = CSt.CJTAG_TPDEL
+ if self.oacp > 16 and self.oaclen == 36:
+ self.cjtagstate = CSt.CJTAG_TPREV
+ if self.oacp > 18 and self.oaclen == 36:
+ self.cjtagstate = CSt.CJTAG_TPST
+ if self.oacp > 23 and self.oaclen == 36:
+ self.cjtagstate = CSt.CJTAG_RDYC
+ if self.oacp > 25 and self.oaclen == 36:
+ self.cjtagstate = CSt.CJTAG_DLYC
+ if self.oacp > 27 and self.oaclen == 36:
+ self.cjtagstate = CSt.CJTAG_SCNFMT
+
+ if self.oacp > 8 and self.oaclen == 12:
+ self.cjtagstate = CSt.CJTAG_CP
+ if self.oacp > 32 and self.oaclen == 36:
+ self.cjtagstate = CSt.CJTAG_CP
+
+ if self.oacp > self.oaclen:
+ self.cjtagstate = CSt.OSCAN1
+ self.oscan1cycle = 1
+ # Because Nuclei cJTAG device asserts a reset during cJTAG
+ # online activating.
+ self.state = St.TEST_LOGIC_RESET
+ return
+