self.assertEqual(expected_cr, full_cr, code)
elif cr_en:
cr_sel = yield dec2.e.write_cr.data
+ expected_cr = simulator.cr.get_range().value
+ print(f"CR whole: {expected_cr:x}, sel {cr_sel}")
expected_cr = simulator.crl[cr_sel].get_range().value
real_cr = yield alu.n.data_o.cr.data
- print(f"CR whole: expected {expected_cr:x}, actual: {real_cr:x}")
+ print(f"CR part: expected {expected_cr:x}, actual: {real_cr:x}")
self.assertEqual(expected_cr, real_cr, code)
alu_out = yield alu.n.data_o.o.data
out_reg_valid = yield dec2.e.write_reg.ok
cri = sim.crl[7-i].get_range().value
print ("cr reg", i, hex(cri), i, hex(rval))
# XXX https://bugs.libre-soc.org/show_bug.cgi?id=363
- #self.assertEqual(cri, rval,
- # "cr reg %d not equal %s" % (i, repr(code)))
+ self.assertEqual(cri, rval,
+ "cr reg %d not equal %s" % (i, repr(code)))
sim.add_sync_process(process)
with sim.write_vcd("core_simulator.vcd", "core_simulator.gtkw",
unittest.main(exit=False)
suite = unittest.TestSuite()
suite.addTest(TestRunner(CRTestCase.test_data))
- #suite.addTest(TestRunner(ShiftRotTestCase.test_data))
- #suite.addTest(TestRunner(LogicalTestCase.test_data))
- #suite.addTest(TestRunner(ALUTestCase.test_data))
- #suite.addTest(TestRunner(BranchTestCase.test_data))
+ suite.addTest(TestRunner(ShiftRotTestCase.test_data))
+ suite.addTest(TestRunner(LogicalTestCase.test_data))
+ suite.addTest(TestRunner(ALUTestCase.test_data))
+ suite.addTest(TestRunner(BranchTestCase.test_data))
runner = unittest.TextTestRunner()
runner.run(suite)