Skip to content

Commit

Permalink
Fix usage of IF1 state in IF2 branch pred fallback logic (black-parro…
Browse files Browse the repository at this point in the history
  • Loading branch information
WasabiFan authored May 25, 2021
1 parent 3d3db55 commit 7842ff4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bp_fe/src/v/bp_fe_pc_gen.sv
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ module bp_fe_pc_gen
);
assign return_addr_n = pc_if2_r + vaddr_width_p'(4);

wire btb_miss_ras = ~pred_if1_r.btb | (pc_if1_r != ras_tgt_lo);
wire btb_miss_br = ~pred_if1_r.btb | (pc_if1_r != br_tgt_lo);
wire btb_miss_ras = pc_if1_r != ras_tgt_lo;
wire btb_miss_br = pc_if1_r != br_tgt_lo;
assign ovr_ret = btb_miss_ras & is_ret;
assign ovr_taken = btb_miss_br & ((is_br & pred_if1_r.bht[1]) | is_jal);
assign ovr_taken = btb_miss_br & ((is_br & pred_if2_r.bht[1]) | is_jal);
assign ovr_o = ovr_taken | ovr_ret;
assign br_tgt_lo = pc_if2_r + scan_instr.imm;
assign fetch_pc_o = pc_if2_r;
Expand Down

0 comments on commit 7842ff4

Please sign in to comment.