X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=inline;f=decoders%2Fjtag%2Fpd.py;h=49077ed942eb08d68bbd938cd4eec450155a3cef;hb=486b19ce017c6663be6574dacd0c823304903bca;hp=95e5d28c5fc364da1f4ea123360af25220e4fe08;hpb=12851357e784b893e24880efc6cd22a0cbcc64ce;p=libsigrokdecode.git diff --git a/decoders/jtag/pd.py b/decoders/jtag/pd.py index 95e5d28..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', @@ -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 -