From df06a3674a748b493baf99675ab568a739cddea1 Mon Sep 17 00:00:00 2001 From: YuanDL <2524247987@qq.com> Date: Fri, 3 Jan 2025 19:33:03 +0800 Subject: [PATCH] fix(tage): Fix parameter errors in minimalConfig. --- src/main/scala/top/Configs.scala | 2 ++ src/main/scala/xiangshan/Parameters.scala | 3 +++ src/main/scala/xiangshan/frontend/Tage.scala | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/scala/top/Configs.scala b/src/main/scala/top/Configs.scala index c20f9d8c997..1a507a94a2f 100644 --- a/src/main/scala/top/Configs.scala +++ b/src/main/scala/top/Configs.scala @@ -144,6 +144,8 @@ class MinimalConfig(n: Int = 1) extends Config( Seq((512, 4, 6), (512, 9, 6), (1024, 19, 6)), + // Based on the statistical results of continuous unused counters using spec2k6 coverage 0.3, the threshold is obtained + TageTableCloseThresholds = Seq(300, 300, 300), SCNRows = 128, SCNTables = 2, SCHistLens = Seq(0, 5), diff --git a/src/main/scala/xiangshan/Parameters.scala b/src/main/scala/xiangshan/Parameters.scala index 586fe9d52b0..9d0837320ca 100644 --- a/src/main/scala/xiangshan/Parameters.scala +++ b/src/main/scala/xiangshan/Parameters.scala @@ -109,6 +109,8 @@ case class XSCoreParameters ( 4096, 13, 8), ( 4096, 32, 8), ( 4096, 119, 8)), + // Based on the statistical results of continuous unused counters using spec2k6 coverage 0.3, the threshold is obtained + TageTableCloseThresholds: Seq[Int] = Seq(300, 300, 300, 300), ITTageTableInfos: Seq[Tuple3[Int,Int,Int]] = // Sets Hist Tag Seq(( 256, 4, 9), @@ -693,6 +695,7 @@ trait HasXSParameter { } def numBr = coreParams.numBr def TageTableInfos = coreParams.TageTableInfos + def TageTableCloseThresholds = coreParams.TageTableCloseThresholds def TageBanks = coreParams.numBr def SCNRows = coreParams.SCNRows def SCCtrBits = coreParams.SCCtrBits diff --git a/src/main/scala/xiangshan/frontend/Tage.scala b/src/main/scala/xiangshan/frontend/Tage.scala index d8880321b24..12bbb83c899 100644 --- a/src/main/scala/xiangshan/frontend/Tage.scala +++ b/src/main/scala/xiangshan/frontend/Tage.scala @@ -66,7 +66,7 @@ trait TageParams extends HasBPUConst with HasXSParameter { def get_lgc_br_idx(unhashed_idx: UInt, br_pidx: UInt) = get_unshuffle_bits(unhashed_idx) ^ br_pidx // Based on the statistical results of continuous unused counters using spec2k6 coverage 0.3, the threshold is obtained - def TABLES_CLOSE_THRESHOLD = Seq(300, 300, 300, 300) + def TABLES_CLOSE_THRESHOLD = TageTableCloseThresholds } trait HasFoldedHistory {