Misaligned JAL(R) RD register writeback expectations #38
Comments
|
I guess this is effectively a duplicate of issue #26 so I’ll guess it will get same response! |
I don't think this is a dup of #26 because in #26 the core said it wrote a register when it should not, but you are saying the core reports that it does not write the destination register for a misaligned branch (as is the correct behavior) and the check is still complaining? That is weird. Are you sure the riscv-formal spec agrees that the instruction should trap, i.e. is |
|
The checker was in agreement that the trap should happen (spec_trap was high), however it also expects that the core continues to writeback to RD. I am not using compressed instructions. I can’t see that the checker has enough information to disambiguate what to do on the various fault causes. |
I don't think this is true. Currently the insn checker only checks rd writeback when spec_trap is low: riscv-formal/checks/rvfi_insn_check.sv Lines 149 to 158 in 726255f Arguably it should check that rd_addr = 0 and rd_wdata = 0 when spec_trap is high, but right now it doesn't check rd writeback at all in case of a trap. |
Hi,
If I've read this thread correctly;
riscv/riscv-isa-manual#269
@kasanovic says 'Misaligned address trap should be taken precisely, implying rd would not be updated.'
This appears to be not what the RVFI checkers are expecting when rvfi_trap is raised on an unaligned branch, as they barf on mismatching rd_addr/rd_wdata (if the DUT has indeed squashed the writeback to RD of the faulting JAL/JALR instructions).
Any thoughts?
The text was updated successfully, but these errors were encountered: