You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When spike encounters an unaligned access it splits it into single byte accesses. If one of these sees a bus error or a PMP failure it immediately causes an exception. In Ibex unaligned accesses are split in two and both accesses are tried regardless of bus errors and PMP failures of the other access.
This leads to co-sim mismatches in cases where unaligned accesses cross PMP boundaries (the co-sim framework can currently handle the difference in behaviour for bus errors). What Ibex does is architectural permissible so we should modify spike to match. I have a PR for this: lowRISC/riscv-isa-sim#23 though it also needs some changes on the co-sim side, as it currently removes outstanding unaligned accesses from the pending memory access queue on an error to help deal with the mismatch.
We can remove the co-sim behaviour that removes accesses for the pending memory access queue, that you can see at
// For any misaligned access that sees an error immediately indicate to
// spike the error has occured, so ensure the top pending access gets
// removed.
pending_access_done = true;
However this causes other errors.
This needs to be resolve, though can be done post V2. I've observed PMP tests correctly dealing with cross PMP region accesses so we have confidence this issue is not hiding a real RTL bug behind it.
estimate 4
The text was updated successfully, but these errors were encountered:
When spike encounters an unaligned access it splits it into single byte accesses. If one of these sees a bus error or a PMP failure it immediately causes an exception. In Ibex unaligned accesses are split in two and both accesses are tried regardless of bus errors and PMP failures of the other access.
This leads to co-sim mismatches in cases where unaligned accesses cross PMP boundaries (the co-sim framework can currently handle the difference in behaviour for bus errors). What Ibex does is architectural permissible so we should modify spike to match. I have a PR for this: lowRISC/riscv-isa-sim#23 though it also needs some changes on the co-sim side, as it currently removes outstanding unaligned accesses from the pending memory access queue on an error to help deal with the mismatch.
We can remove the co-sim behaviour that removes accesses for the pending memory access queue, that you can see at
ibex/dv/cosim/spike_cosim.cc
Lines 882 to 892 in 726eb97
However this causes other errors.
This needs to be resolve, though can be done post V2. I've observed PMP tests correctly dealing with cross PMP region accesses so we have confidence this issue is not hiding a real RTL bug behind it.
The text was updated successfully, but these errors were encountered: