Parameters.scala 16.7 KB
Newer Older
L
Lemover 已提交
1 2
/***************************************************************************************
* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences
Y
Yinan Xu 已提交
3
* Copyright (c) 2020-2021 Peng Cheng Laboratory
L
Lemover 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16
*
* XiangShan is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*          http://license.coscl.org.cn/MulanPSL2
*
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
*
* See the Mulan PSL v2 for more details.
***************************************************************************************/

17 18 19 20 21 22 23
package xiangshan

import chipsalliance.rocketchip.config.{Field, Parameters}
import chisel3._
import chisel3.util._
import xiangshan.backend.exu._
import xiangshan.backend.dispatch.DispatchParameters
24
import xiangshan.cache.DCacheParameters
25
import xiangshan.cache.prefetch._
L
Lingrui98 已提交
26
import xiangshan.frontend.{BasePredictor, BranchPredictionResp, FTB, FakePredictor, RAS, Tage, ITTage, Tage_SC, FauFTB}
27
import xiangshan.frontend.icache.ICacheParameters
28
import xiangshan.cache.mmu.{L2TLBParameters, TLBParameters}
29
import freechips.rocketchip.diplomacy.AddressSet
30
import system.SoCParamsKey
31 32
import huancun._
import huancun.debug._
L
LinJiawei 已提交
33 34
import xiangshan.mem.prefetch.{PrefetcherParams, SMSParams}

35
import scala.math.min
J
Jiawei Lin 已提交
36 37 38

case object XSTileKey extends Field[Seq[XSCoreParameters]]

39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
case object XSCoreParamsKey extends Field[XSCoreParameters]

