From 3f32ad358d46fa5612c9a74340395d4e8508435b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 29 Jun 2020 13:28:08 +0100 Subject: [PATCH] whoops, hex parser digits are in multiples of 4 bits --- src/soc/decoder/pseudo/lexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/decoder/pseudo/lexer.py b/src/soc/decoder/pseudo/lexer.py index d05e8845..c768a450 100644 --- a/src/soc/decoder/pseudo/lexer.py +++ b/src/soc/decoder/pseudo/lexer.py @@ -325,7 +325,7 @@ class PowerLexer: def t_HEX(self, t): r"""0x[0-9a-fA-F_]+""" val = t.value.replace("_", "") - t.value = SelectableInt(int(val, 16), (len(val)-2)*16) + t.value = SelectableInt(int(val, 16), (len(val)-2)*4) # hex = nibble return t def t_BINARY(self, t): -- 2.30.2