Skip to content

Commit

Permalink
[tests] Separate vectore write frd & rd in probe.
Browse files Browse the repository at this point in the history
  • Loading branch information
qinjun-li authored and FanShupei committed Dec 3, 2024
1 parent 37e4483 commit d219c3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions rocketv/src/RocketCore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class RocketProbe(param: RocketParameter) extends Bundle {
val waitWen: Bool = new Bool()
val waitWaddr: UInt = UInt(param.lgNXRegs.W)
val isVectorCommit: Bool = Bool()
val isVectorWrite: Bool = Bool()
val vectorWriteRD: Bool = Bool()
val vectorWriteFD: Bool = Bool()
val idle: Bool = Bool()
// fpu score board
val fpuScoreboard: Option[FPUScoreboardProbe] = Option.when(param.usingFPU)(new FPUScoreboardProbe)
Expand Down Expand Up @@ -1637,7 +1638,8 @@ class Rocket(val parameter: RocketParameter)
wbRegValid && wbRegDecodeOutput(parameter.decoderParameter.vector) &&
!wbRegDecodeOutput(parameter.decoderParameter.vectorCSR)
}.getOrElse(false.B)
probeWire.isVectorWrite := t1RetireQueue.map(q => q.deq.fire).getOrElse(false.B)
probeWire.vectorWriteRD := t1RetireQueue.map(q => q.deq.fire && !q.deq.bits.isFp).getOrElse(false.B)
probeWire.vectorWriteFD := t1RetireQueue.map(q => q.deq.fire && q.deq.bits.isFp).getOrElse(false.B)
probeWire.idle := vectorEmpty

probeWire.wbRegPc := wbRegPc
Expand Down
4 changes: 2 additions & 2 deletions t1rocketemu/src/TestBench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class TestBench(val parameter: T1RocketTileParameter)
// output the probes
// rocket reg write
when(
rocketProbe.rfWen && !rocketProbe.isVectorWrite && rocketProbe.rfWaddr =/= 0.U && !(rocketProbe.waitWen && rocketProbe.waitWaddr =/= 0.U)
rocketProbe.rfWen && !rocketProbe.vectorWriteRD && rocketProbe.rfWaddr =/= 0.U && !(rocketProbe.waitWen && rocketProbe.waitWaddr =/= 0.U)
)(
printf(
cf"""{"event":"RegWrite","idx":${rocketProbe.rfWaddr},"data":"${rocketProbe.rfWdata}%x","cycle":${simulationTime}}\n"""
Expand All @@ -190,7 +190,7 @@ class TestBench(val parameter: T1RocketTileParameter)
)
)
)
val isVectorForLLWrite = RegNext(rocketProbe.isVectorWrite, false.B)
val isVectorForLLWrite = RegNext(rocketProbe.vectorWriteFD, false.B)

fpToIEEE.io.clock := clock
fpToIEEE.io.reset := reset
Expand Down

0 comments on commit d219c3d

Please sign in to comment.