xref: /XiangShan/src/main/scala/xiangshan/XSCore.scala (revision 3802dba502b91d813c1e563035b876c4e6288166)
1package xiangshan
2
3import chisel3._
4import chisel3.util._
5import top.Parameters
6import xiangshan.backend._
7import xiangshan.backend.dispatch.DispatchParameters
8import xiangshan.backend.exu.ExuParameters
9import xiangshan.backend.exu.Exu._
10import xiangshan.frontend._
11import xiangshan.mem._
12import xiangshan.backend.fu.HasExceptionNO
13import xiangshan.cache.{DCache,InstrUncache, DCacheParameters, ICache, ICacheParameters, L1plusCache, L1plusCacheParameters, PTW, Uncache, MemoryOpConstants, MissReq}
14import xiangshan.cache.prefetch._
15import chipsalliance.rocketchip.config
16import freechips.rocketchip.diplomacy.{AddressSet, LazyModule, LazyModuleImp}
17import freechips.rocketchip.tilelink.{TLBuffer, TLBundleParameters, TLCacheCork, TLClientNode, TLFilter, TLIdentityNode, TLToAXI4, TLWidthWidget, TLXbar}
18import freechips.rocketchip.devices.tilelink.{DevNullParams, TLError}
19import sifive.blocks.inclusivecache.{CacheParameters, InclusiveCache, InclusiveCacheMicroParameters}
20import freechips.rocketchip.amba.axi4.{AXI4Deinterleaver, AXI4Fragmenter, AXI4IdIndexer, AXI4IdentityNode, AXI4ToTL, AXI4UserYanker}
21import freechips.rocketchip.tile.HasFPUParameters
22import sifive.blocks.inclusivecache.PrefetcherIO
23import utils._
24
25object hartIdCore extends (() => Int) {
26  var x = 0
27  def apply(): Int = {
28    x = x + 1
29    x-1
30  }
31}
32
33case class XSCoreParameters
34(
35  XLEN: Int = 64,
36  HasMExtension: Boolean = true,
37  HasCExtension: Boolean = true,
38  HasDiv: Boolean = true,
39  HasICache: Boolean = true,
40  HasDCache: Boolean = true,
41  EnableStoreQueue: Boolean = true,
42  AddrBits: Int = 64,
43  VAddrBits: Int = 39,
44  PAddrBits: Int = 40,
45  HasFPU: Boolean = true,
46  FectchWidth: Int = 8,
47  EnableBPU: Boolean = true,
48  EnableBPD: Boolean = true,
49  EnableRAS: Boolean = true,
50  EnableLB: Boolean = false,
51  EnableLoop: Boolean = true,
52  EnableSC: Boolean = false,
53  HistoryLength: Int = 64,
54  BtbSize: Int = 2048,
55  JbtacSize: Int = 1024,
56  JbtacBanks: Int = 8,
57  RasSize: Int = 16,
58  CacheLineSize: Int = 512,
59  UBtbWays: Int = 16,
60  BtbWays: Int = 2,
61
62  EnableL1plusPrefetcher: Boolean = true,
63  IBufSize: Int = 32,
64  DecodeWidth: Int = 6,
65  RenameWidth: Int = 6,
66  CommitWidth: Int = 6,
67  BrqSize: Int = 32,
68  IssQueSize: Int = 12,
69  NRPhyRegs: Int = 160,
70  NRIntReadPorts: Int = 14,
71  NRIntWritePorts: Int = 8,
72  NRFpReadPorts: Int = 14,
73  NRFpWritePorts: Int = 8,
74  LoadQueueSize: Int = 64,
75  StoreQueueSize: Int = 48,
76  RoqSize: Int = 192,
77  dpParams: DispatchParameters = DispatchParameters(
78    IntDqSize = 32,
79    FpDqSize = 32,
80    LsDqSize = 32,
81    IntDqDeqWidth = 4,
82    FpDqDeqWidth = 4,
83    LsDqDeqWidth = 4
84  ),
85  exuParameters: ExuParameters = ExuParameters(
86    JmpCnt = 1,
87    AluCnt = 4,
88    MulCnt = 0,
89    MduCnt = 2,
90    FmacCnt = 4,
91    FmiscCnt = 2,
92    FmiscDivSqrtCnt = 0,
93    LduCnt = 2,
94    StuCnt = 2
95  ),
96  LoadPipelineWidth: Int = 2,
97  StorePipelineWidth: Int = 2,
98  StoreBufferSize: Int = 16,
99  RefillSize: Int = 512,
100  TlbEntrySize: Int = 32,
101  TlbSPEntrySize: Int = 4,
102  TlbL2EntrySize: Int = 256, // or 512
103  TlbL2SPEntrySize: Int = 16,
104  PtwL1EntrySize: Int = 16,
105  PtwL2EntrySize: Int = 256,
106  NumPerfCounters: Int = 16,
107  NrExtIntr: Int = 1
108)
109
110trait HasXSParameter {
111
112  val core = Parameters.get.coreParameters
113  val env = Parameters.get.envParameters
114
115  val XLEN = 64
116  val minFLen = 32
117  val fLen = 64
118  def xLen = 64
119  val HasMExtension = core.HasMExtension
120  val HasCExtension = core.HasCExtension
121  val HasDiv = core.HasDiv
122  val HasIcache = core.HasICache
123  val HasDcache = core.HasDCache
124  val EnableStoreQueue = core.EnableStoreQueue
125  val AddrBits = core.AddrBits // AddrBits is used in some cases
126  val VAddrBits = core.VAddrBits // VAddrBits is Virtual Memory addr bits
127  val PAddrBits = core.PAddrBits // PAddrBits is Phyical Memory addr bits
128  val AddrBytes = AddrBits / 8 // unused
129  val DataBits = XLEN
130  val DataBytes = DataBits / 8
131  val HasFPU = core.HasFPU
132  val FetchWidth = core.FectchWidth
133  val PredictWidth = FetchWidth * (if (HasCExtension) 2 else 1)
134  val EnableBPU = core.EnableBPU
135  val EnableBPD = core.EnableBPD // enable backing predictor(like Tage) in BPUStage3
136  val EnableRAS = core.EnableRAS
137  val EnableLB = core.EnableLB
138  val EnableLoop = core.EnableLoop
139  val EnableSC = core.EnableSC
140  val HistoryLength = core.HistoryLength
141  val BtbSize = core.BtbSize
142  // val BtbWays = 4
143  val BtbBanks = PredictWidth
144  // val BtbSets = BtbSize / BtbWays
145  val JbtacSize = core.JbtacSize
146  val JbtacBanks = core.JbtacBanks
147  val RasSize = core.RasSize
148  val CacheLineSize = core.CacheLineSize
149  val CacheLineHalfWord = CacheLineSize / 16
150  val ExtHistoryLength = HistoryLength + 64
151  val UBtbWays = core.UBtbWays
152  val BtbWays = core.BtbWays
153  val EnableL1plusPrefetcher = core.EnableL1plusPrefetcher
154  val IBufSize = core.IBufSize
155  val DecodeWidth = core.DecodeWidth
156  val RenameWidth = core.RenameWidth
157  val CommitWidth = core.CommitWidth
158  val BrqSize = core.BrqSize
159  val IssQueSize = core.IssQueSize
160  val BrTagWidth = log2Up(BrqSize)
161  val NRPhyRegs = core.NRPhyRegs
162  val PhyRegIdxWidth = log2Up(NRPhyRegs)
163  val RoqSize = core.RoqSize
164  val LoadQueueSize = core.LoadQueueSize
165  val StoreQueueSize = core.StoreQueueSize
166  val dpParams = core.dpParams
167  val exuParameters = core.exuParameters
168  val NRIntReadPorts = core.NRIntReadPorts
169  val NRIntWritePorts = core.NRIntWritePorts
170  val NRMemReadPorts = exuParameters.LduCnt + 2*exuParameters.StuCnt
171  val NRFpReadPorts = core.NRFpReadPorts
172  val NRFpWritePorts = core.NRFpWritePorts
173  val LoadPipelineWidth = core.LoadPipelineWidth
174  val StorePipelineWidth = core.StorePipelineWidth
175  val StoreBufferSize = core.StoreBufferSize
176  val RefillSize = core.RefillSize
177  val DTLBWidth = core.LoadPipelineWidth + core.StorePipelineWidth
178  val TlbEntrySize = core.TlbEntrySize
179  val TlbSPEntrySize = core.TlbSPEntrySize
180  val TlbL2EntrySize = core.TlbL2EntrySize
181  val TlbL2SPEntrySize = core.TlbL2SPEntrySize
182  val PtwL1EntrySize = core.PtwL1EntrySize
183  val PtwL2EntrySize = core.PtwL2EntrySize
184  val NumPerfCounters = core.NumPerfCounters
185  val NrExtIntr = core.NrExtIntr
186
187  val icacheParameters = ICacheParameters(
188    tagECC = Some("parity"),
189    dataECC = Some("parity"),
190    replacer = Some("setlru"),
191    nMissEntries = 2
192  )
193
194  val l1plusCacheParameters = L1plusCacheParameters(
195    tagECC = Some("secded"),
196    dataECC = Some("secded"),
197    nMissEntries = 8
198  )
199
200  val dcacheParameters = DCacheParameters(
201    tagECC = Some("secded"),
202    dataECC = Some("secded"),
203    nMissEntries = 16,
204    nLoadMissEntries = 8,
205    nStoreMissEntries = 8
206  )
207
208  val LRSCCycles = 100
209
210
211  // cache hierarchy configurations
212  val l1BusDataWidth = 256
213
214  // L2 configurations
215  val L1BusWidth = 256
216  val L2Size = 512 * 1024 // 512KB
217  val L2BlockSize = 64
218  val L2NWays = 8
219  val L2NSets = L2Size / L2BlockSize / L2NWays
220
221  // L3 configurations
222  val L2BusWidth = 256
223  val L3Size = 4 * 1024 * 1024 // 4MB
224  val L3BlockSize = 64
225  val L3NBanks = 4
226  val L3NWays = 8
227  val L3NSets = L3Size / L3BlockSize / L3NBanks / L3NWays
228
229  // on chip network configurations
230  val L3BusWidth = 256
231
232  // icache prefetcher
233  val l1plusPrefetcherParameters = L1plusPrefetcherParameters(
234    enable = true,
235    _type = "stream",
236    streamParams = StreamPrefetchParameters(
237      streamCnt = 2,
238      streamSize = 4,
239      ageWidth = 4,
240      blockBytes = l1plusCacheParameters.blockBytes,
241      reallocStreamOnMissInstantly = true,
242      cacheName = "icache"
243    )
244  )
245
246  // dcache prefetcher
247  val l2PrefetcherParameters = L2PrefetcherParameters(
248    enable = true,
249    _type = "bop",// "stream" or "bop"
250    streamParams = StreamPrefetchParameters(
251      streamCnt = 4,
252      streamSize = 4,
253      ageWidth = 4,
254      blockBytes = L2BlockSize,
255      reallocStreamOnMissInstantly = true,
256      cacheName = "dcache"
257    ),
258    bopParams = BOPParameters(
259      rrTableEntries = 256,
260      rrTagBits = 12,
261      scoreBits = 5,
262      roundMax = 50,
263      badScore = 1,
264      blockBytes = L2BlockSize,
265      nEntries = dcacheParameters.nMissEntries * 2 // TODO: this is too large
266    ),
267  )
268}
269
270trait HasXSLog { this: RawModule =>
271  implicit val moduleName: String = this.name
272}
273
274abstract class XSModule extends MultiIOModule
275  with HasXSParameter
276  with HasExceptionNO
277  with HasXSLog
278  with HasFPUParameters
279{
280  def io: Record
281}
282
283//remove this trait after impl module logic
284trait NeedImpl { this: RawModule =>
285  override protected def IO[T <: Data](iodef: T): T = {
286    println(s"[Warn]: (${this.name}) please reomve 'NeedImpl' after implement this module")
287    val io = chisel3.experimental.IO(iodef)
288    io <> DontCare
289    io
290  }
291}
292
293abstract class XSBundle extends Bundle
294  with HasXSParameter
295
296case class EnviromentParameters
297(
298  FPGAPlatform: Boolean = true,
299  EnableDebug: Boolean = false,
300  EnablePerfDebug: Boolean = false,
301  DualCoreDifftest: Boolean = false
302)
303
304// object AddressSpace extends HasXSParameter {
305//   // (start, size)
306//   // address out of MMIO will be considered as DRAM
307//   def mmio = List(
308//     (0x00000000L, 0x40000000L),  // internal devices, such as CLINT and PLIC
309//     (0x40000000L, 0x40000000L)   // external devices
310//   )
311
312//   def isMMIO(addr: UInt): Bool = mmio.map(range => {
313//     require(isPow2(range._2))
314//     val bits = log2Up(range._2)
315//     (addr ^ range._1.U)(PAddrBits-1, bits) === 0.U
316//   }).reduce(_ || _)
317// }
318
319
320
321class XSCore()(implicit p: config.Parameters) extends LazyModule
322  with HasXSParameter
323  with HasExeBlockHelper
324{
325
326  // to fast wake up fp, mem rs
327  val intBlockFastWakeUpFp = intExuConfigs.filter(fpFastFilter)
328  val intBlockSlowWakeUpFp = intExuConfigs.filter(fpSlowFilter)
329  val intBlockFastWakeUpInt = intExuConfigs.filter(intFastFilter)
330  val intBlockSlowWakeUpInt = intExuConfigs.filter(intSlowFilter)
331
332  val fpBlockFastWakeUpFp = fpExuConfigs.filter(fpFastFilter)
333  val fpBlockSlowWakeUpFp = fpExuConfigs.filter(fpSlowFilter)
334  val fpBlockFastWakeUpInt = fpExuConfigs.filter(intFastFilter)
335  val fpBlockSlowWakeUpInt = fpExuConfigs.filter(intSlowFilter)
336
337  // outer facing nodes
338  val frontend = LazyModule(new Frontend())
339  val l1pluscache = LazyModule(new L1plusCache())
340  val ptw = LazyModule(new PTW())
341  val l2Prefetcher = LazyModule(new L2Prefetcher())
342  val memBlock = LazyModule(new MemBlock(
343    fastWakeUpIn = intBlockFastWakeUpInt ++ intBlockFastWakeUpFp ++ fpBlockFastWakeUpInt ++ fpBlockFastWakeUpFp,
344    slowWakeUpIn = intBlockSlowWakeUpInt ++ intBlockSlowWakeUpFp ++ fpBlockSlowWakeUpInt ++ fpBlockSlowWakeUpFp,
345    fastFpOut = Seq(),
346    slowFpOut = loadExuConfigs,
347    fastIntOut = Seq(),
348    slowIntOut = loadExuConfigs
349  ))
350
351  lazy val module = new XSCoreImp(this)
352}
353
354class XSCoreImp(outer: XSCore) extends LazyModuleImp(outer)
355  with HasXSParameter
356  with HasExeBlockHelper
357{
358  val io = IO(new Bundle {
359    val externalInterrupt = new ExternalInterruptIO
360    val l2ToPrefetcher = Flipped(new PrefetcherIO(PAddrBits))
361  })
362
363  val difftestIO = IO(new DifftestBundle())
364  difftestIO <> DontCare
365
366  val trapIO = IO(new TrapIO())
367  trapIO <> DontCare
368
369  println(s"FPGAPlatform:${env.FPGAPlatform} EnableDebug:${env.EnableDebug}")
370  AddressSpace.printMemmap()
371
372  // to fast wake up fp, mem rs
373  val intBlockFastWakeUpFp = intExuConfigs.filter(fpFastFilter)
374  val intBlockSlowWakeUpFp = intExuConfigs.filter(fpSlowFilter)
375  val intBlockFastWakeUpInt = intExuConfigs.filter(intFastFilter)
376  val intBlockSlowWakeUpInt = intExuConfigs.filter(intSlowFilter)
377
378  val fpBlockFastWakeUpFp = fpExuConfigs.filter(fpFastFilter)
379  val fpBlockSlowWakeUpFp = fpExuConfigs.filter(fpSlowFilter)
380  val fpBlockFastWakeUpInt = fpExuConfigs.filter(intFastFilter)
381  val fpBlockSlowWakeUpInt = fpExuConfigs.filter(intSlowFilter)
382
383  val ctrlBlock = Module(new CtrlBlock)
384  val integerBlock = Module(new IntegerBlock(
385    fastWakeUpIn = fpBlockFastWakeUpInt,
386    slowWakeUpIn = fpBlockSlowWakeUpInt ++ loadExuConfigs,
387    fastFpOut = intBlockFastWakeUpFp,
388    slowFpOut = intBlockSlowWakeUpFp,
389    fastIntOut = intBlockFastWakeUpInt,
390    slowIntOut = intBlockSlowWakeUpInt
391  ))
392  val floatBlock = Module(new FloatBlock(
393    fastWakeUpIn = intBlockFastWakeUpFp,
394    slowWakeUpIn = intBlockSlowWakeUpFp ++ loadExuConfigs,
395    fastFpOut = fpBlockFastWakeUpFp,
396    slowFpOut = fpBlockSlowWakeUpFp,
397    fastIntOut = fpBlockFastWakeUpInt,
398    slowIntOut = fpBlockSlowWakeUpInt
399  ))
400
401  val frontend = outer.frontend.module
402  val memBlock = outer.memBlock.module
403  val l1pluscache = outer.l1pluscache.module
404  val ptw = outer.ptw.module
405  val l2Prefetcher = outer.l2Prefetcher.module
406
407  frontend.io.backend <> ctrlBlock.io.frontend
408  frontend.io.sfence <> integerBlock.io.fenceio.sfence
409  frontend.io.tlbCsr <> integerBlock.io.csrio.tlb
410
411  frontend.io.icacheMemAcq <> l1pluscache.io.req
412  l1pluscache.io.resp <> frontend.io.icacheMemGrant
413  l1pluscache.io.flush := frontend.io.l1plusFlush
414  frontend.io.fencei := integerBlock.io.fenceio.fencei
415
416  ctrlBlock.io.fromIntBlock <> integerBlock.io.toCtrlBlock
417  ctrlBlock.io.fromFpBlock <> floatBlock.io.toCtrlBlock
418  ctrlBlock.io.fromLsBlock <> memBlock.io.toCtrlBlock
419  ctrlBlock.io.toIntBlock <> integerBlock.io.fromCtrlBlock
420  ctrlBlock.io.toFpBlock <> floatBlock.io.fromCtrlBlock
421  ctrlBlock.io.toLsBlock <> memBlock.io.fromCtrlBlock
422
423  integerBlock.io.wakeUpIn.fastUops <> floatBlock.io.wakeUpIntOut.fastUops
424  integerBlock.io.wakeUpIn.fast <> floatBlock.io.wakeUpIntOut.fast
425  integerBlock.io.wakeUpIn.slow <> floatBlock.io.wakeUpIntOut.slow ++ memBlock.io.wakeUpIntOut.slow
426  integerBlock.io.toMemBlock <> memBlock.io.fromIntBlock
427
428  floatBlock.io.wakeUpIn.fastUops <> integerBlock.io.wakeUpFpOut.fastUops
429  floatBlock.io.wakeUpIn.fast <> integerBlock.io.wakeUpFpOut.fast
430  floatBlock.io.wakeUpIn.slow <> integerBlock.io.wakeUpFpOut.slow ++ memBlock.io.wakeUpFpOut.slow
431  floatBlock.io.toMemBlock <> memBlock.io.fromFpBlock
432
433
434  integerBlock.io.wakeUpIntOut.fast.map(_.ready := true.B)
435  integerBlock.io.wakeUpIntOut.slow.map(_.ready := true.B)
436  floatBlock.io.wakeUpFpOut.fast.map(_.ready := true.B)
437  floatBlock.io.wakeUpFpOut.slow.map(_.ready := true.B)
438
439  val wakeUpMem = Seq(
440    integerBlock.io.wakeUpIntOut,
441    integerBlock.io.wakeUpFpOut,
442    floatBlock.io.wakeUpIntOut,
443    floatBlock.io.wakeUpFpOut
444  )
445  memBlock.io.wakeUpIn.fastUops <> wakeUpMem.flatMap(_.fastUops)
446  memBlock.io.wakeUpIn.fast <> wakeUpMem.flatMap(w => w.fast.map(f => {
447	val raw = WireInit(f)
448	raw
449  }))
450  memBlock.io.wakeUpIn.slow <> wakeUpMem.flatMap(w => w.slow.map(s => {
451	val raw = WireInit(s)
452	raw
453  }))
454
455  integerBlock.io.csrio.fflags <> ctrlBlock.io.roqio.toCSR.fflags
456  integerBlock.io.csrio.dirty_fs <> ctrlBlock.io.roqio.toCSR.dirty_fs
457  integerBlock.io.csrio.exception <> ctrlBlock.io.roqio.exception
458  integerBlock.io.csrio.isInterrupt <> ctrlBlock.io.roqio.isInterrupt
459  integerBlock.io.csrio.trapTarget <> ctrlBlock.io.roqio.toCSR.trapTarget
460  integerBlock.io.csrio.interrupt <> ctrlBlock.io.roqio.toCSR.intrBitSet
461  integerBlock.io.csrio.memExceptionVAddr <> memBlock.io.lsqio.exceptionAddr.vaddr
462  integerBlock.io.csrio.externalInterrupt <> io.externalInterrupt
463  integerBlock.io.csrio.tlb <> memBlock.io.tlbCsr
464  integerBlock.io.csrio.perfinfo <> ctrlBlock.io.roqio.toCSR.perfinfo
465  integerBlock.io.fenceio.sfence <> memBlock.io.sfence
466  integerBlock.io.fenceio.sbuffer <> memBlock.io.fenceToSbuffer
467
468  floatBlock.io.frm <> integerBlock.io.csrio.frm
469
470  memBlock.io.lsqio.roq <> ctrlBlock.io.roqio.lsq
471  memBlock.io.lsqio.exceptionAddr.lsIdx.lqIdx := ctrlBlock.io.roqio.exception.bits.lqIdx
472  memBlock.io.lsqio.exceptionAddr.lsIdx.sqIdx := ctrlBlock.io.roqio.exception.bits.sqIdx
473  memBlock.io.lsqio.exceptionAddr.isStore := CommitType.lsInstIsStore(ctrlBlock.io.roqio.exception.bits.ctrl.commitType)
474
475  ptw.io.tlb(0) <> memBlock.io.ptw
476  ptw.io.tlb(1) <> frontend.io.ptw
477  ptw.io.sfence <> integerBlock.io.fenceio.sfence
478  ptw.io.csr    <> integerBlock.io.csrio.tlb
479
480  val l2PrefetcherIn = Wire(Decoupled(new MissReq))
481  if (l2PrefetcherParameters.enable && l2PrefetcherParameters._type == "bop") {
482    l2PrefetcherIn.valid := io.l2ToPrefetcher.acquire.valid
483    l2PrefetcherIn.bits := DontCare
484    l2PrefetcherIn.bits.addr := io.l2ToPrefetcher.acquire.bits.address
485    l2PrefetcherIn.bits.cmd := Mux(io.l2ToPrefetcher.acquire.bits.write, MemoryOpConstants.M_XWR, MemoryOpConstants.M_XRD)
486  } else {
487    l2PrefetcherIn <> memBlock.io.toDCachePrefetch
488  }
489  l2Prefetcher.io.in <> l2PrefetcherIn
490
491  if (!env.FPGAPlatform) {
492    val debugIntReg, debugFpReg = WireInit(VecInit(Seq.fill(32)(0.U(XLEN.W))))
493    ExcitingUtils.addSink(debugIntReg, "DEBUG_INT_ARCH_REG", ExcitingUtils.Debug)
494    ExcitingUtils.addSink(debugFpReg, "DEBUG_FP_ARCH_REG", ExcitingUtils.Debug)
495    val debugArchReg = WireInit(VecInit(debugIntReg ++ debugFpReg))
496    ExcitingUtils.addSource(debugArchReg, "difftestRegs", ExcitingUtils.Debug)
497  }
498
499  if (env.DualCoreDifftest) {
500    val id = hartIdCore()
501    difftestIO.fromSbuffer <> memBlock.difftestIO.fromSbuffer
502    difftestIO.fromSQ <> memBlock.difftestIO.fromSQ
503    difftestIO.fromCSR <> integerBlock.difftestIO.fromCSR
504    difftestIO.fromRoq <> ctrlBlock.difftestIO.fromRoq
505    trapIO <> ctrlBlock.trapIO
506
507    val debugIntReg, debugFpReg = WireInit(VecInit(Seq.fill(32)(0.U(XLEN.W))))
508    ExcitingUtils.addSink(debugIntReg, s"DEBUG_INT_ARCH_REG$id", ExcitingUtils.Debug)
509    ExcitingUtils.addSink(debugFpReg, s"DEBUG_FP_ARCH_REG$id", ExcitingUtils.Debug)
510    val debugArchReg = WireInit(VecInit(debugIntReg ++ debugFpReg))
511    difftestIO.fromXSCore.r := debugArchReg
512  }
513
514}
515