fix(abtb): fix abtb meta signal X-Propagation (#5028)

This commit is contained in:
Yuandongliang 2025-09-17 18:35:11 +08:00 committed by GitHub
parent ad7d606e59
commit de5fdd22b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -49,7 +49,13 @@ class AheadBtb(implicit p: Parameters) extends BasePredictor with Helpers {
}
io.resetDone := resetDone
private val takenCounter = Reg(Vec(NumBanks, Vec(NumSets, Vec(NumWays, new SaturateCounter(TakenCounterWidth)))))
private val takenCounter = RegInit(
VecInit.fill(NumBanks)(
VecInit.fill(NumSets)(
VecInit.fill(NumWays)(0.U.asTypeOf(new SaturateCounter(TakenCounterWidth)))
)
)
)
// TODO: write ctr bypass to read
// TODO: train after execution
@ -163,7 +169,7 @@ class AheadBtb(implicit p: Parameters) extends BasePredictor with Helpers {
// used for check abtb output
io.debug_startVAddr := s2_startPc
private val meta = Wire(new AheadBtbMeta)
private val meta = WireInit(0.U.asTypeOf(new AheadBtbMeta))
meta.valid := s2_valid
meta.hitMask := s2_hitMask
meta.taken := s2_taken