Fix BTB not being refilled on some indirect jumps
We are overloading the BTB-hit signal to mean that any part of the frontend changed the control-flow, not just the BTB. That's the right thing to do for most of the control logic, but it means the BTB sometimes won't get refilled when we'd like it to. This commit makes the frontend use an invalid BTB entry number when it, rather than the BTB, changes the control flow. Since the entry number is invalid, the BTB will treat it as a miss and refill itself. This is kind of a hack, but a more palatable fix requires reworking the RVC IBuf, which I don't have time for right now.
This commit is contained in:
@ -259,6 +259,7 @@ class FrontendModule(outer: Frontend) extends LazyModuleImp(outer)
|
||||
when (taken) {
|
||||
fq.io.enq.bits.btb.valid := true
|
||||
fq.io.enq.bits.btb.bits.taken := true
|
||||
fq.io.enq.bits.btb.bits.entry := UInt(tileParams.btb.get.nEntries)
|
||||
s2_redirect := true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user