chipsalliance / dromajo

RISC-V RV64GC emulator designed for RTL co-simulation
Apache License 2.0
210 stars 63 forks source link

Ebreak should not be cancelled under cosim mode #56

Closed Phantom1003 closed 2 years ago

Phantom1003 commented 2 years ago

I found that dromajo-cosim cancels ebreak in the except handle function, which causes dromajo-cosim to execute 2 instructions in a single step.

# main dromajo
0 1 0x0000000080000190 (0x00200193) x 3 0x0000000000000002
0 1 0x0000000080000194 (0x00100073) exception 3, tval 0000000000000000
0 1 0x00000000800001d0 (0x00300313) x 6 0x0000000000000003

# dromajo cosim
1 0x0000000080000190 (0x00200193) x3  0x0000000000000002 DASM(0x00200193)
1 0x00000000800001d0 (0x00300313) x6  0x0000000000000003 DASM(0x00300313)
et-tommythorn commented 2 years ago

Thanks for the patch. I'll assign to Mark who has some upcoming changes here.

Phantom1003 commented 2 years ago

Thanks