1/*************************************************************************************** 2* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences 3* Copyright (c) 2020-2021 Peng Cheng Laboratory 4* 5* XiangShan is licensed under Mulan PSL v2. 6* You can use this software according to the terms and conditions of the Mulan PSL v2. 7* You may obtain a copy of Mulan PSL v2 at: 8* http://license.coscl.org.cn/MulanPSL2 9* 10* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 11* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 12* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 13* 14* See the Mulan PSL v2 for more details. 15* 16* 17* Acknowledgement 18* 19* This implementation is inspired by several key papers: 20* [1] André Seznec. "[Tage-sc-l branch predictors.](https://inria.hal.science/hal-01086920)" The Journal of 21* Instruction-Level Parallelism (JILP) 4th JILP Workshop on Computer Architecture Competitions (JWAC): Championship 22* Branch Prediction (CBP). 2014. 23* [2] André Seznec. "[Tage-sc-l branch predictors again.](https://inria.hal.science/hal-01354253)" The Journal of 24* Instruction-Level Parallelism (JILP) 5th JILP Workshop on Computer Architecture Competitions (JWAC): Championship 25* Branch Prediction (CBP). 2016. 26***************************************************************************************/ 27 28package xiangshan.frontend 29 30import chisel3._ 31import chisel3.util._ 32import org.chipsalliance.cde.config.Parameters 33import scala.{Tuple2 => &} 34import scala.math.min 35import utility._ 36import xiangshan._ 37 38trait HasSCParameter extends TageParams {} 39 40class SCReq(implicit p: Parameters) extends TageReq 41 42abstract class SCBundle(implicit p: Parameters) extends TageBundle with HasSCParameter {} 43abstract class SCModule(implicit p: Parameters) extends TageModule with HasSCParameter {} 44 45class SCMeta(val ntables: Int)(implicit p: Parameters) extends XSBundle with HasSCParameter { 46 val scPreds = Vec(numBr, Bool()) 47 // Suppose ctrbits of all tables are identical 48 val ctrs = Vec(numBr, Vec(ntables, SInt(SCCtrBits.W))) 49} 50 51class SCResp(val ctrBits: Int = 6)(implicit p: Parameters) extends SCBundle { 52 val ctrs = Vec(numBr, Vec(2, SInt(ctrBits.W))) 53} 54 55class SCUpdate(val ctrBits: Int = 6)(implicit p: Parameters) extends SCBundle { 56 val pc = UInt(VAddrBits.W) 57 val ghist = UInt(HistoryLength.W) 58 val mask = Vec(numBr, Bool()) 59 val oldCtrs = Vec(numBr, SInt(ctrBits.W)) 60 val tagePreds = Vec(numBr, Bool()) 61 val takens = Vec(numBr, Bool()) 62} 63 64class SCTableIO(val ctrBits: Int = 6)(implicit p: Parameters) extends SCBundle { 65 val req = Input(Valid(new SCReq)) 66 val resp = Output(new SCResp(ctrBits)) 67 val update = Input(new SCUpdate(ctrBits)) 68} 69 70class SCTable(val nRows: Int, val ctrBits: Int, val histLen: Int)(implicit p: Parameters) 71 extends SCModule with HasFoldedHistory { 72 val io = IO(new SCTableIO(ctrBits)) 73 74 // val table = Module(new SRAMTemplate(SInt(ctrBits.W), set=nRows, way=2*TageBanks, shouldReset=true, holdRead=true, singlePort=false)) 75 val table = Module(new SRAMTemplate( 76 SInt(ctrBits.W), 77 set = nRows, 78 way = 2 * TageBanks, 79 shouldReset = true, 80 holdRead = true, 81 singlePort = false, 82 bypassWrite = true 83 )) 84 85 // def getIdx(hist: UInt, pc: UInt) = { 86 // (compute_folded_ghist(hist, log2Ceil(nRows)) ^ (pc >> instOffsetBits))(log2Ceil(nRows)-1,0) 87 // } 88 89 val idxFhInfo = (histLen, min(log2Ceil(nRows), histLen)) 90 91 def getFoldedHistoryInfo = Set(idxFhInfo).filter(_._1 > 0) 92 93 def getIdx(pc: UInt, allFh: AllFoldedHistories) = 94 if (histLen > 0) { 95 val idx_fh = allFh.getHistWithInfo(idxFhInfo).folded_hist 96 // require(idx_fh.getWidth == log2Ceil(nRows)) 97 ((pc >> instOffsetBits) ^ idx_fh)(log2Ceil(nRows) - 1, 0) 98 } else { 99 (pc >> instOffsetBits)(log2Ceil(nRows) - 1, 0) 100 } 101 102 def ctrUpdate(ctr: SInt, cond: Bool): SInt = signedSatUpdate(ctr, ctrBits, cond) 103 104 val s0_idx = getIdx(io.req.bits.pc, io.req.bits.folded_hist) 105 val s1_idx = RegEnable(s0_idx, io.req.valid) 106 107 val s1_pc = RegEnable(io.req.bits.pc, io.req.fire) 108 val s1_unhashed_idx = s1_pc >> instOffsetBits 109 110 table.io.r.req.valid := io.req.valid 111 table.io.r.req.bits.setIdx := s0_idx 112 113 val update_wdata = Wire(Vec(numBr, SInt(ctrBits.W))) // correspond to physical bridx 114 val update_wdata_packed = VecInit(update_wdata.map(Seq.fill(2)(_)).reduce(_ ++ _)) 115 val updateWayMask = Wire(Vec(2 * numBr, Bool())) // correspond to physical bridx 116 117 val update_unhashed_idx = io.update.pc >> instOffsetBits 118 for (pi <- 0 until numBr) { 119 updateWayMask(2 * pi) := Seq.tabulate(numBr)(li => 120 io.update.mask(li) && get_phy_br_idx(update_unhashed_idx, li) === pi.U && !io.update.tagePreds(li) 121 ).reduce(_ || _) 122 updateWayMask(2 * pi + 1) := Seq.tabulate(numBr)(li => 123 io.update.mask(li) && get_phy_br_idx(update_unhashed_idx, li) === pi.U && io.update.tagePreds(li) 124 ).reduce(_ || _) 125 } 126 127 val update_folded_hist = WireInit(0.U.asTypeOf(new AllFoldedHistories(foldedGHistInfos))) 128 if (histLen > 0) { 129 update_folded_hist.getHistWithInfo(idxFhInfo).folded_hist := compute_folded_ghist(io.update.ghist, log2Ceil(nRows)) 130 } 131 val update_idx = getIdx(io.update.pc, update_folded_hist) 132 133 // SCTable dual port SRAM reads and writes to the same address processing 134 val conflict_buffer_valid = RegInit(false.B) 135 val conflict_buffer_data = RegInit(0.U.asTypeOf(update_wdata_packed)) 136 val conflict_buffer_idx = RegInit(0.U.asTypeOf(update_idx)) 137 val conflict_buffer_waymask = RegInit(0.U.asTypeOf(updateWayMask)) 138 139 val write_conflict = update_idx === s0_idx && io.update.mask.reduce(_ || _) && io.req.valid 140 val can_write = (conflict_buffer_idx =/= s0_idx || !io.req.valid) && conflict_buffer_valid 141 142 when(write_conflict) { 143 conflict_buffer_valid := true.B 144 conflict_buffer_data := update_wdata_packed 145 conflict_buffer_idx := update_idx 146 conflict_buffer_waymask := updateWayMask 147 } 148 when(can_write) { 149 conflict_buffer_valid := false.B 150 } 151 152 // Using buffer data for prediction 153 val use_conflict_data = conflict_buffer_valid && conflict_buffer_idx === s1_idx 154 val conflict_data_bypass = conflict_buffer_data.zip(conflict_buffer_waymask).map { case (data, mask) => 155 Mux(mask, data, 0.U.asTypeOf(data)) 156 } 157 val conflict_prediction_data = conflict_data_bypass.sliding(2, 2).toSeq.map(VecInit(_)) 158 val per_br_ctrs_unshuffled = table.io.r.resp.data.sliding(2, 2).toSeq.map(VecInit(_)) 159 val per_br_ctrs = VecInit((0 until numBr).map(i => 160 Mux1H( 161 UIntToOH(get_phy_br_idx(s1_unhashed_idx, i), numBr), 162 per_br_ctrs_unshuffled 163 ) 164 )) 165 val conflict_br_ctrs = VecInit((0 until numBr).map(i => 166 Mux1H( 167 UIntToOH(get_phy_br_idx(s1_unhashed_idx, i), numBr), 168 conflict_prediction_data 169 ) 170 )) 171 172 io.resp.ctrs := Mux(use_conflict_data, conflict_br_ctrs, per_br_ctrs) 173 174 table.io.w.apply( 175 valid = (io.update.mask.reduce(_ || _) && !write_conflict) || can_write, 176 data = Mux(can_write, conflict_buffer_data, update_wdata_packed), 177 setIdx = Mux(can_write, conflict_buffer_idx, update_idx), 178 waymask = Mux(can_write, conflict_buffer_waymask.asUInt, updateWayMask.asUInt) 179 ) 180 181 val wrBypassEntries = 16 182 183 // let it corresponds to logical brIdx 184 val wrbypasses = Seq.fill(numBr)(Module(new WrBypass(SInt(ctrBits.W), wrBypassEntries, log2Ceil(nRows), numWays = 2))) 185 186 for (pi <- 0 until numBr) { 187 val br_lidx = get_lgc_br_idx(update_unhashed_idx, pi.U(log2Ceil(numBr).W)) 188 189 val wrbypass_io = Mux1H(UIntToOH(br_lidx, numBr), wrbypasses.map(_.io)) 190 191 val ctrPos = Mux1H(UIntToOH(br_lidx, numBr), io.update.tagePreds) 192 val bypass_ctr = wrbypass_io.hit_data(ctrPos) 193 val previous_ctr = Mux1H(UIntToOH(br_lidx, numBr), io.update.oldCtrs) 194 val hit_and_valid = wrbypass_io.hit && bypass_ctr.valid 195 val oldCtr = Mux(hit_and_valid, bypass_ctr.bits, previous_ctr) 196 val taken = Mux1H(UIntToOH(br_lidx, numBr), io.update.takens) 197 update_wdata(pi) := ctrUpdate(oldCtr, taken) 198 } 199 200 val per_br_update_wdata_packed = update_wdata_packed.sliding(2, 2).map(VecInit(_)).toSeq 201 val per_br_update_way_mask = updateWayMask.sliding(2, 2).map(VecInit(_)).toSeq 202 for (li <- 0 until numBr) { 203 val wrbypass = wrbypasses(li) 204 val br_pidx = get_phy_br_idx(update_unhashed_idx, li) 205 wrbypass.io.wen := io.update.mask(li) 206 wrbypass.io.write_idx := update_idx 207 wrbypass.io.write_data := Mux1H(UIntToOH(br_pidx, numBr), per_br_update_wdata_packed) 208 wrbypass.io.write_way_mask.map(_ := Mux1H(UIntToOH(br_pidx, numBr), per_br_update_way_mask)) 209 } 210 211 val u = io.update 212 XSDebug( 213 io.req.valid, 214 p"scTableReq: pc=0x${Hexadecimal(io.req.bits.pc)}, " + 215 p"s0_idx=${s0_idx}\n" 216 ) 217 XSDebug( 218 RegNext(io.req.valid), 219 p"scTableResp: s1_idx=${s1_idx}," + 220 p"ctr:${io.resp.ctrs}\n" 221 ) 222 XSDebug( 223 io.update.mask.reduce(_ || _), 224 p"update Table: pc:${Hexadecimal(u.pc)}, " + 225 p"tageTakens:${u.tagePreds}, taken:${u.takens}, oldCtr:${u.oldCtrs}\n" 226 ) 227} 228 229class SCThreshold(val ctrBits: Int = 6)(implicit p: Parameters) extends SCBundle { 230 val ctr = UInt(ctrBits.W) 231 def satPos(ctr: UInt = this.ctr) = ctr === ((1.U << ctrBits) - 1.U) 232 def satNeg(ctr: UInt = this.ctr) = ctr === 0.U 233 def neutralVal = (1 << (ctrBits - 1)).U 234 val thres = UInt(8.W) 235 def initVal = 6.U 236 def minThres = 6.U 237 def maxThres = 31.U 238 def update(cause: Bool): SCThreshold = { 239 val res = Wire(new SCThreshold(this.ctrBits)) 240 val newCtr = satUpdate(this.ctr, this.ctrBits, cause) 241 val newThres = Mux( 242 res.satPos(newCtr) && this.thres <= maxThres, 243 this.thres + 2.U, 244 Mux(res.satNeg(newCtr) && this.thres >= minThres, this.thres - 2.U, this.thres) 245 ) 246 res.thres := newThres 247 res.ctr := Mux(res.satPos(newCtr) || res.satNeg(newCtr), res.neutralVal, newCtr) 248 // XSDebug(true.B, p"scThres Update: cause${cause} newCtr ${newCtr} newThres ${newThres}\n") 249 res 250 } 251} 252 253object SCThreshold { 254 def apply(bits: Int)(implicit p: Parameters) = { 255 val t = Wire(new SCThreshold(ctrBits = bits)) 256 t.ctr := t.neutralVal 257 t.thres := t.initVal 258 t 259 } 260} 261 262trait HasSC extends HasSCParameter with HasPerfEvents { this: Tage => 263 val update_on_mispred, update_on_unconf = WireInit(0.U.asTypeOf(Vec(TageBanks, Bool()))) 264 var sc_fh_info = Set[FoldedHistoryInfo]() 265 if (EnableSC) { 266 val scTables = SCTableInfos.map { 267 case (nRows, ctrBits, histLen) => { 268 val t = Module(new SCTable(nRows / TageBanks, ctrBits, histLen)) 269 val req = t.io.req 270 req.valid := io.s0_fire(3) 271 req.bits.pc := s0_pc_dup(3) 272 req.bits.folded_hist := io.in.bits.folded_hist(3) 273 req.bits.ghist := DontCare 274 if (!EnableSC) { t.io.update := DontCare } 275 t 276 } 277 } 278 sc_fh_info = scTables.map(_.getFoldedHistoryInfo).reduce(_ ++ _).toSet 279 280 val scThresholds = List.fill(TageBanks)(RegInit(SCThreshold(5))) 281 val useThresholds = VecInit(scThresholds map (_.thres)) 282 283 def sign(x: SInt) = x(x.getWidth - 1) 284 def pos(x: SInt) = !sign(x) 285 def neg(x: SInt) = sign(x) 286 287 def aboveThreshold(scSum: SInt, tagePvdr: SInt, threshold: UInt): Bool = { 288 val signedThres = threshold.zext 289 val totalSum = scSum +& tagePvdr 290 (scSum > signedThres - tagePvdr) && pos(totalSum) || 291 (scSum < -signedThres - tagePvdr) && neg(totalSum) 292 } 293 val updateThresholds = VecInit(useThresholds map (t => (t << 3) +& 21.U)) 294 295 val s1_scResps = VecInit(scTables.map(t => t.io.resp)) 296 297 val scUpdateMask = WireInit(0.U.asTypeOf(Vec(numBr, Vec(SCNTables, Bool())))) 298 val scUpdateTagePreds = Wire(Vec(TageBanks, Bool())) 299 val scUpdateTakens = Wire(Vec(TageBanks, Bool())) 300 val scUpdateOldCtrs = Wire(Vec(numBr, Vec(SCNTables, SInt(SCCtrBits.W)))) 301 scUpdateTagePreds := DontCare 302 scUpdateTakens := DontCare 303 scUpdateOldCtrs := DontCare 304 305 val updateSCMeta = updateMeta.scMeta.get 306 307 val s2_sc_used, s2_conf, s2_unconf, s2_agree, s2_disagree = 308 WireInit(0.U.asTypeOf(Vec(TageBanks, Bool()))) 309 val update_sc_used, update_conf, update_unconf, update_agree, update_disagree = 310 WireInit(0.U.asTypeOf(Vec(TageBanks, Bool()))) 311 val sc_misp_tage_corr, sc_corr_tage_misp = 312 WireInit(0.U.asTypeOf(Vec(TageBanks, Bool()))) 313 314 // for sc ctrs 315 def getCentered(ctr: SInt): SInt = Cat(ctr, 1.U(1.W)).asSInt 316 // for tage ctrs, (2*(ctr-4)+1)*8 317 def getPvdrCentered(ctr: UInt): SInt = Cat(ctr ^ (1 << (TageCtrBits - 1)).U, 1.U(1.W), 0.U(3.W)).asSInt 318 319 val scMeta = resp_meta.scMeta.get 320 scMeta := DontCare 321 for (w <- 0 until TageBanks) { 322 // do summation in s2 323 val s1_scTableSums = VecInit( 324 (0 to 1) map { i => 325 ParallelSingedExpandingAdd(s1_scResps map (r => getCentered(r.ctrs(w)(i)))) // TODO: rewrite with wallace tree 326 } 327 ) 328 val s2_scTableSums = RegEnable(s1_scTableSums, io.s1_fire(3)) 329 val s2_tagePrvdCtrCentered = getPvdrCentered(RegEnable(s1_providerResps(w).ctr, io.s1_fire(3))) 330 val s2_totalSums = s2_scTableSums.map(_ +& s2_tagePrvdCtrCentered) 331 val s2_sumAboveThresholds = 332 VecInit((0 to 1).map(i => aboveThreshold(s2_scTableSums(i), s2_tagePrvdCtrCentered, useThresholds(w)))) 333 val s2_scPreds = VecInit(s2_totalSums.map(_ >= 0.S)) 334 335 val s2_scResps = VecInit(RegEnable(s1_scResps, io.s1_fire(3)).map(_.ctrs(w))) 336 val s2_scCtrs = VecInit(s2_scResps.map(_(s2_tageTakens_dup(3)(w).asUInt))) 337 val s2_chooseBit = s2_tageTakens_dup(3)(w) 338 339 val s2_pred = 340 Mux(s2_provideds(w) && s2_sumAboveThresholds(s2_chooseBit), s2_scPreds(s2_chooseBit), s2_tageTakens_dup(3)(w)) 341 342 val s3_disagree = RegEnable(s2_disagree, io.s2_fire(3)) 343 io.out.last_stage_spec_info.sc_disagree.map(_ := s3_disagree) 344 345 scMeta.scPreds(w) := RegEnable(s2_scPreds(s2_chooseBit), io.s2_fire(3)) 346 scMeta.ctrs(w) := RegEnable(s2_scCtrs, io.s2_fire(3)) 347 348 when(s2_provideds(w)) { 349 s2_sc_used(w) := true.B 350 s2_unconf(w) := !s2_sumAboveThresholds(s2_chooseBit) 351 s2_conf(w) := s2_sumAboveThresholds(s2_chooseBit) 352 // Use prediction from Statistical Corrector 353 XSDebug(p"---------tage_bank_${w} provided so that sc used---------\n") 354 when(s2_sumAboveThresholds(s2_chooseBit)) { 355 val pred = s2_scPreds(s2_chooseBit) 356 val debug_pc = Cat(debug_pc_s2, w.U, 0.U(instOffsetBits.W)) 357 s2_agree(w) := s2_tageTakens_dup(3)(w) === pred 358 s2_disagree(w) := s2_tageTakens_dup(3)(w) =/= pred 359 // fit to always-taken condition 360 // io.out.s2.full_pred.br_taken_mask(w) := pred 361 XSDebug(p"pc(${Hexadecimal(debug_pc)}) SC(${w.U}) overriden pred to ${pred}\n") 362 } 363 } 364 365 val s3_pred_dup = io.s2_fire.map(f => RegEnable(s2_pred, f)) 366 val sc_enable_dup = dup(RegNext(io.ctrl.sc_enable)) 367 for ( 368 sc_enable & fp & s3_pred <- 369 sc_enable_dup zip io.out.s3.full_pred zip s3_pred_dup 370 ) { 371 when(sc_enable) { 372 fp.br_taken_mask(w) := s3_pred 373 } 374 } 375 376 val updateTageMeta = updateMeta 377 when(updateValids(w) && updateTageMeta.providers(w).valid) { 378 val scPred = updateSCMeta.scPreds(w) 379 val tagePred = updateTageMeta.takens(w) 380 val taken = update.br_taken_mask(w) 381 val scOldCtrs = updateSCMeta.ctrs(w) 382 val pvdrCtr = updateTageMeta.providerResps(w).ctr 383 val tableSum = ParallelSingedExpandingAdd(scOldCtrs.map(getCentered)) 384 val totalSumAbs = (tableSum +& getPvdrCentered(pvdrCtr)).abs.asUInt 385 val updateThres = updateThresholds(w) 386 val sumAboveThreshold = aboveThreshold(tableSum, getPvdrCentered(pvdrCtr), updateThres) 387 scUpdateTagePreds(w) := tagePred 388 scUpdateTakens(w) := taken 389 (scUpdateOldCtrs(w) zip scOldCtrs).foreach { case (t, c) => t := c } 390 391 update_sc_used(w) := true.B 392 update_unconf(w) := !sumAboveThreshold 393 update_conf(w) := sumAboveThreshold 394 update_agree(w) := scPred === tagePred 395 update_disagree(w) := scPred =/= tagePred 396 sc_corr_tage_misp(w) := scPred === taken && tagePred =/= taken && update_conf(w) 397 sc_misp_tage_corr(w) := scPred =/= taken && tagePred === taken && update_conf(w) 398 399 val thres = useThresholds(w) 400 when(scPred =/= tagePred && totalSumAbs >= thres - 4.U && totalSumAbs <= thres - 2.U) { 401 val newThres = scThresholds(w).update(scPred =/= taken) 402 scThresholds(w) := newThres 403 XSDebug(p"scThres $w update: old ${useThresholds(w)} --> new ${newThres.thres}\n") 404 } 405 406 when(scPred =/= taken || !sumAboveThreshold) { 407 scUpdateMask(w).foreach(_ := true.B) 408 XSDebug( 409 tableSum < 0.S, 410 p"scUpdate: bank(${w}), scPred(${scPred}), tagePred(${tagePred}), " + 411 p"scSum(-${tableSum.abs}), mispred: sc(${scPred =/= taken}), tage(${updateMisPreds(w)})\n" 412 ) 413 XSDebug( 414 tableSum >= 0.S, 415 p"scUpdate: bank(${w}), scPred(${scPred}), tagePred(${tagePred}), " + 416 p"scSum(+${tableSum.abs}), mispred: sc(${scPred =/= taken}), tage(${updateMisPreds(w)})\n" 417 ) 418 XSDebug(p"bank(${w}), update: sc: ${updateSCMeta}\n") 419 update_on_mispred(w) := scPred =/= taken 420 update_on_unconf(w) := scPred === taken 421 } 422 } 423 } 424 425 val realWens = scUpdateMask.transpose.map(v => v.reduce(_ | _)) 426 for (b <- 0 until TageBanks) { 427 for (i <- 0 until SCNTables) { 428 val realWen = realWens(i) 429 scTables(i).io.update.mask(b) := RegNext(scUpdateMask(b)(i)) 430 scTables(i).io.update.tagePreds(b) := RegEnable(scUpdateTagePreds(b), realWen) 431 scTables(i).io.update.takens(b) := RegEnable(scUpdateTakens(b), realWen) 432 scTables(i).io.update.oldCtrs(b) := RegEnable(scUpdateOldCtrs(b)(i), realWen) 433 scTables(i).io.update.pc := RegEnable(update.pc, realWen) 434 scTables(i).io.update.ghist := RegEnable(io.update.bits.ghist, realWen) 435 } 436 } 437 438 tage_perf("sc_conf", PopCount(s2_conf), PopCount(update_conf)) 439 tage_perf("sc_unconf", PopCount(s2_unconf), PopCount(update_unconf)) 440 tage_perf("sc_agree", PopCount(s2_agree), PopCount(update_agree)) 441 tage_perf("sc_disagree", PopCount(s2_disagree), PopCount(update_disagree)) 442 tage_perf("sc_used", PopCount(s2_sc_used), PopCount(update_sc_used)) 443 XSPerfAccumulate("sc_update_on_mispred", PopCount(update_on_mispred)) 444 XSPerfAccumulate("sc_update_on_unconf", PopCount(update_on_unconf)) 445 XSPerfAccumulate("sc_mispred_but_tage_correct", PopCount(sc_misp_tage_corr)) 446 XSPerfAccumulate("sc_correct_and_tage_wrong", PopCount(sc_corr_tage_misp)) 447 448 } 449 450 override def getFoldedHistoryInfo = Some(tage_fh_info ++ sc_fh_info) 451 452 override val perfEvents = Seq( 453 ("tage_tht_hit ", PopCount(updateMeta.providers.map(_.valid))), 454 ("sc_update_on_mispred ", PopCount(update_on_mispred)), 455 ("sc_update_on_unconf ", PopCount(update_on_unconf)) 456 ) 457 generatePerfEvent() 458} 459