From 217262b9c7f33680dcffa6a52df64c61ebc44813 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 31 Mar 2020 16:29:00 +0100 Subject: [PATCH] assume 32-to-64 bit zero-extension --- src/soc/decoder/helpers.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.30.2