xref: /XiangShan/src/main/scala/xiangshan/Parameters.scala (revision 51e45dbbf87325e45ff2af6ca86ed6c7eed04464)
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
17package xiangshan
18
19import org.chipsalliance.cde.config.{Field, Parameters}
20import chisel3._
21import chisel3.util._
22import xiangshan.backend.exu._
23import xiangshan.backend.dispatch.DispatchParameters
24import xiangshan.cache.DCacheParameters
25import xiangshan.cache.prefetch._
26import xiangshan.frontend.{BasePredictor, BranchPredictionResp, FTB, FakePredictor, RAS, Tage, ITTage, Tage_SC, FauFTB}
27import xiangshan.frontend.icache.ICacheParameters
28import xiangshan.cache.mmu.{L2TLBParameters, TLBParameters}
29import freechips.rocketchip.diplomacy.AddressSet
30import system.SoCParamsKey
31import huancun._
32import huancun.debug._
33import xiangshan.cache.wpu.WPUParameters
34import coupledL2._
35import xiangshan.mem.prefetch.{PrefetcherParams, SMSParams}
36
37import scala.math.min
38
39case object XSTileKey extends Field[Seq[XSCoreParameters]]
40
41case object XSCoreParamsKey extends Field[XSCoreParameters]
42
43case class XSCoreParameters
44(
45  HasPrefetch: Boolean = false,
46  HartId: Int = 0,
47  XLEN: Int = 64,
48  VLEN: Int = 128,
49  HasMExtension: Boolean = true,
50  HasCExtension: Boolean = true,
51  HasDiv: Boolean = true,
52  HasICache: Boolean = true,
53  HasDCache: Boolean = true,
54  AddrBits: Int = 64,
55  VAddrBits: Int = 39,
56  HasFPU: Boolean = true,
57  HasCustomCSRCacheOp: Boolean = true,
58  FetchWidth: Int = 8,
59  AsidLength: Int = 16,
60  EnableBPU: Boolean = true,
61  EnableBPD: Boolean = true,
62  EnableRAS: Boolean = true,
63  EnableLB: Boolean = false,
64  EnableLoop: Boolean = true,
65  EnableSC: Boolean = true,
66  EnbaleTlbDebug: Boolean = false,
67  EnableJal: Boolean = false,
68  EnableFauFTB: Boolean = true,
69  UbtbGHRLength: Int = 4,
70  // HistoryLength: Int = 512,
71  EnableGHistDiff: Boolean = true,
72  EnableCommitGHistDiff: Boolean = true,
73  UbtbSize: Int = 256,
74  FtbSize: Int = 2048,
75  RasSize: Int = 32,
76  RasSpecSize: Int = 64,
77  RasCtrSize: Int = 8,
78  CacheLineSize: Int = 512,
79  FtbWays: Int = 4,
80  TageTableInfos: Seq[Tuple3[Int,Int,Int]] =
81  //       Sets  Hist   Tag
82    // Seq(( 2048,    2,    8),
83    //     ( 2048,    9,    8),
84    //     ( 2048,   13,    8),
85    //     ( 2048,   20,    8),
86    //     ( 2048,   26,    8),
87    //     ( 2048,   44,    8),
88    //     ( 2048,   73,    8),
89    //     ( 2048,  256,    8)),
90    Seq(( 4096,    8,    8),
91        ( 4096,   13,    8),
92        ( 4096,   32,    8),
93        ( 4096,  119,    8)),
94  ITTageTableInfos: Seq[Tuple3[Int,Int,Int]] =
95  //      Sets  Hist   Tag
96    Seq(( 256,    4,    9),
97        ( 256,    8,    9),
98        ( 512,   13,    9),
99        ( 512,   16,    9),
100        ( 512,   32,    9)),
101  SCNRows: Int = 512,
102  SCNTables: Int = 4,
103  SCCtrBits: Int = 6,
104  SCHistLens: Seq[Int] = Seq(0, 4, 10, 16),
105  numBr: Int = 2,
106  branchPredictor: Function2[BranchPredictionResp, Parameters, Tuple2[Seq[BasePredictor], BranchPredictionResp]] =
107    ((resp_in: BranchPredictionResp, p: Parameters) => {
108      val ftb = Module(new FTB()(p))
109      val ubtb =Module(new FauFTB()(p))
110      // val bim = Module(new BIM()(p))
111      val tage = Module(new Tage_SC()(p))
112      val ras = Module(new RAS()(p))
113      val ittage = Module(new ITTage()(p))
114      val preds = Seq(ubtb, tage, ftb, ittage, ras)
115      preds.map(_.io := DontCare)
116
117      // ubtb.io.resp_in(0)  := resp_in
118      // bim.io.resp_in(0)   := ubtb.io.resp
119      // btb.io.resp_in(0)   := bim.io.resp
120      // tage.io.resp_in(0)  := btb.io.resp
121      // loop.io.resp_in(0)  := tage.io.resp
122      ubtb.io.in.bits.resp_in(0) := resp_in
123      tage.io.in.bits.resp_in(0) := ubtb.io.out
124      ftb.io.in.bits.resp_in(0)  := tage.io.out
125      ittage.io.in.bits.resp_in(0)  := ftb.io.out
126      ras.io.in.bits.resp_in(0) := ittage.io.out
127
128      (preds, ras.io.out)
129    }),
130  IBufSize: Int = 48,
131  DecodeWidth: Int = 6,
132  RenameWidth: Int = 6,
133  CommitWidth: Int = 6,
134  EnableRenameSnapshot: Boolean = true,
135  RenameSnapshotNum: Int = 4,
136  FtqSize: Int = 64,
137  EnableLoadFastWakeUp: Boolean = true, // NOTE: not supported now, make it false
138  IssQueSize: Int = 16,
139  NRPhyRegs: Int = 192,
140  VirtualLoadQueueSize: Int = 80,
141  LoadQueueRARSize: Int = 80,
142  LoadQueueRAWSize: Int = 64, // NOTE: make sure that LoadQueueRAWSize is power of 2.
143  RollbackGroupSize: Int = 8,
144  LoadQueueReplaySize: Int = 72,
145  LoadUncacheBufferSize: Int = 20,
146  LoadQueueNWriteBanks: Int = 8, // NOTE: make sure that LoadQueueRARSize/LoadQueueRAWSize is divided by LoadQueueNWriteBanks
147  StoreQueueSize: Int = 64,
148  StoreQueueNWriteBanks: Int = 8, // NOTE: make sure that StoreQueueSize is divided by StoreQueueNWriteBanks
149  StoreQueueForwardWithMask: Boolean = true,
150  VlsQueueSize: Int = 8,
151  RobSize: Int = 256,
152  dpParams: DispatchParameters = DispatchParameters(
153    IntDqSize = 16,
154    FpDqSize = 16,
155    LsDqSize = 16,
156    IntDqDeqWidth = 4,
157    FpDqDeqWidth = 4,
158    LsDqDeqWidth = 4
159  ),
160  exuParameters: ExuParameters = ExuParameters(
161    JmpCnt = 1,
162    AluCnt = 4,
163    MulCnt = 0,
164    MduCnt = 2,
165    FmacCnt = 4,
166    FmiscCnt = 2,
167    FmiscDivSqrtCnt = 0,
168    LduCnt = 2,
169    StuCnt = 2
170  ),
171  prefetcher: Option[PrefetcherParams] = Some(SMSParams()),
172  LoadPipelineWidth: Int = 2,
173  StorePipelineWidth: Int = 2,
174  VecMemSrcInWidth: Int = 2,
175  VecMemInstWbWidth: Int = 1,
176  VecMemDispatchWidth: Int = 1,
177  StoreBufferSize: Int = 16,
178  StoreBufferThreshold: Int = 7,
179  EnsbufferWidth: Int = 2,
180  UncacheBufferSize: Int = 4,
181  EnableLoadToLoadForward: Boolean = true,
182  EnableFastForward: Boolean = true,
183  EnableLdVioCheckAfterReset: Boolean = true,
184  EnableSoftPrefetchAfterReset: Boolean = true,
185  EnableCacheErrorAfterReset: Boolean = true,
186  EnableAccurateLoadError: Boolean = true,
187  EnableUncacheWriteOutstanding: Boolean = false,
188  EnableStorePrefetchAtIssue: Boolean = false,
189  EnableStorePrefetchAtCommit: Boolean = false,
190  EnableAtCommitMissTrigger: Boolean = true,
191  EnableStorePrefetchSMS: Boolean = false,
192  EnableStorePrefetchSPB: Boolean = false,
193  MMUAsidLen: Int = 16, // max is 16, 0 is not supported now
194  ReSelectLen: Int = 7, // load replay queue replay select counter len
195  iwpuParameters: WPUParameters = WPUParameters(
196    enWPU = false,
197    algoName = "mmru",
198    isICache = true,
199  ),
200  dwpuParameters: WPUParameters = WPUParameters(
201    enWPU = false,
202    algoName = "mmru",
203    enCfPred = false,
204    isICache = false,
205  ),
206  itlbParameters: TLBParameters = TLBParameters(
207    name = "itlb",
208    fetchi = true,
209    useDmode = false,
210    NWays = 48,
211  ),
212  itlbPortNum: Int = 2 + ICacheParameters().prefetchPipeNum + 1,
213  ipmpPortNum: Int = 2 + ICacheParameters().prefetchPipeNum + 1,
214  ldtlbParameters: TLBParameters = TLBParameters(
215    name = "ldtlb",
216    NWays = 48,
217    outReplace = false,
218    partialStaticPMP = true,
219    outsideRecvFlush = true,
220    saveLevel = true
221  ),
222  sttlbParameters: TLBParameters = TLBParameters(
223    name = "sttlb",
224    NWays = 48,
225    outReplace = false,
226    partialStaticPMP = true,
227    outsideRecvFlush = true,
228    saveLevel = true
229  ),
230  pftlbParameters: TLBParameters = TLBParameters(
231    name = "pftlb",
232    NWays = 48,
233    outReplace = false,
234    partialStaticPMP = true,
235    outsideRecvFlush = true,
236    saveLevel = true
237  ),
238  refillBothTlb: Boolean = false,
239  btlbParameters: TLBParameters = TLBParameters(
240    name = "btlb",
241    NWays = 48,
242  ),
243  l2tlbParameters: L2TLBParameters = L2TLBParameters(),
244  NumPerfCounters: Int = 16,
245  icacheParameters: ICacheParameters = ICacheParameters(
246    tagECC = Some("parity"),
247    dataECC = Some("parity"),
248    replacer = Some("setplru"),
249    nMissEntries = 2,
250    nProbeEntries = 2,
251    nPrefetchEntries = 12,
252    nPrefBufferEntries = 32,
253  ),
254  dcacheParametersOpt: Option[DCacheParameters] = Some(DCacheParameters(
255    tagECC = Some("secded"),
256    dataECC = Some("secded"),
257    replacer = Some("setplru"),
258    nMissEntries = 16,
259    nProbeEntries = 8,
260    nReleaseEntries = 18,
261    nMaxPrefetchEntry = 6,
262  )),
263  L2CacheParamsOpt: Option[L2Param] = Some(L2Param(
264    name = "l2",
265    ways = 8,
266    sets = 1024, // default 512KB L2
267    prefetch = Some(coupledL2.prefetch.PrefetchReceiverParams())
268  )),
269  L2NBanks: Int = 1,
270  usePTWRepeater: Boolean = false,
271  softTLB: Boolean = false, // dpi-c l1tlb debug only
272  softPTW: Boolean = false, // dpi-c l2tlb debug only
273  softPTWDelay: Int = 1
274){
275  val allHistLens = SCHistLens ++ ITTageTableInfos.map(_._2) ++ TageTableInfos.map(_._2) :+ UbtbGHRLength
276  val HistoryLength = allHistLens.max + numBr * FtqSize + 9 // 256 for the predictor configs now
277
278  val loadExuConfigs = Seq.fill(exuParameters.LduCnt)(LdExeUnitCfg)
279  val storeExuConfigs = Seq.fill(exuParameters.StuCnt)(StaExeUnitCfg) ++ Seq.fill(exuParameters.StuCnt)(StdExeUnitCfg)
280
281  val intExuConfigs = (Seq.fill(exuParameters.AluCnt)(AluExeUnitCfg) ++
282    Seq.fill(exuParameters.MduCnt)(MulDivExeUnitCfg) :+ JumpCSRExeUnitCfg)
283
284  val fpExuConfigs =
285    Seq.fill(exuParameters.FmacCnt)(FmacExeUnitCfg) ++
286      Seq.fill(exuParameters.FmiscCnt)(FmiscExeUnitCfg)
287
288  val exuConfigs: Seq[ExuConfig] = intExuConfigs ++ fpExuConfigs ++ loadExuConfigs ++ storeExuConfigs
289}
290
291case object DebugOptionsKey extends Field[DebugOptions]
292
293case class DebugOptions
294(
295  FPGAPlatform: Boolean = false,
296  EnableDifftest: Boolean = false,
297  AlwaysBasicDiff: Boolean = true,
298  EnableDebug: Boolean = false,
299  EnablePerfDebug: Boolean = true,
300  UseDRAMSim: Boolean = false,
301  EnableConstantin: Boolean = false,
302  EnableChiselDB: Boolean = false,
303  AlwaysBasicDB: Boolean = true,
304  EnableRollingDB: Boolean = false
305)
306
307trait HasXSParameter {
308
309  implicit val p: Parameters
310
311  val PAddrBits = p(SoCParamsKey).PAddrBits // PAddrBits is Phyical Memory addr bits
312
313  val coreParams = p(XSCoreParamsKey)
314  val env = p(DebugOptionsKey)
315
316  val XLEN = coreParams.XLEN
317  val VLEN = coreParams.VLEN
318  val minFLen = 32
319  val fLen = 64
320  def xLen = XLEN
321
322  val HasMExtension = coreParams.HasMExtension
323  val HasCExtension = coreParams.HasCExtension
324  val HasDiv = coreParams.HasDiv
325  val HasIcache = coreParams.HasICache
326  val HasDcache = coreParams.HasDCache
327  val AddrBits = coreParams.AddrBits // AddrBits is used in some cases
328  val VAddrBits = coreParams.VAddrBits // VAddrBits is Virtual Memory addr bits
329  val AsidLength = coreParams.AsidLength
330  val ReSelectLen = coreParams.ReSelectLen
331  val AddrBytes = AddrBits / 8 // unused
332  val DataBits = XLEN
333  val DataBytes = DataBits / 8
334  val VDataBytes = VLEN / 8
335  val HasFPU = coreParams.HasFPU
336  val HasCustomCSRCacheOp = coreParams.HasCustomCSRCacheOp
337  val FetchWidth = coreParams.FetchWidth
338  val PredictWidth = FetchWidth * (if (HasCExtension) 2 else 1)
339  val EnableBPU = coreParams.EnableBPU
340  val EnableBPD = coreParams.EnableBPD // enable backing predictor(like Tage) in BPUStage3
341  val EnableRAS = coreParams.EnableRAS
342  val EnableLB = coreParams.EnableLB
343  val EnableLoop = coreParams.EnableLoop
344  val EnableSC = coreParams.EnableSC
345  val EnbaleTlbDebug = coreParams.EnbaleTlbDebug
346  val HistoryLength = coreParams.HistoryLength
347  val EnableGHistDiff = coreParams.EnableGHistDiff
348  val EnableCommitGHistDiff = coreParams.EnableCommitGHistDiff
349  val UbtbGHRLength = coreParams.UbtbGHRLength
350  val UbtbSize = coreParams.UbtbSize
351  val EnableFauFTB = coreParams.EnableFauFTB
352  val FtbSize = coreParams.FtbSize
353  val FtbWays = coreParams.FtbWays
354  val RasSize = coreParams.RasSize
355  val RasSpecSize = coreParams.RasSpecSize
356  val RasCtrSize = coreParams.RasCtrSize
357
358  def getBPDComponents(resp_in: BranchPredictionResp, p: Parameters) = {
359    coreParams.branchPredictor(resp_in, p)
360  }
361  val numBr = coreParams.numBr
362  val TageTableInfos = coreParams.TageTableInfos
363  val TageBanks = coreParams.numBr
364  val SCNRows = coreParams.SCNRows
365  val SCCtrBits = coreParams.SCCtrBits
366  val SCHistLens = coreParams.SCHistLens
367  val SCNTables = coreParams.SCNTables
368
369  val SCTableInfos = Seq.fill(SCNTables)((SCNRows, SCCtrBits)) zip SCHistLens map {
370    case ((n, cb), h) => (n, cb, h)
371  }
372  val ITTageTableInfos = coreParams.ITTageTableInfos
373  type FoldedHistoryInfo = Tuple2[Int, Int]
374  val foldedGHistInfos =
375    (TageTableInfos.map{ case (nRows, h, t) =>
376      if (h > 0)
377        Set((h, min(log2Ceil(nRows/numBr), h)), (h, min(h, t)), (h, min(h, t-1)))
378      else
379        Set[FoldedHistoryInfo]()
380    }.reduce(_++_).toSet ++
381    SCTableInfos.map{ case (nRows, _, h) =>
382      if (h > 0)
383        Set((h, min(log2Ceil(nRows/TageBanks), h)))
384      else
385        Set[FoldedHistoryInfo]()
386    }.reduce(_++_).toSet ++
387    ITTageTableInfos.map{ case (nRows, h, t) =>
388      if (h > 0)
389        Set((h, min(log2Ceil(nRows), h)), (h, min(h, t)), (h, min(h, t-1)))
390      else
391        Set[FoldedHistoryInfo]()
392    }.reduce(_++_) ++
393      Set[FoldedHistoryInfo]((UbtbGHRLength, log2Ceil(UbtbSize)))
394    ).toList
395
396
397
398  val CacheLineSize = coreParams.CacheLineSize
399  val CacheLineHalfWord = CacheLineSize / 16
400  val ExtHistoryLength = HistoryLength + 64
401  val IBufSize = coreParams.IBufSize
402  val DecodeWidth = coreParams.DecodeWidth
403  val RenameWidth = coreParams.RenameWidth
404  val CommitWidth = coreParams.CommitWidth
405  val EnableRenameSnapshot = coreParams.EnableRenameSnapshot
406  val RenameSnapshotNum = coreParams.RenameSnapshotNum
407  val FtqSize = coreParams.FtqSize
408  val IssQueSize = coreParams.IssQueSize
409  val EnableLoadFastWakeUp = coreParams.EnableLoadFastWakeUp
410  val NRPhyRegs = coreParams.NRPhyRegs
411  val PhyRegIdxWidth = log2Up(NRPhyRegs)
412  val RobSize = coreParams.RobSize
413  val IntRefCounterWidth = log2Ceil(RobSize)
414  val VirtualLoadQueueSize = coreParams.VirtualLoadQueueSize
415  val LoadQueueRARSize = coreParams.LoadQueueRARSize
416  val LoadQueueRAWSize = coreParams.LoadQueueRAWSize
417  val RollbackGroupSize = coreParams.RollbackGroupSize
418  val LoadQueueReplaySize = coreParams.LoadQueueReplaySize
419  val LoadUncacheBufferSize = coreParams.LoadUncacheBufferSize
420  val LoadQueueNWriteBanks = coreParams.LoadQueueNWriteBanks
421  val StoreQueueSize = coreParams.StoreQueueSize
422  val StoreQueueNWriteBanks = coreParams.StoreQueueNWriteBanks
423  val StoreQueueForwardWithMask = coreParams.StoreQueueForwardWithMask
424  val VlsQueueSize = coreParams.VlsQueueSize
425  val dpParams = coreParams.dpParams
426  val exuParameters = coreParams.exuParameters
427  val NRMemReadPorts = exuParameters.LduCnt + 2 * exuParameters.StuCnt
428  val NRIntReadPorts = 2 * exuParameters.AluCnt + NRMemReadPorts
429  val NRIntWritePorts = exuParameters.AluCnt + exuParameters.MduCnt + exuParameters.LduCnt
430  val NRFpReadPorts = 3 * exuParameters.FmacCnt + exuParameters.StuCnt
431  val NRFpWritePorts = exuParameters.FpExuCnt + exuParameters.LduCnt
432  val NumRedirect = exuParameters.JmpCnt + exuParameters.AluCnt
433  val BackendRedirectNum = NumRedirect + 2 //2: ldReplay + Exception
434  val LoadPipelineWidth = coreParams.LoadPipelineWidth
435  val StorePipelineWidth = coreParams.StorePipelineWidth
436  val VecMemSrcInWidth = coreParams.VecMemSrcInWidth
437  val VecMemInstWbWidth = coreParams.VecMemInstWbWidth
438  val VecMemDispatchWidth = coreParams.VecMemDispatchWidth
439  val StoreBufferSize = coreParams.StoreBufferSize
440  val StoreBufferThreshold = coreParams.StoreBufferThreshold
441  val EnsbufferWidth = coreParams.EnsbufferWidth
442  val UncacheBufferSize = coreParams.UncacheBufferSize
443  val EnableLoadToLoadForward = coreParams.EnableLoadToLoadForward
444  val EnableFastForward = coreParams.EnableFastForward
445  val EnableLdVioCheckAfterReset = coreParams.EnableLdVioCheckAfterReset
446  val EnableSoftPrefetchAfterReset = coreParams.EnableSoftPrefetchAfterReset
447  val EnableCacheErrorAfterReset = coreParams.EnableCacheErrorAfterReset
448  val EnableAccurateLoadError = coreParams.EnableAccurateLoadError
449  val EnableUncacheWriteOutstanding = coreParams.EnableUncacheWriteOutstanding
450  val EnableStorePrefetchAtIssue = coreParams.EnableStorePrefetchAtIssue
451  val EnableStorePrefetchAtCommit = coreParams.EnableStorePrefetchAtCommit
452  val EnableAtCommitMissTrigger = coreParams.EnableAtCommitMissTrigger
453  val EnableStorePrefetchSMS = coreParams.EnableStorePrefetchSMS
454  val EnableStorePrefetchSPB = coreParams.EnableStorePrefetchSPB
455  val asidLen = coreParams.MMUAsidLen
456  val BTLBWidth = coreParams.LoadPipelineWidth + coreParams.StorePipelineWidth
457  val refillBothTlb = coreParams.refillBothTlb
458  val iwpuParam = coreParams.iwpuParameters
459  val dwpuParam = coreParams.dwpuParameters
460  val itlbParams = coreParams.itlbParameters
461  val ldtlbParams = coreParams.ldtlbParameters
462  val sttlbParams = coreParams.sttlbParameters
463  val pftlbParams = coreParams.pftlbParameters
464  val btlbParams = coreParams.btlbParameters
465  val l2tlbParams = coreParams.l2tlbParameters
466  val NumPerfCounters = coreParams.NumPerfCounters
467
468  val NumRs = (exuParameters.JmpCnt+1)/2 + (exuParameters.AluCnt+1)/2 + (exuParameters.MulCnt+1)/2 +
469              (exuParameters.MduCnt+1)/2 + (exuParameters.FmacCnt+1)/2 +  + (exuParameters.FmiscCnt+1)/2 +
470              (exuParameters.FmiscDivSqrtCnt+1)/2 + (exuParameters.LduCnt+1)/2 +
471              (exuParameters.StuCnt+1)/2 + (exuParameters.StuCnt+1)/2
472
473  val instBytes = if (HasCExtension) 2 else 4
474  val instOffsetBits = log2Ceil(instBytes)
475
476  val icacheParameters = coreParams.icacheParameters
477  val dcacheParameters = coreParams.dcacheParametersOpt.getOrElse(DCacheParameters())
478
479  // dcache block cacheline when lr for LRSCCycles - LRSCBackOff cycles
480  // for constrained LR/SC loop
481  val LRSCCycles = 64
482  // for lr storm
483  val LRSCBackOff = 8
484
485  // cache hierarchy configurations
486  val l1BusDataWidth = 256
487
488  // load violation predict
489  val ResetTimeMax2Pow = 20 //1078576
490  val ResetTimeMin2Pow = 10 //1024
491  // wait table parameters
492  val WaitTableSize = 1024
493  val MemPredPCWidth = log2Up(WaitTableSize)
494  val LWTUse2BitCounter = true
495  // store set parameters
496  val SSITSize = WaitTableSize
497  val LFSTSize = 32
498  val SSIDWidth = log2Up(LFSTSize)
499  val LFSTWidth = 4
500  val StoreSetEnable = true // LWT will be disabled if SS is enabled
501  val LFSTEnable = false
502  val loadExuConfigs = coreParams.loadExuConfigs
503  val storeExuConfigs = coreParams.storeExuConfigs
504
505  val intExuConfigs = coreParams.intExuConfigs
506
507  val fpExuConfigs = coreParams.fpExuConfigs
508
509  val exuConfigs = coreParams.exuConfigs
510
511  val PCntIncrStep: Int = 6
512  val numPCntHc: Int = 25
513  val numPCntPtw: Int = 19
514
515  val numCSRPCntFrontend = 8
516  val numCSRPCntCtrl     = 8
517  val numCSRPCntLsu      = 8
518  val numCSRPCntHc       = 5
519}
520