From ad2a781681068595effb58e3bc4fae27dfaee773 Mon Sep 17 00:00:00 2001 From: Simon Thornington Date: Sat, 10 Apr 2021 13:58:32 -0400 Subject: [PATCH] fix value conversion for hex values --- litescope/software/driver/analyzer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litescope/software/driver/analyzer.py b/litescope/software/driver/analyzer.py index e432cb0..f92f468 100644 --- a/litescope/software/driver/analyzer.py +++ b/litescope/software/driver/analyzer.py @@ -94,7 +94,7 @@ class LiteScopeAnalyzerDriver: v <<= 4 if mx is not None else 1 m <<= 4 if mx is not None else 1 if c != "x": - v |= int(c) + v |= int(c, 16 if mx is not None else 2) m |= 0xf if mx is not None else 0b1 value |= getattr(self, k + "_o")*v mask |= getattr(self, k + "_m") & (getattr(self, k + "_o")*m)