projects
/
soc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix addi instruction, think a commit got lost
[soc.git]
/
src
/
soc
/
decoder
/
selectable_int.py
diff --git
a/src/soc/decoder/selectable_int.py
b/src/soc/decoder/selectable_int.py
index fb064fcb383bd54a5bf35bc4d445c2e8fc6a0f10..28e48f2e8d08315da3bf52a72aed6ddd94bfbbb6 100644
(file)
--- a/
src/soc/decoder/selectable_int.py
+++ b/
src/soc/decoder/selectable_int.py
@@
-159,6
+159,10
@@
class SelectableInt:
return onebit(other == self.value)
assert False
+ def narrow(self, bits):
+ assert bits <= self.bits
+ return SelectableInt(self.value, bits)
+
def __bool__(self):
return self.value != 0