Repository navigation
ebu: reset the IFU's AHB fetch buffer - #1968
Conversation
The spill logic decodes the fetched instruction's low bits (EarlyCompressedF) even on a fetch that faults before reaching the bus, and then takes its data from the bus fetch buffer. rv32imc fetches everything from the IROM, so that buffer is never written and stays X in 4-state simulation. A jump to a nonexistent halfword-aligned address (riscv-arch-test ExceptionsSm cp_misaligned_priority_fetch_misaligned_ nonexistent, jalr to 0x2) then drove X into SelSpillNextF and the next PC, and Questa and VCS hung where Verilator, which starts flops at 0, took the access fault. Hardware traps correctly whatever the buffer holds, so this resets only the IFU's buffer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
|
Merge order: merge together with #1982. Both close the X / first-half-fault spill hole on the IFU side. #1982 likely stops the rv32imc hang reproducing on its own, which makes this the defense-in-depth half. Merge both. 🤖 Generated with Claude Code |
|
Should both the LSU and IFU reset FetchBuffer? |
No. The LSU's buffer only carries data: load data, uncached AMO operands, and PTEs in the no-D$ derivatives. Nothing reads it as control before a bus read fills it, and a load that faults before the bus never writes back. In the HPTW, a PTE read that takes an access fault checks |
The IFU's spill logic decodes the fetched instruction's low bits even on a fetch that faults before reaching the bus, taking the data from the AHB fetch buffer. rv32imc fetches everything from the IROM, so that buffer is never written and stays X in 4-state simulation: riscv-arch-test's
ExceptionsSmjump to the nonexistent halfword-aligned address 0x2 drove X intoSelSpillNextFand the next PC, and Questa and VCS hung where Verilator, which starts flops at 0, took the access fault. Hardware traps correctly whatever the buffer holds, so only the IFU's buffer gets a reset. With #1962 this leaves the nightly regression of #1963 with no known failures.🤖 Generated with Claude Code