make power function unit enum bitmasked
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 27 May 2020 02:45:40 +0000 (03:45 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 27 May 2020 02:45:40 +0000 (03:45 +0100)
src/soc/decoder/power_enums.py

index 05e23f8e8ee1f0bddc412c48f1cc08bf6fe6b6de..b294324e26ecc1ba228e8c6a120eb56d3aec3238 100644 (file)
@@ -46,15 +46,15 @@ def get_signal_name(name):
 @unique
 class Function(Enum):
     NONE = 0
-    ALU = 1
-    LDST = 2
-    SHIFT_ROT = 3
-    LOGICAL = 4
-    BRANCH = 5
-    CR = 6
-    TRAP = 7
-    MUL = 8
-    DIV = 9
+    ALU = 1<<1
+    LDST = 1<<2
+    SHIFT_ROT = 1<<3
+    LOGICAL = 1<<4
+    BRANCH = 1<<5
+    CR = 1<<6
+    TRAP = 1<<7
+    MUL = 1<<8
+    DIV = 1<<9
 
 
 @unique