projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a6548d
)
assume 32-to-64 bit zero-extension
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 31 Mar 2020 15:29:00 +0000
(16:29 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 31 Mar 2020 15:29:00 +0000
(16:29 +0100)
src/soc/decoder/helpers.py
patch
|
blob
|
history
diff --git
a/src/soc/decoder/helpers.py
b/src/soc/decoder/helpers.py
index 849328d6543fb132711b24f6315ddda5df99a5ee..95aa28529ad0d5c7b3b861ea9019b8730da1b375 100644
(file)
--- a/
src/soc/decoder/helpers.py
+++ b/
src/soc/decoder/helpers.py
@@
-6,6
+6,9
@@
def exts(value, bits):
def EXTS64(value):
return exts(value, 32) & ((1<<64)-1)
+def EXTZ64(value):
+ return value & ((1<<32)-1)
+
def rotl(value, bits, wordlen):
mask = (1 << wordlen) - 1
bits = bits & (wordlen - 1)