case class XSCoreParameters
(
  HasPrefetch: Boolean = false,
  HartId: Int = 0,
  XLEN: Int = 64,
  HasMExtension: Boolean = true,
  HasCExtension: Boolean = true,
  HasDiv: Boolean = true,
  HasICache: Boolean = true,
  HasDCache: Boolean = true,
  AddrBits: Int = 64,
  VAddrBits: Int = 39,
  HasFPU: Boolean = true,
Z
zhanglinjuan 已提交
54
  HasCustomCSRCacheOp: Boolean = true,
55
  FetchWidth: Int = 8,
56
  AsidLength: Int = 16,
57 58 59 60 61
  EnableBPU: Boolean = true,
  EnableBPD: Boolean = true,
  EnableRAS: Boolean = true,
  EnableLB: Boolean = false,
  EnableLoop: Boolean = true,
62
  EnableSC: Boolean = true,
63 64
  EnbaleTlbDebug: Boolean = false,
  EnableJal: Boolean = false,
65
  EnableFauFTB: Boolean = true,
66
  UbtbGHRLength: Int = 4,
67
  // HistoryLength: Int = 512,
68
  EnableGHistDiff: Boolean = true,
69
  UbtbSize: Int = 256,
70
  FtbSize: Int = 2048,
71
  RasSize: Int = 32,
72
  CacheLineSize: Int = 512,
73
  FtbWays: Int = 4,
74 75
  TageTableInfos: Seq[Tuple3[Int,Int,Int]] =
  //       Sets  Hist   Tag
L
Lingrui98 已提交
76 77 78 79 80 81 82 83 84 85 86 87
    // Seq(( 2048,    2,    8),
    //     ( 2048,    9,    8),
    //     ( 2048,   13,    8),
    //     ( 2048,   20,    8),
    //     ( 2048,   26,    8),
    //     ( 2048,   44,    8),
    //     ( 2048,   73,    8),
    //     ( 2048,  256,    8)),
    Seq(( 4096,    8,    8),
        ( 4096,   13,    8),
        ( 4096,   32,    8),
        ( 4096,  119,    8)),
88 89
  ITTageTableInfos: Seq[Tuple3[Int,Int,Int]] =
  //      Sets  Hist   Tag
L
Lingrui98 已提交
90
    Seq(( 256,    4,    9),
91
        ( 256,    8,    9),
L
Lingrui98 已提交
92
        ( 512,   13,    9),
93
        ( 512,   16,    9),
94
        ( 512,   32,    9)),
95 96
  SCNRows: Int = 512,
  SCNTables: Int = 4,
97
  SCCtrBits: Int = 6,
98
  SCHistLens: Seq[Int] = Seq(0, 4, 10, 16),
99
  numBr: Int = 2,
100 101
  branchPredictor: Function2[BranchPredictionResp, Parameters, Tuple2[Seq[BasePredictor], BranchPredictionResp]] =
    ((resp_in: BranchPredictionResp, p: Parameters) => {
Z
zoujr 已提交
102
      val ftb = Module(new FTB()(p))
L
Lingrui98 已提交
103
      val ubtb =Module(new FauFTB()(p))
104
      // val bim = Module(new BIM()(p))
105
      val tage = Module(new Tage_SC()(p))
L
Lingrui98 已提交
106
      val ras = Module(new RAS()(p))
107
      val ittage = Module(new ITTage()(p))
108
      val preds = Seq(ubtb, tage, ftb, ittage, ras)
Z
zoujr 已提交
109 110 111 112 113 114 115
      preds.map(_.io := DontCare)

      // ubtb.io.resp_in(0)  := resp_in
      // bim.io.resp_in(0)   := ubtb.io.resp
      // btb.io.resp_in(0)   := bim.io.resp
      // tage.io.resp_in(0)  := btb.io.resp
      // loop.io.resp_in(0)  := tage.io.resp
116
      ubtb.io.in.bits.resp_in(0) := resp_in
L
Lingrui98 已提交
117 118 119 120
      tage.io.in.bits.resp_in(0) := ubtb.io.out
      ftb.io.in.bits.resp_in(0)  := tage.io.out
      ittage.io.in.bits.resp_in(0)  := ftb.io.out
      ras.io.in.bits.resp_in(0) := ittage.io.out
Y
Yinan Xu 已提交
121

L
Lingrui98 已提交
122
      (preds, ras.io.out)
Z
zoujr 已提交
123
    }),
124 125 126 127
  IBufSize: Int = 48,
  DecodeWidth: Int = 6,
  RenameWidth: Int = 6,
  CommitWidth: Int = 6,
L
Lingrui98 已提交
128
  FtqSize: Int = 64,
129 130
  EnableLoadFastWakeUp: Boolean = true, // NOTE: not supported now, make it false
  IssQueSize: Int = 16,
131
  NRPhyRegs: Int = 192,
132
  LoadQueueSize: Int = 80,
133
  LoadQueueNWriteBanks: Int = 8,
134
  StoreQueueSize: Int = 64,
135
  StoreQueueNWriteBanks: Int = 8,
W
William Wang 已提交
136
  VlsQueueSize: Int = 8,
137
  RobSize: Int = 256,
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
  dpParams: DispatchParameters = DispatchParameters(
    IntDqSize = 16,
    FpDqSize = 16,
    LsDqSize = 16,
    IntDqDeqWidth = 4,
    FpDqDeqWidth = 4,
    LsDqDeqWidth = 4
  ),
  exuParameters: ExuParameters = ExuParameters(
    JmpCnt = 1,
    AluCnt = 4,
    MulCnt = 0,
    MduCnt = 2,
    FmacCnt = 4,
    FmiscCnt = 2,
    FmiscDivSqrtCnt = 0,
    LduCnt = 2,
    StuCnt = 2
  ),
L
LinJiawei 已提交
157
  prefetcher: Option[PrefetcherParams] = Some(SMSParams()),
158 159
  LoadPipelineWidth: Int = 2,
  StorePipelineWidth: Int = 2,
W
William Wang 已提交
160 161 162
  VecMemSrcInWidth: Int = 2,
  VecMemInstWbWidth: Int = 1,
  VecMemDispatchWidth: Int = 1,
163
  StoreBufferSize: Int = 16,
164
  StoreBufferThreshold: Int = 7,
165
  EnsbufferWidth: Int = 2,
166
  UncacheBufferSize: Int = 4,
167
  EnableLoadToLoadForward: Boolean = true,
W
William Wang 已提交
168
  EnableFastForward: Boolean = false,
169
  EnableLdVioCheckAfterReset: Boolean = true,
170 171
  EnableSoftPrefetchAfterReset: Boolean = true,
  EnableCacheErrorAfterReset: Boolean = true,
172
  EnableDCacheWPU: Boolean = false,
173
  EnableAccurateLoadError: Boolean = true,
174
  EnableUncacheWriteOutstanding: Boolean = false,
175
  MMUAsidLen: Int = 16, // max is 16, 0 is not supported now
176
  ReSelectLen: Int = 7, // load replay queue replay select counter len
177 178 179 180
  itlbParameters: TLBParameters = TLBParameters(
    name = "itlb",
    fetchi = true,
    useDmode = false,
181
    normalNWays = 32,
182
    normalReplacer = Some("plru"),
183
    superNWays = 4,
184
    superReplacer = Some("plru")
185
  ),
186 187
  itlbPortNum: Int = 2 + ICacheParameters().prefetchPipeNum + 1,
  ipmpPortNum: Int = 2 + ICacheParameters().prefetchPipeNum + 1,
188 189
  ldtlbParameters: TLBParameters = TLBParameters(
    name = "ldtlb",
190
    normalNSets = 64,
191 192 193
    normalNWays = 1,
    normalAssociative = "sa",
    normalReplacer = Some("setplru"),
194
    superNWays = 16,
195
    normalAsVictim = true,
196
    outReplace = false,
197
    partialStaticPMP = true,
198
    outsideRecvFlush = true,
199
    saveLevel = true
200 201 202
  ),
  sttlbParameters: TLBParameters = TLBParameters(
    name = "sttlb",
203
    normalNSets = 64,
204 205 206
    normalNWays = 1,
    normalAssociative = "sa",
    normalReplacer = Some("setplru"),
207
    superNWays = 16,
208
    normalAsVictim = true,
209
    outReplace = false,
210
    partialStaticPMP = true,
211
    outsideRecvFlush = true,
212
    saveLevel = true
213
  ),
214 215 216 217 218 219 220 221 222 223 224 225 226
  pftlbParameters: TLBParameters = TLBParameters(
    name = "pftlb",
    normalNSets = 64,
    normalNWays = 1,
    normalAssociative = "sa",
    normalReplacer = Some("setplru"),
    superNWays = 16,
    normalAsVictim = true,
    outReplace = false,
    partialStaticPMP = true,
    outsideRecvFlush = true,
    saveLevel = true
  ),
227
  refillBothTlb: Boolean = false,
228 229 230 231 232 233
  btlbParameters: TLBParameters = TLBParameters(
    name = "btlb",
    normalNSets = 1,
    normalNWays = 64,
    superNWays = 4,
  ),
234
  l2tlbParameters: L2TLBParameters = L2TLBParameters(),
235
  NumPerfCounters: Int = 16,
236 237 238 239
  icacheParameters: ICacheParameters = ICacheParameters(
    tagECC = Some("parity"),
    dataECC = Some("parity"),
    replacer = Some("setplru"),
240
    nMissEntries = 2,
241
    nProbeEntries = 2,
242
    nPrefetchEntries = 12,
243
    nPrefBufferEntries = 64,
244
    hasPrefetch = true,
245
  ),
J
Jiawei Lin 已提交
246
  dcacheParametersOpt: Option[DCacheParameters] = Some(DCacheParameters(
247 248 249 250
    tagECC = Some("secded"),
    dataECC = Some("secded"),
    replacer = Some("setplru"),
    nMissEntries = 16,
W
William Wang 已提交
251 252
    nProbeEntries = 8,
    nReleaseEntries = 18
J
Jiawei Lin 已提交
253 254
  )),
  L2CacheParamsOpt: Option[HCCacheParameters] = Some(HCCacheParameters(
255 256 257 258
    name = "l2",
    level = 2,
    ways = 8,
    sets = 1024, // default 512KB L2
L
LinJiawei 已提交
259
    prefetch = Some(huancun.prefetch.PrefetchReceiverParams())
J
Jiawei Lin 已提交
260
  )),
J
Jiawei Lin 已提交
261
  L2NBanks: Int = 1,
262
  usePTWRepeater: Boolean = false,
H
Haoyuan Feng 已提交
263 264
  softTLB: Boolean = false, // dpi-c l1tlb debug only
  softPTW: Boolean = false, // dpi-c l2tlb debug only
265
  softPTWDelay: Int = 1
266
){
267 268 269
  val allHistLens = SCHistLens ++ ITTageTableInfos.map(_._2) ++ TageTableInfos.map(_._2) :+ UbtbGHRLength
  val HistoryLength = allHistLens.max + numBr * FtqSize + 9 // 256 for the predictor configs now

270
  val loadExuConfigs = Seq.fill(exuParameters.LduCnt)(LdExeUnitCfg)
271
  val storeExuConfigs = Seq.fill(exuParameters.StuCnt)(StaExeUnitCfg) ++ Seq.fill(exuParameters.StuCnt)(StdExeUnitCfg)
272

273
  val intExuConfigs = (Seq.fill(exuParameters.AluCnt)(AluExeUnitCfg) ++
274
    Seq.fill(exuParameters.MduCnt)(MulDivExeUnitCfg) :+ JumpCSRExeUnitCfg)
275 276 277 278 279 280 281 282 283 284 285 286

  val fpExuConfigs =
    Seq.fill(exuParameters.FmacCnt)(FmacExeUnitCfg) ++
      Seq.fill(exuParameters.FmiscCnt)(FmiscExeUnitCfg)

  val exuConfigs: Seq[ExuConfig] = intExuConfigs ++ fpExuConfigs ++ loadExuConfigs ++ storeExuConfigs
}

