Skip to content

Commit

Permalink
feat(ittage): when using old_entry, the strong bias of jalr should re…
Browse files Browse the repository at this point in the history
…main unchanged.
  • Loading branch information
sleep-zzz committed Oct 16, 2024
1 parent d2137e7 commit 1d1cc1b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/scala/xiangshan/frontend/NewFtq.scala
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,14 @@ class FTBEntryGen(implicit p: Parameters) extends XSModule with HasBackendRedire
val old_entry_always_taken = WireInit(oe)
val always_taken_modified_vec = Wire(Vec(numBr, Bool())) // whether modified or not
for (i <- 0 until numBr) {
old_entry_always_taken.strong_bias(i) :=
oe.strong_bias(i) && io.cfiIndex.valid && oe.brValids(i) && io.cfiIndex.bits === oe.brOffset(i)
if (i == numBr - 1){
//strong bias of jalr should remain unchanged
old_entry_always_taken.strong_bias(i) :=
oe.strong_bias(i) && io.cfiIndex.valid && io.cfiIndex.bits === oe.brOffset(i) && oe.tailSlot.valid
}else{
old_entry_always_taken.strong_bias(i) :=
oe.strong_bias(i) && io.cfiIndex.valid && oe.brValids(i) && io.cfiIndex.bits === oe.brOffset(i)
}
always_taken_modified_vec(i) := oe.strong_bias(i) && oe.brValids(i) && !old_entry_always_taken.strong_bias(i)
}
val always_taken_modified = always_taken_modified_vec.reduce(_||_)
Expand Down

0 comments on commit 1d1cc1b

Please sign in to comment.