Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(FTB): Turn off FTB updates when FTB is closed. #3543

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 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
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,6 +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", s0_close_ftb_req && u_valid)

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