better reporting on gpr comparisons
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 30 Apr 2021 10:19:28 +0000 (11:19 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 30 Apr 2021 10:19:28 +0000 (11:19 +0100)
src/soc/simple/test/test_core.py

index ff1ce52b24eb38e9c3531a6232600f6e8e5537cb..c40644c75a0491565647a07668e138a17b8fe941 100644 (file)
@@ -154,7 +154,8 @@ def check_regs(dut, sim, core, test, code):
     for i in range(32):
         simregval = sim.gpr[i].asint()
         dut.assertEqual(simregval, intregs[i],
-                        "int reg %d not equal %s" % (i, repr(code)))
+                        "int reg %d not equal %s. got %x expected %x" % \
+                            (i, repr(code), simregval, intregs[i]))
 
     # CRs
     crregs = []