From: Luke Kenneth Casson Leighton Date: Tue, 31 Mar 2020 15:29:00 +0000 (+0100) Subject: assume 32-to-64 bit zero-extension X-Git-Tag: div_pipeline~1588 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=217262b9c7f33680dcffa6a52df64c61ebc44813;p=soc.git assume 32-to-64 bit zero-extension --- diff --git a/src/soc/decoder/helpers.py b/src/soc/decoder/helpers.py index 849328d6..95aa2852 100644 --- 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)