projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d376784
)
force opcode field to be always specified in binary for opint=True CSVs
author
Jacob Lifshay
<programmerjake@gmail.com>
Thu, 18 Mar 2021 02:45:39 +0000
(19:45 -0700)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Thu, 18 Mar 2021 02:48:40 +0000
(19:48 -0700)
src/soc/decoder/power_decoder.py
patch
|
blob
|
history
diff --git
a/src/soc/decoder/power_decoder.py
b/src/soc/decoder/power_decoder.py
index 239541424497c6cc95014f4fa46ff2d2c975065e..79dd79518be18a680315091e4230eaac1cf3438c 100644
(file)
--- a/
src/soc/decoder/power_decoder.py
+++ b/
src/soc/decoder/power_decoder.py
@@
-382,8
+382,12
@@
class PowerDecoder(Elaboratable):
eq += seqs
for row in d.opcodes:
opcode = row['opcode']
- if d.opint and '-' not in opcode:
- opcode = int(opcode, 0)
+ if d.opint:
+ assert opcode.startswith('0b')
+ if '-' not in opcode:
+ opcode = int(opcode, 0)
+ else:
+ opcode = opcode[2:]
if not row['unit']:
continue
if self.row_subsetfn: