提交 951c6ac9 编写于 作者: Y Yinan Xu

emu: break on assertion failures after eval

上级 9d2364d6
......@@ -291,6 +291,11 @@ uint64_t Emulator::execute(uint64_t max_cycle, uint64_t max_instr) {
max_cycle --;
if (dut_ptr->io_trap_valid) trapCode = dut_ptr->io_trap_code;
if (assert_count > 0) {
difftest_display(dut_ptr->io_difftest_priviledgeMode);
eprintf("The simulation stopped. There might be some assertion failed.\n");
trapCode = STATE_ABORT;
}
if (trapCode != STATE_RUNNING) break;
if (lastcommit - max_cycle > stuck_limit && hascommit) {
......@@ -378,12 +383,6 @@ uint64_t Emulator::execute(uint64_t max_cycle, uint64_t max_instr) {
#endif
}
if (assert_count > 0) {
difftest_display(dut_ptr->io_difftest_priviledgeMode);
eprintf("The simulation stopped. There might be some assertion failed.\n");
trapCode = STATE_ABORT;
}
#if VM_TRACE == 1
if (enable_waveform) tfp->close();
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册