X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fjtag%2Fpd.py;h=49077ed942eb08d68bbd938cd4eec450155a3cef;hb=cda1352a7ce0248e6db1996d9ddb9dbee2f91e8b;hp=21bd44b12693192a15dfd9b9023d68a3cbf863db;hpb=6a15597a7b3f901b566b7bfc8c484a14e0fb6a11;p=libsigrokdecode.git diff --git a/decoders/jtag/pd.py b/decoders/jtag/pd.py index 21bd44b..49077ed 100644 --- a/decoders/jtag/pd.py +++ b/decoders/jtag/pd.py @@ -23,11 +23,11 @@ import sigrokdecode as srd ''' OUTPUT_PYTHON format: -JTAG packet: -[, ] +Packet: +[, ] - is one of: - - 'NEW STATE': is the new state of the JTAG state machine. +: + - 'NEW STATE': is the new state of the JTAG state machine. Valid values: 'TEST-LOGIC-RESET', 'RUN-TEST/IDLE', 'SELECT-DR-SCAN', 'CAPTURE-DR', 'SHIFT-DR', 'EXIT1-DR', 'PAUSE-DR', 'EXIT2-DR', 'UPDATE-DR', 'SELECT-IR-SCAN', 'CAPTURE-IR', 'SHIFT-IR', 'EXIT1-IR', 'PAUSE-IR', @@ -54,7 +54,7 @@ jtag_states = [ ] class Decoder(srd.Decoder): - api_version = 1 + api_version = 2 id = 'jtag' name = 'JTAG' longname = 'Joint Test Action Group (IEEE 1149.1)' @@ -139,14 +139,11 @@ class Decoder(srd.Decoder): elif self.state == 'UPDATE-IR': self.state = 'SELECT-DR-SCAN' if (tms) else 'RUN-TEST/IDLE' - else: - raise Exception('Invalid state: %s' % self.state) - def handle_rising_tck_edge(self, tdi, tdo, tck, tms): # Rising TCK edges always advance the state machine. self.advance_state_machine(tms) - if self.first == True: + if self.first: # Save the start sample and item for later (no output yet). self.ss_item = self.samplenum self.first = False @@ -217,4 +214,3 @@ class Decoder(srd.Decoder): self.handle_rising_tck_edge(tdi, tdo, tck, tms) self.oldtck = tck -