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***************************************************************************************/ 16package xiangshan.frontend 17 18import chipsalliance.rocketchip.config.Parameters 19import chisel3._ 20import chisel3.util._ 21import chisel3.experimental.chiselName 22import xiangshan._ 23import utils._ 24import scala.math._ 25 26@chiselName 27class FetchRequestBundle(implicit p: Parameters) extends XSBundle { 28 val startAddr = UInt(VAddrBits.W) 29 val fallThruAddr = UInt(VAddrBits.W) 30 val fallThruError = Bool() 31 val ftqIdx = new FtqPtr 32 val ftqOffset = ValidUndirectioned(UInt(log2Ceil(PredictWidth).W)) 33 val target = UInt(VAddrBits.W) 34 val oversize = Bool() 35 36 def fromFtqPcBundle(b: Ftq_RF_Components) = { 37 val ftError = b.fallThroughError() 38 this.startAddr := b.startAddr 39 this.fallThruError := ftError 40 this.fallThruAddr := Mux(ftError, b.nextRangeAddr, b.getFallThrough()) 41 this.oversize := b.oversize 42 this 43 } 44 def fromBpuResp(resp: BranchPredictionBundle) = { 45 // only used to bypass, so some fields remains unchanged 46 this.startAddr := resp.pc 47 this.target := resp.target 48 this.ftqOffset := resp.genCfiIndex 49 this.fallThruAddr := resp.fallThroughAddr 50 this.oversize := resp.ftb_entry.oversize 51 this 52 } 53 override def toPrintable: Printable = { 54 p"[start] ${Hexadecimal(startAddr)} [pft] ${Hexadecimal(fallThruAddr)}" + 55 p"[tgt] ${Hexadecimal(target)} [ftqIdx] $ftqIdx [jmp] v:${ftqOffset.valid}" + 56 p" offset: ${ftqOffset.bits}\n" 57 } 58} 59 60class PredecodeWritebackBundle(implicit p:Parameters) extends XSBundle { 61 val pc = Vec(PredictWidth, UInt(VAddrBits.W)) 62 val pd = Vec(PredictWidth, new PreDecodeInfo) // TODO: redefine Predecode 63 val ftqIdx = new FtqPtr 64 val ftqOffset = UInt(log2Ceil(PredictWidth).W) 65 val misOffset = ValidUndirectioned(UInt(log2Ceil(PredictWidth).W)) 66 val cfiOffset = ValidUndirectioned(UInt(log2Ceil(PredictWidth).W)) 67 val target = UInt(VAddrBits.W) 68 val jalTarget = UInt(VAddrBits.W) 69 val instrRange = Vec(PredictWidth, Bool()) 70} 71 72class Exception(implicit p: Parameters) extends XSBundle { 73 74} 75 76class FetchToIBuffer(implicit p: Parameters) extends XSBundle { 77 val instrs = Vec(PredictWidth, UInt(32.W)) 78 val valid = UInt(PredictWidth.W) 79 val pd = Vec(PredictWidth, new PreDecodeInfo) 80 val pc = Vec(PredictWidth, UInt(VAddrBits.W)) 81 val foldpc = Vec(PredictWidth, UInt(MemPredPCWidth.W)) 82 //val exception = new Exception 83 val ftqPtr = new FtqPtr 84 val ftqOffset = Vec(PredictWidth, ValidUndirectioned(UInt(log2Ceil(PredictWidth).W))) 85 val ipf = Vec(PredictWidth, Bool()) 86 val acf = Vec(PredictWidth, Bool()) 87 val crossPageIPFFix = Vec(PredictWidth, Bool()) 88 val triggered = Vec(PredictWidth, new TriggerCf) 89} 90 91// class BitWiseUInt(val width: Int, val init: UInt) extends Module { 92// val io = IO(new Bundle { 93// val set 94// }) 95// } 96// Move from BPU 97abstract class GlobalHistory(implicit p: Parameters) extends XSBundle with HasBPUConst { 98 def update(br_valids: Vec[Bool], real_taken_mask: Vec[Bool]): GlobalHistory 99} 100 101class ShiftingGlobalHistory(implicit p: Parameters) extends GlobalHistory { 102 val predHist = UInt(HistoryLength.W) 103 104 def update(shift: UInt, taken: Bool, hist: UInt = this.predHist): ShiftingGlobalHistory = { 105 val g = Wire(new ShiftingGlobalHistory) 106 g.predHist := (hist << shift) | taken 107 g 108 } 109 110 def update(br_valids: Vec[Bool], real_taken_mask: Vec[Bool]): ShiftingGlobalHistory = { 111 require(br_valids.length == numBr) 112 require(real_taken_mask.length == numBr) 113 val last_valid_idx = PriorityMux( 114 br_valids.reverse :+ true.B, 115 (numBr to 0 by -1).map(_.U(log2Ceil(numBr+1).W)) 116 ) 117 val first_taken_idx = PriorityEncoder(false.B +: real_taken_mask) 118 val smaller = Mux(last_valid_idx < first_taken_idx, 119 last_valid_idx, 120 first_taken_idx 121 ) 122 val shift = smaller 123 val taken = real_taken_mask.reduce(_||_) 124 update(shift, taken, this.predHist) 125 } 126 127 // static read 128 def read(n: Int): Bool = predHist.asBools()(n) 129 130 final def === (that: ShiftingGlobalHistory): Bool = { 131 predHist === that.predHist 132 } 133 134 final def =/= (that: ShiftingGlobalHistory): Bool = !(this === that) 135} 136 137// circular global history pointer 138class CGHPtr(implicit p: Parameters) extends CircularQueuePtr[CGHPtr]( 139 p => p(XSCoreParamsKey).HistoryLength 140){ 141 override def cloneType = (new CGHPtr).asInstanceOf[this.type] 142} 143class CircularGlobalHistory(implicit p: Parameters) extends GlobalHistory { 144 val buffer = Vec(HistoryLength, Bool()) 145 type HistPtr = UInt 146 def update(br_valids: Vec[Bool], real_taken_mask: Vec[Bool]): CircularGlobalHistory = { 147 this 148 } 149} 150 151class FoldedHistory(val len: Int, val compLen: Int, val max_update_num: Int)(implicit p: Parameters) 152 extends XSBundle with HasBPUConst { 153 require(compLen >= 1) 154 require(len > 0) 155 // require(folded_len <= len) 156 require(compLen >= max_update_num) 157 val folded_hist = UInt(compLen.W) 158 159 def info = (len, compLen) 160 def oldest_bit_to_get_from_ghr = (0 until max_update_num).map(len - _ - 1) 161 def oldest_bit_pos_in_folded = oldest_bit_to_get_from_ghr map (_ % compLen) 162 def oldest_bit_wrap_around = oldest_bit_to_get_from_ghr map (_ / compLen > 0) 163 def oldest_bit_start = oldest_bit_pos_in_folded.head 164 165 def get_oldest_bits_from_ghr(ghr: Vec[Bool], histPtr: CGHPtr) = { 166 // TODO: wrap inc for histPtr value 167 oldest_bit_to_get_from_ghr.map(i => ghr((histPtr + (i+1).U).value)) 168 } 169 170 def circular_shift_left(max_shift_value: Int)(src: UInt, shamt: UInt) = { 171 val srcLen = src.getWidth 172 require(max_shift_value <= srcLen) 173 val src_doubled = Cat(src, src) 174 val shifted_vec = (0 to max_shift_value).map(i => src_doubled(srcLen*2-1-i, srcLen-i)) 175 val sel_vec = (0 to max_shift_value).map(_.U === shamt) 176 Mux1H(sel_vec, shifted_vec) 177 } 178 179 180 def update(ghr: Vec[Bool], histPtr: CGHPtr, num: UInt, taken: Bool): FoldedHistory = { 181 // do xors for several bitsets at specified bits 182 def bitsets_xor(len: Int, bitsets: Seq[Seq[Tuple2[Int, Bool]]]) = { 183 val res = Wire(Vec(len, Bool())) 184 // println(f"num bitsets: ${bitsets.length}") 185 // println(f"bitsets $bitsets") 186 val resArr = Array.fill(len)(List[Bool]()) 187 for (bs <- bitsets) { 188 for ((n, b) <- bs) { 189 resArr(n) = b :: resArr(n) 190 } 191 } 192 // println(f"${resArr.mkString}") 193 // println(f"histLen: ${this.len}, foldedLen: $folded_len") 194 for (i <- 0 until len) { 195 // println(f"bit[$i], ${resArr(i).mkString}") 196 if (resArr(i).length > 2) { 197 println(f"[warning] update logic of foldest history has two or more levels of xor gates! " + 198 f"histlen:${this.len}, compLen:$compLen") 199 } 200 if (resArr(i).length == 0) { 201 println(f"[error] bits $i is not assigned in folded hist update logic! histlen:${this.len}, compLen:$compLen") 202 } 203 res(i) := resArr(i).foldLeft(false.B)(_^_) 204 } 205 res.asUInt 206 } 207 val oldest_bits = get_oldest_bits_from_ghr(ghr, histPtr) 208 209 // mask off bits that do not update 210 val oldest_bits_masked = oldest_bits.zipWithIndex.map{ 211 case (ob, i) => ob && (i.U < num) 212 } 213 // if a bit does not wrap around, it should not be xored when it exits 214 val oldest_bits_set = (0 until max_update_num).filter(oldest_bit_wrap_around).map(i => (oldest_bit_pos_in_folded(i), oldest_bits_masked(i))) 215 216 // println(f"old bits pos ${oldest_bits_set.map(_._1)}") 217 218 // only the last bit could be 1, as we have at most one taken branch at a time 219 val newest_bits_masked = VecInit((0 until max_update_num).map(i => taken && (i+1).U === num)).asUInt 220 // if a bit does not wrap around, newest bits should not be xored onto it either 221 val newest_bits_set = (0 until max_update_num).map(i => (compLen-1-i, newest_bits_masked(i))) 222 223 // println(f"new bits set ${newest_bits_set.map(_._1)}") 224 // 225 val original_bits_masked = VecInit(folded_hist.asBools.zipWithIndex.map{ 226 case (fb, i) => fb && !(num >= (len-i).U) 227 }) 228 val original_bits_set = (0 until compLen).map(i => (i, original_bits_masked(i))) 229 230 231 // histLen too short to wrap around 232 val new_folded_hist = 233 if (len <= compLen) { 234 ((folded_hist << num) | taken)(compLen-1,0) 235 // circular_shift_left(max_update_num)(Cat(Reverse(newest_bits_masked), folded_hist(compLen-max_update_num-1,0)), num) 236 } else { 237 // do xor then shift 238 val xored = bitsets_xor(compLen, Seq(original_bits_set, oldest_bits_set, newest_bits_set)) 239 circular_shift_left(max_update_num)(xored, num) 240 } 241 val fh = WireInit(this) 242 fh.folded_hist := new_folded_hist 243 fh 244 } 245 246 // def update(ghr: Vec[Bool], histPtr: CGHPtr, valids: Vec[Bool], takens: Vec[Bool]): FoldedHistory = { 247 // val fh = WireInit(this) 248 // require(valids.length == max_update_num) 249 // require(takens.length == max_update_num) 250 // val last_valid_idx = PriorityMux( 251 // valids.reverse :+ true.B, 252 // (max_update_num to 0 by -1).map(_.U(log2Ceil(max_update_num+1).W)) 253 // ) 254 // val first_taken_idx = PriorityEncoder(false.B +: takens) 255 // val smaller = Mux(last_valid_idx < first_taken_idx, 256 // last_valid_idx, 257 // first_taken_idx 258 // ) 259 // // update folded_hist 260 // fh.update(ghr, histPtr, smaller, takens.reduce(_||_)) 261 // } 262 // println(f"folded hist original length: ${len}, folded len: ${folded_len} " + 263 // f"oldest bits' pos in folded: ${oldest_bit_pos_in_folded}") 264 265 266} 267 268class TableAddr(val idxBits: Int, val banks: Int)(implicit p: Parameters) extends XSBundle{ 269 def tagBits = VAddrBits - idxBits - instOffsetBits 270 271 val tag = UInt(tagBits.W) 272 val idx = UInt(idxBits.W) 273 val offset = UInt(instOffsetBits.W) 274 275 def fromUInt(x: UInt) = x.asTypeOf(UInt(VAddrBits.W)).asTypeOf(this) 276 def getTag(x: UInt) = fromUInt(x).tag 277 def getIdx(x: UInt) = fromUInt(x).idx 278 def getBank(x: UInt) = if (banks > 1) getIdx(x)(log2Up(banks) - 1, 0) else 0.U 279 def getBankIdx(x: UInt) = if (banks > 1) getIdx(x)(idxBits - 1, log2Up(banks)) else getIdx(x) 280} 281 282@chiselName 283class BranchPrediction(implicit p: Parameters) extends XSBundle with HasBPUConst { 284 val br_taken_mask = Vec(numBr, Bool()) 285 286 val slot_valids = Vec(totalSlot, Bool()) 287 288 val targets = Vec(totalSlot, UInt(VAddrBits.W)) 289 290 val is_jal = Bool() 291 val is_jalr = Bool() 292 val is_call = Bool() 293 val is_ret = Bool() 294 val is_br_sharing = Bool() 295 296 // val call_is_rvc = Bool() 297 val hit = Bool() 298 299 def br_slot_valids = slot_valids.init 300 def tail_slot_valid = slot_valids.last 301 302 def br_valids = { 303 VecInit( 304 if (shareTailSlot) 305 br_slot_valids :+ (tail_slot_valid && is_br_sharing) 306 else 307 br_slot_valids 308 ) 309 } 310 311 def taken_mask_on_slot = { 312 VecInit( 313 if (shareTailSlot) 314 (br_slot_valids zip br_taken_mask.init).map{ case (t, v) => t && v } :+ ( 315 (br_taken_mask.last && tail_slot_valid && is_br_sharing) || 316 tail_slot_valid && !is_br_sharing 317 ) 318 else 319 (br_slot_valids zip br_taken_mask).map{ case (v, t) => v && t } :+ 320 tail_slot_valid 321 ) 322 } 323 324 def taken = br_taken_mask.reduce(_||_) || slot_valids.last // || (is_jal || is_jalr) 325 326 def fromFtbEntry(entry: FTBEntry, pc: UInt) = { 327 slot_valids := entry.brSlots.map(_.valid) :+ entry.tailSlot.valid 328 targets := entry.getTargetVec(pc) 329 is_jal := entry.tailSlot.valid && entry.isJal 330 is_jalr := entry.tailSlot.valid && entry.isJalr 331 is_call := entry.tailSlot.valid && entry.isCall 332 is_ret := entry.tailSlot.valid && entry.isRet 333 is_br_sharing := entry.tailSlot.valid && entry.tailSlot.sharing 334 } 335 // override def toPrintable: Printable = { 336 // p"-----------BranchPrediction----------- " + 337 // p"[taken_mask] ${Binary(taken_mask.asUInt)} " + 338 // p"[is_br] ${Binary(is_br.asUInt)}, [is_jal] ${Binary(is_jal.asUInt)} " + 339 // p"[is_jalr] ${Binary(is_jalr.asUInt)}, [is_call] ${Binary(is_call.asUInt)}, [is_ret] ${Binary(is_ret.asUInt)} " + 340 // p"[target] ${Hexadecimal(target)}}, [hit] $hit " 341 // } 342 343 def display(cond: Bool): Unit = { 344 XSDebug(cond, p"[taken_mask] ${Binary(br_taken_mask.asUInt)} [hit] $hit\n") 345 } 346} 347 348@chiselName 349class BranchPredictionBundle(implicit p: Parameters) extends XSBundle with HasBPUConst with BPUUtils{ 350 val pc = UInt(VAddrBits.W) 351 352 val valid = Bool() 353 354 val hasRedirect = Bool() 355 val ftq_idx = new FtqPtr 356 // val hit = Bool() 357 val preds = new BranchPrediction 358 359 val folded_hist = new AllFoldedHistories(foldedGHistInfos) 360 val histPtr = new CGHPtr 361 val phist = UInt(PathHistoryLength.W) 362 val rasSp = UInt(log2Ceil(RasSize).W) 363 val rasTop = new RASEntry 364 val specCnt = Vec(numBr, UInt(10.W)) 365 // val meta = UInt(MaxMetaLength.W) 366 367 val ftb_entry = new FTBEntry() // TODO: Send this entry to ftq 368 369 def real_slot_taken_mask(): Vec[Bool] = { 370 VecInit(preds.taken_mask_on_slot.map(_ && preds.hit)) 371 } 372 373 // len numBr 374 def real_br_taken_mask(): Vec[Bool] = { 375 if (shareTailSlot) 376 VecInit( 377 preds.taken_mask_on_slot.map(_ && preds.hit).init :+ 378 (preds.br_taken_mask.last && preds.tail_slot_valid && preds.is_br_sharing && preds.hit) 379 ) 380 else 381 VecInit(real_slot_taken_mask().init) 382 } 383 384 def br_count(): UInt = { 385 val last_valid_idx = PriorityMux( 386 preds.br_valids.reverse :+ true.B, 387 (numBr to 0 by -1).map(_.U(log2Ceil(numBr+1).W)) 388 ) 389 val first_taken_idx = PriorityEncoder(false.B +: real_br_taken_mask) 390 Mux(last_valid_idx < first_taken_idx, 391 last_valid_idx, 392 first_taken_idx 393 ) 394 } 395 396 def hit_taken_on_jmp = 397 !real_slot_taken_mask().init.reduce(_||_) && 398 real_slot_taken_mask().last && !preds.is_br_sharing 399 def hit_taken_on_call = hit_taken_on_jmp && preds.is_call 400 def hit_taken_on_ret = hit_taken_on_jmp && preds.is_ret 401 def hit_taken_on_jalr = hit_taken_on_jmp && preds.is_jalr 402 403 def fallThroughAddr = getFallThroughAddr(pc, ftb_entry.carry, ftb_entry.pftAddr) 404 405 def target(): UInt = { 406 val targetVec = preds.targets :+ fallThroughAddr :+ (pc + (FetchWidth*4).U) 407 val selVec = real_slot_taken_mask() :+ (preds.hit && !real_slot_taken_mask().asUInt.orR) :+ true.B 408 PriorityMux(selVec zip targetVec) 409 } 410 def genCfiIndex = { 411 val cfiIndex = Wire(ValidUndirectioned(UInt(log2Ceil(PredictWidth).W))) 412 cfiIndex.valid := real_slot_taken_mask().asUInt.orR 413 // when no takens, set cfiIndex to PredictWidth-1 414 cfiIndex.bits := 415 ParallelPriorityMux(real_slot_taken_mask(), ftb_entry.getOffsetVec) | 416 Fill(log2Ceil(PredictWidth), (!real_slot_taken_mask().asUInt.orR).asUInt) 417 cfiIndex 418 } 419 420 def display(cond: Bool): Unit = { 421 XSDebug(cond, p"[pc] ${Hexadecimal(pc)}\n") 422 folded_hist.display(cond) 423 preds.display(cond) 424 ftb_entry.display(cond) 425 } 426} 427 428@chiselName 429class BranchPredictionResp(implicit p: Parameters) extends XSBundle with HasBPUConst { 430 // val valids = Vec(3, Bool()) 431 val s1 = new BranchPredictionBundle() 432 val s2 = new BranchPredictionBundle() 433 val s3 = new BranchPredictionBundle() 434 435 def selectedResp = 436 PriorityMux(Seq( 437 ((s3.valid && s3.hasRedirect) -> s3), 438 ((s2.valid && s2.hasRedirect) -> s2), 439 (s1.valid -> s1) 440 )) 441 def selectedRespIdx = 442 PriorityMux(Seq( 443 ((s3.valid && s3.hasRedirect) -> BP_S3), 444 ((s2.valid && s2.hasRedirect) -> BP_S2), 445 (s1.valid -> BP_S1) 446 )) 447 def lastStage = s3 448} 449 450class BpuToFtqBundle(implicit p: Parameters) extends BranchPredictionResp with HasBPUConst { 451 val meta = UInt(MaxMetaLength.W) 452} 453 454object BpuToFtqBundle { 455 def apply(resp: BranchPredictionResp)(implicit p: Parameters): BpuToFtqBundle = { 456 val e = Wire(new BpuToFtqBundle()) 457 e.s1 := resp.s1 458 e.s2 := resp.s2 459 e.s3 := resp.s3 460 461 e.meta := DontCare 462 e 463 } 464} 465 466class BranchPredictionUpdate(implicit p: Parameters) extends BranchPredictionBundle with HasBPUConst { 467 val mispred_mask = Vec(numBr+1, Bool()) 468 val false_hit = Bool() 469 val new_br_insert_pos = Vec(numBr, Bool()) 470 val old_entry = Bool() 471 val meta = UInt(MaxMetaLength.W) 472 val full_target = UInt(VAddrBits.W) 473 474 def fromFtqRedirectSram(entry: Ftq_Redirect_SRAMEntry) = { 475 folded_hist := entry.folded_hist 476 histPtr := entry.histPtr 477 phist := entry.phist 478 rasSp := entry.rasSp 479 rasTop := entry.rasEntry 480 specCnt := entry.specCnt 481 this 482 } 483 484 override def display(cond: Bool) = { 485 XSDebug(cond, p"-----------BranchPredictionUpdate-----------\n") 486 XSDebug(cond, p"[mispred_mask] ${Binary(mispred_mask.asUInt)} [false_hit] $false_hit\n") 487 XSDebug(cond, p"[new_br_insert_pos] ${Binary(new_br_insert_pos.asUInt)}\n") 488 super.display(cond) 489 XSDebug(cond, p"--------------------------------------------\n") 490 } 491} 492 493class BranchPredictionRedirect(implicit p: Parameters) extends Redirect with HasBPUConst { 494 // override def toPrintable: Printable = { 495 // p"-----------BranchPredictionRedirect----------- " + 496 // p"-----------cfiUpdate----------- " + 497 // p"[pc] ${Hexadecimal(cfiUpdate.pc)} " + 498 // p"[predTaken] ${cfiUpdate.predTaken}, [taken] ${cfiUpdate.taken}, [isMisPred] ${cfiUpdate.isMisPred} " + 499 // p"[target] ${Hexadecimal(cfiUpdate.target)} " + 500 // p"------------------------------- " + 501 // p"[robPtr] f=${robIdx.flag} v=${robIdx.value} " + 502 // p"[ftqPtr] f=${ftqIdx.flag} v=${ftqIdx.value} " + 503 // p"[ftqOffset] ${ftqOffset} " + 504 // p"[level] ${level}, [interrupt] ${interrupt} " + 505 // p"[stFtqIdx] f=${stFtqIdx.flag} v=${stFtqIdx.value} " + 506 // p"[stFtqOffset] ${stFtqOffset} " + 507 // p"\n" 508 509 // } 510 511 def display(cond: Bool): Unit = { 512 XSDebug(cond, p"-----------BranchPredictionRedirect----------- \n") 513 XSDebug(cond, p"-----------cfiUpdate----------- \n") 514 XSDebug(cond, p"[pc] ${Hexadecimal(cfiUpdate.pc)}\n") 515 // XSDebug(cond, p"[hist] ${Binary(cfiUpdate.hist.predHist)}\n") 516 XSDebug(cond, p"[br_hit] ${cfiUpdate.br_hit} [isMisPred] ${cfiUpdate.isMisPred}\n") 517 XSDebug(cond, p"[pred_taken] ${cfiUpdate.predTaken} [taken] ${cfiUpdate.taken} [isMisPred] ${cfiUpdate.isMisPred}\n") 518 XSDebug(cond, p"[target] ${Hexadecimal(cfiUpdate.target)} \n") 519 XSDebug(cond, p"[shift] ${cfiUpdate.shift}\n") 520 XSDebug(cond, p"------------------------------- \n") 521 XSDebug(cond, p"[robPtr] f=${robIdx.flag} v=${robIdx.value}\n") 522 XSDebug(cond, p"[ftqPtr] f=${ftqIdx.flag} v=${ftqIdx.value} \n") 523 XSDebug(cond, p"[ftqOffset] ${ftqOffset} \n") 524 XSDebug(cond, p"[stFtqIdx] f=${stFtqIdx.flag} v=${stFtqIdx.value}\n") 525 XSDebug(cond, p"[stFtqOffset] ${stFtqOffset}\n") 526 XSDebug(cond, p"---------------------------------------------- \n") 527 } 528} 529