case object DebugOptionsKey extends Field[DebugOptions]

case class DebugOptions
(
287 288
  FPGAPlatform: Boolean = false,
  EnableDifftest: Boolean = false,
289
  AlwaysBasicDiff: Boolean = true,
290
  EnableDebug: Boolean = false,
291
  EnablePerfDebug: Boolean = true,
292
  UseDRAMSim: Boolean = false,
Maxpicca's avatar
Maxpicca 已提交
293
  EnableConstantin: Boolean = false,
294
  EnableTopDown: Boolean = false
295 296 297 298 299 300
)

trait HasXSParameter {

  implicit val p: Parameters

301 302
  val PAddrBits = p(SoCParamsKey).PAddrBits // PAddrBits is Phyical Memory addr bits

303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
  val coreParams = p(XSCoreParamsKey)
  val env = p(DebugOptionsKey)

  val XLEN = coreParams.XLEN
  val minFLen = 32
  val fLen = 64
  def xLen = XLEN

  val HasMExtension = coreParams.HasMExtension
  val HasCExtension = coreParams.HasCExtension
  val HasDiv = coreParams.HasDiv
  val HasIcache = coreParams.HasICache
  val HasDcache = coreParams.HasDCache
  val AddrBits = coreParams.AddrBits // AddrBits is used in some cases
  val VAddrBits = coreParams.VAddrBits // VAddrBits is Virtual Memory addr bits
318
  val AsidLength = coreParams.AsidLength
319
  val ReSelectLen = coreParams.ReSelectLen
320 321 322 323
  val AddrBytes = AddrBits / 8 // unused
  val DataBits = XLEN
  val DataBytes = DataBits / 8
  val HasFPU = coreParams.HasFPU
Z
zhanglinjuan 已提交
324
  val HasCustomCSRCacheOp = coreParams.HasCustomCSRCacheOp
325 326 327 328 329 330 331 332 333 334
  val FetchWidth = coreParams.FetchWidth
  val PredictWidth = FetchWidth * (if (HasCExtension) 2 else 1)
  val EnableBPU = coreParams.EnableBPU
  val EnableBPD = coreParams.EnableBPD // enable backing predictor(like Tage) in BPUStage3
  val EnableRAS = coreParams.EnableRAS
  val EnableLB = coreParams.EnableLB
  val EnableLoop = coreParams.EnableLoop
  val EnableSC = coreParams.EnableSC
  val EnbaleTlbDebug = coreParams.EnbaleTlbDebug
  val HistoryLength = coreParams.HistoryLength
335
  val EnableGHistDiff = coreParams.EnableGHistDiff
336
  val UbtbGHRLength = coreParams.UbtbGHRLength
337
  val UbtbSize = coreParams.UbtbSize
338
  val EnableFauFTB = coreParams.EnableFauFTB
339 340
  val FtbSize = coreParams.FtbSize
  val FtbWays = coreParams.FtbWays
341
  val RasSize = coreParams.RasSize
Z
zoujr 已提交
342

343 344
  def getBPDComponents(resp_in: BranchPredictionResp, p: Parameters) = {
    coreParams.branchPredictor(resp_in, p)
Z
zoujr 已提交
345
  }
346 347
  val numBr = coreParams.numBr
  val TageTableInfos = coreParams.TageTableInfos
L
Lingrui98 已提交
348
  val TageBanks = coreParams.numBr
349 350
  val SCNRows = coreParams.SCNRows
  val SCCtrBits = coreParams.SCCtrBits
L
Lingrui98 已提交
351 352
  val SCHistLens = coreParams.SCHistLens
  val SCNTables = coreParams.SCNTables
353

L
Lingrui98 已提交
354 355
  val SCTableInfos = Seq.fill(SCNTables)((SCNRows, SCCtrBits)) zip SCHistLens map {
    case ((n, cb), h) => (n, cb, h)
356 357 358 359
  }
  val ITTageTableInfos = coreParams.ITTageTableInfos
  type FoldedHistoryInfo = Tuple2[Int, Int]
  val foldedGHistInfos =
360
    (TageTableInfos.map{ case (nRows, h, t) =>
361
      if (h > 0)
362
        Set((h, min(log2Ceil(nRows/numBr), h)), (h, min(h, t)), (h, min(h, t-1)))
363 364
      else
        Set[FoldedHistoryInfo]()
365
    }.reduce(_++_).toSet ++
L
Lingrui98 已提交
366
    SCTableInfos.map{ case (nRows, _, h) =>
367
      if (h > 0)
L
Lingrui98 已提交
368
        Set((h, min(log2Ceil(nRows/TageBanks), h)))
369 370
      else
        Set[FoldedHistoryInfo]()
L
Lingrui98 已提交
371
    }.reduce(_++_).toSet ++
372 373 374 375 376
    ITTageTableInfos.map{ case (nRows, h, t) =>
      if (h > 0)
        Set((h, min(log2Ceil(nRows), h)), (h, min(h, t)), (h, min(h, t-1)))
      else
        Set[FoldedHistoryInfo]()
377 378 379
    }.reduce(_++_) ++
      Set[FoldedHistoryInfo]((UbtbGHRLength, log2Ceil(UbtbSize)))
    ).toList
380

381

Z
zoujr 已提交
382

383 384 385 386 387 388 389 390 391 392 393 394
  val CacheLineSize = coreParams.CacheLineSize
  val CacheLineHalfWord = CacheLineSize / 16
  val ExtHistoryLength = HistoryLength + 64
  val IBufSize = coreParams.IBufSize
  val DecodeWidth = coreParams.DecodeWidth
  val RenameWidth = coreParams.RenameWidth
  val CommitWidth = coreParams.CommitWidth
  val FtqSize = coreParams.FtqSize
  val IssQueSize = coreParams.IssQueSize
  val EnableLoadFastWakeUp = coreParams.EnableLoadFastWakeUp
  val NRPhyRegs = coreParams.NRPhyRegs
  val PhyRegIdxWidth = log2Up(NRPhyRegs)
Y
Yinan Xu 已提交
395
  val RobSize = coreParams.RobSize
396
  val IntRefCounterWidth = log2Ceil(RobSize)
397
  val LoadQueueSize = coreParams.LoadQueueSize
398
  val LoadQueueNWriteBanks = coreParams.LoadQueueNWriteBanks
399
  val StoreQueueSize = coreParams.StoreQueueSize
400
  val StoreQueueNWriteBanks = coreParams.StoreQueueNWriteBanks
W
William Wang 已提交
401
  val VlsQueueSize = coreParams.VlsQueueSize
402 403 404
  val dpParams = coreParams.dpParams
  val exuParameters = coreParams.exuParameters
  val NRMemReadPorts = exuParameters.LduCnt + 2 * exuParameters.StuCnt
405 406 407 408
  val NRIntReadPorts = 2 * exuParameters.AluCnt + NRMemReadPorts
  val NRIntWritePorts = exuParameters.AluCnt + exuParameters.MduCnt + exuParameters.LduCnt
  val NRFpReadPorts = 3 * exuParameters.FmacCnt + exuParameters.StuCnt
  val NRFpWritePorts = exuParameters.FpExuCnt + exuParameters.LduCnt
409 410
  val LoadPipelineWidth = coreParams.LoadPipelineWidth
  val StorePipelineWidth = coreParams.StorePipelineWidth
W
William Wang 已提交
411 412 413
  val VecMemSrcInWidth = coreParams.VecMemSrcInWidth
  val VecMemInstWbWidth = coreParams.VecMemInstWbWidth
  val VecMemDispatchWidth = coreParams.VecMemDispatchWidth
414
  val StoreBufferSize = coreParams.StoreBufferSize
415
  val StoreBufferThreshold = coreParams.StoreBufferThreshold
416
  val EnsbufferWidth = coreParams.EnsbufferWidth
417
  val UncacheBufferSize = coreParams.UncacheBufferSize
418
  val EnableLoadToLoadForward = coreParams.EnableLoadToLoadForward
419
  val EnableFastForward = coreParams.EnableFastForward
W
William Wang 已提交
420
  val EnableLdVioCheckAfterReset = coreParams.EnableLdVioCheckAfterReset
421 422
  val EnableSoftPrefetchAfterReset = coreParams.EnableSoftPrefetchAfterReset
  val EnableCacheErrorAfterReset = coreParams.EnableCacheErrorAfterReset
423
  val EnableDCacheWPU = coreParams.EnableDCacheWPU
424
  val EnableAccurateLoadError = coreParams.EnableAccurateLoadError
425
  val EnableUncacheWriteOutstanding = coreParams.EnableUncacheWriteOutstanding
426
  val asidLen = coreParams.MMUAsidLen
427
  val BTLBWidth = coreParams.LoadPipelineWidth + coreParams.StorePipelineWidth
428
  val refillBothTlb = coreParams.refillBothTlb
429 430 431
  val itlbParams = coreParams.itlbParameters
  val ldtlbParams = coreParams.ldtlbParameters
  val sttlbParams = coreParams.sttlbParameters
432
  val pftlbParams = coreParams.pftlbParameters
433
  val btlbParams = coreParams.btlbParameters
434
  val l2tlbParams = coreParams.l2tlbParameters
435 436
  val NumPerfCounters = coreParams.NumPerfCounters

437 438
  val NumRs = (exuParameters.JmpCnt+1)/2 + (exuParameters.AluCnt+1)/2 + (exuParameters.MulCnt+1)/2 +
              (exuParameters.MduCnt+1)/2 + (exuParameters.FmacCnt+1)/2 +  + (exuParameters.FmiscCnt+1)/2 +
439
              (exuParameters.FmiscDivSqrtCnt+1)/2 + (exuParameters.LduCnt+1)/2 +
440
              (exuParameters.StuCnt+1)/2 + (exuParameters.StuCnt+1)/2
441

442 443 444
  val instBytes = if (HasCExtension) 2 else 4
  val instOffsetBits = log2Ceil(instBytes)

445
  val icacheParameters = coreParams.icacheParameters
J
Jiawei Lin 已提交
446
  val dcacheParameters = coreParams.dcacheParametersOpt.getOrElse(DCacheParameters())
447

448
  // dcache block cacheline when lr for LRSCCycles - LRSCBackOff cycles
449
  // for constrained LR/SC loop
450 451 452
  val LRSCCycles = 64
  // for lr storm
  val LRSCBackOff = 8
453 454 455 456

