Fix bug where enum values weren't getting set to int
authorMichael Nolan <mtnolan2640@gmail.com>
Wed, 18 Mar 2020 13:34:45 +0000 (09:34 -0400)
committerMichael Nolan <mtnolan2640@gmail.com>
Wed, 18 Mar 2020 20:03:59 +0000 (16:03 -0400)
src/soc/decoder/power_enums.py

index fa7d1cabb85b3b84b9aeba47a4fd9e401e1fe6a6..ab838132b30100fe832adfaecabf0d6bbbfa7787 100644 (file)
@@ -220,5 +220,5 @@ class CryIn(Enum):
 # http://bugs.libre-riscv.org/show_bug.cgi?id=261
 
 spr_csv = get_csv("sprs.csv")
-fields = [(row['SPR'], row['Idx']) for row in spr_csv]
+fields = [(row['SPR'], int(row['Idx'])) for row in spr_csv]
 SPR = Enum('SPR', fields)