]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/jtag_ejtag/pd.py
adxl345: Use SrdIntEnum for annotation classes.
[libsigrokdecode.git] / decoders / jtag_ejtag / pd.py
index 5f026fa86b9e5dbfc28e01d426fb66a1af8c6e19..191526b2e5b7b05de08dfddbe7da6f8ebef68229 100644 (file)
@@ -18,7 +18,7 @@
 ##
 
 import sigrokdecode as srd
-from common.srdhelper import bin2int
+from common.srdhelper import bin2int, SrdIntEnum
 
 class Instruction(object):
     IDCODE            = 0x01
@@ -53,7 +53,7 @@ class ControlReg(object):
     PRACC             = (1 << 18)
     PRNW              = (1 << 19)
 
-class Ann(object):
+class Ann(SrdIntEnum):
     INSTRUCTION       = 0
     REGISTER          = 1
     CONTROL_FIELD_IN  = 10
@@ -191,13 +191,13 @@ regs_items = {
 class Decoder(srd.Decoder):
     api_version = 3
     id = 'jtag_ejtag'
-    name = 'JTAG / EJTAG (MIPS)'
+    name = 'JTAG / EJTAG'
     longname = 'Joint Test Action Group / EJTAG (MIPS)'
     desc = 'MIPS EJTAG protocol.'
     license = 'gplv2+'
     inputs = ['jtag']
-    outputs = ['jtag_ejtag']
-    tags = ['Logic', 'MCU Debugging', 'Bus']
+    outputs = []
+    tags = ['Debug/trace']
     annotations = (
         ('instruction', 'Instruction'),
     ) + regs_items['ann'] + (
@@ -207,10 +207,10 @@ class Decoder(srd.Decoder):
     )
     annotation_rows = (
         ('instructions', 'Instructions', (0,)),
-        ('regs', 'Registers', regs_items['rows_range']),
         ('control_fields_in', 'Control fields in', (10,)),
         ('control_fields_out', 'Control fields out', (11,)),
-        ('pracc', 'PrAcc', (12,)),
+        ('regs', 'Registers', regs_items['rows_range']),
+        ('pracc-vals', 'PrAcc', (12,)),
     )
 
     def __init__(self):