Fix RV64 badaddr value on instruction faults with large addresses
We were relying on ALU passthrough for this, but failed to override the ALU dw argument, so bits above 31 could be discarded.
This commit is contained in:
@ -322,6 +322,7 @@ class Rocket(implicit p: Parameters) extends CoreModule()(p) {
|
||||
ex_ctrl.csr := id_csr
|
||||
when (id_xcpt) { // pass PC down ALU writeback pipeline for badaddr
|
||||
ex_ctrl.alu_fn := ALU.FN_ADD
|
||||
ex_ctrl.alu_dw := DW_XPR
|
||||
ex_ctrl.sel_alu1 := A1_PC
|
||||
ex_ctrl.sel_alu2 := A2_ZERO
|
||||
when (!bpu.io.xcpt_if && !ibuf.io.inst(0).bits.pf0 && ibuf.io.inst(0).bits.pf1) { // PC+2
|
||||
|
Reference in New Issue
Block a user