add idea of Decoder namedtuple
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 4 Mar 2020 19:12:36 +0000 (19:12 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 4 Mar 2020 19:12:36 +0000 (19:12 +0000)
src/decoder/power_decoder.py

index 7682381624cb7043f1efd2c4535e4d5f2eea6588..b3406ba12d6e9b11cc79f98a10466601bd073e70 100644 (file)
@@ -4,6 +4,10 @@ from power_enums import (Function, InternalOp, In1Sel, In2Sel, In3Sel,
                          get_signal_name, default_values)
 from collections import namedtuple
 
+# TODO - list of these into PowerDecoder
+Decoder = namedtuple("Decoder", ["width", "pattern", "csv", "opint",
+                                       "bitsel", "suffix", "subdecoders"])
+
 Subdecoder = namedtuple("Subdecoder", ["pattern", "csv", "opint",
                                        "bitsel", "suffix"])