  // cache hierarchy configurations
  val l1BusDataWidth = 256

457 458 459 460 461 462 463 464 465 466 467 468 469
  // load violation predict
  val ResetTimeMax2Pow = 20 //1078576
  val ResetTimeMin2Pow = 10 //1024
  // wait table parameters
  val WaitTableSize = 1024
  val MemPredPCWidth = log2Up(WaitTableSize)
  val LWTUse2BitCounter = true
  // store set parameters
  val SSITSize = WaitTableSize
  val LFSTSize = 32
  val SSIDWidth = log2Up(LFSTSize)
  val LFSTWidth = 4
  val StoreSetEnable = true // LWT will be disabled if SS is enabled
470

471 472 473 474
  val loadExuConfigs = coreParams.loadExuConfigs
  val storeExuConfigs = coreParams.storeExuConfigs

  val intExuConfigs = coreParams.intExuConfigs
475

476
  val fpExuConfigs = coreParams.fpExuConfigs
477

478
  val exuConfigs = coreParams.exuConfigs
479

480 481 482 483 484 485 486 487
  val PCntIncrStep: Int = 6
  val numPCntHc: Int = 25
  val numPCntPtw: Int = 19

  val numCSRPCntFrontend = 8
  val numCSRPCntCtrl     = 8
  val numCSRPCntLsu      = 8
  val numCSRPCntHc       = 5
488
}