提交 37255a1f 编写于 作者: L LinJiawei

Send 'hitTrap' to emu after a 'RegNext'

上级 a428082b
......@@ -788,7 +788,9 @@ class CSR extends FunctionUnit(csrCfg) with HasCSRConst{
}
val xstrap = WireInit(false.B)
BoringUtils.addSink(xstrap, "XSTRAP")
if(!env.FPGAPlatform && EnableBPU){
ExcitingUtils.addSink(xstrap, "XSTRAP", ConnectionType.Debug)
}
def readWithScala(addr: Int): UInt = mapping(addr)._1
if (!env.FPGAPlatform) {
......
package xiangshan.backend.roq
import chisel3.ExcitingUtils.ConnectionType
import chisel3._
import chisel3.util._
import xiangshan._
......@@ -291,14 +292,14 @@ class Roq extends XSModule {
val trapCode = PriorityMux(wdata.zip(trapVec).map(x => x._2 -> x._1))
val trapPC = PriorityMux(wpc.zip(trapVec).map(x => x._2 ->x._1))
ExcitingUtils.addSource(hitTrap, "trapValid")
ExcitingUtils.addSource(trapCode, "trapCode")
ExcitingUtils.addSource(trapPC, "trapPC")
ExcitingUtils.addSource(GTimer(), "trapCycleCnt")
ExcitingUtils.addSource(instrCnt, "trapInstrCnt")
ExcitingUtils.addSource(RegNext(hitTrap), "trapValid")
ExcitingUtils.addSource(RegNext(trapCode), "trapCode")
ExcitingUtils.addSource(RegNext(trapPC), "trapPC")
ExcitingUtils.addSource(RegNext(GTimer()), "trapCycleCnt")
ExcitingUtils.addSource(RegNext(instrCnt), "trapInstrCnt")
if(EnableBPU){
BoringUtils.addSource(hitTrap, "XSTRAP")
ExcitingUtils.addSource(hitTrap, "XSTRAP", ConnectionType.Debug)
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册