From 886857fa47b4a201c6cf90f16f038e9796b442ae Mon Sep 17 00:00:00 2001 From: Rimas Avizienis Date: Tue, 15 Nov 2011 18:07:36 -0800 Subject: [PATCH] writes of PC weren't being sign extended --- rocket/src/main/scala/dpath.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocket/src/main/scala/dpath.scala b/rocket/src/main/scala/dpath.scala index 7129fc4e..63ab7698 100644 --- a/rocket/src/main/scala/dpath.scala +++ b/rocket/src/main/scala/dpath.scala @@ -373,7 +373,7 @@ class rocketDpath extends Component // writeback select mux ex_wdata := Mux(ex_reg_ctrl_ll_wb || ex_reg_ctrl_wen_pcr, ex_reg_rs1, - Mux(ex_reg_ctrl_sel_wb === WB_PC, ex_reg_pc_plus4, + Mux(ex_reg_ctrl_sel_wb === WB_PC, Cat(Fill(64-VADDR_BITS, ex_reg_pc_plus4(VADDR_BITS-1)), ex_reg_pc_plus4), Mux(ex_reg_ctrl_sel_wb === WB_ALU, ex_alu_out, Mux(ex_reg_ctrl_sel_wb === WB_PCR, ex_pcr, Bits(0, 64))))).toBits;