assume 32-to-64 bit zero-extension
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 31 Mar 2020 15:29:00 +0000 (16:29 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 31 Mar 2020 15:29:00 +0000 (16:29 +0100)
src/soc/decoder/helpers.py

index 849328d6543fb132711b24f6315ddda5df99a5ee..95aa28529ad0d5c7b3b861ea9019b8730da1b375 100644 (file)
@@ -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)