improve debug for test_sim.py
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 6 Jul 2020 19:19:48 +0000 (20:19 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 6 Jul 2020 19:19:48 +0000 (20:19 +0100)
src/soc/simulator/test_sim.py

index f6a52fc9491a1ee6a17560f61ce2d6b17dd0c4d3..e6b09667da10fe77f0eaf49c28ab066b0296f00a 100644 (file)
@@ -294,7 +294,8 @@ class DecoderBase:
         for reg in regs:
             qemu_val = qemu.get_register(reg)
             sim_val = sim.gpr(reg).value
-            self.assertEqual(qemu_val, sim_val)
+            self.assertEqual(qemu_val, sim_val,
+                             "expect %x got %x" % (qemu_val, sim_val))
 
 
 class DecoderTestCase(DecoderBase, GeneralTestCases):