Skip to content

Commit

Permalink
fix(FTB): use s0_close_ftb_req to turn off FTB updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleep-zzz committed Sep 12, 2024
1 parent f3984f3 commit 6c6afed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/xiangshan/frontend/FTB.scala
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ class FTB(implicit p: Parameters) extends BasePredictor with FTBParams with BPUU
val update = io.update.bits

val u_meta = update.meta.asTypeOf(new FTBMeta)
val u_valid = io.update.valid && !io.update.bits.old_entry && !s2_close_ftb_req
val u_valid = io.update.valid && !io.update.bits.old_entry && !s0_close_ftb_req

val (_, delay2_pc) = DelayNWithValid(update.pc, u_valid, 2)
val (_, delay2_entry) = DelayNWithValid(update.ftb_entry, u_valid, 2)
Expand Down Expand Up @@ -807,7 +807,7 @@ class FTB(implicit p: Parameters) extends BasePredictor with FTBParams with BPUU
XSPerfAccumulate("ftb_update_req", io.update.valid)
XSPerfAccumulate("ftb_update_ignored", io.update.valid && io.update.bits.old_entry)
XSPerfAccumulate("ftb_updated", u_valid)
XSPerfAccumulate("ftb_closing_update_counter", s2_close_ftb_req && u_valid)
XSPerfAccumulate("ftb_closing_update_counter", s0_close_ftb_req && u_valid)

override val perfEvents = Seq(
("ftb_commit_hits ", io.update.valid && u_meta.hit),
Expand Down

0 comments on commit 6c6afed

Please sign in to comment.