Skip to content

Commit

Permalink
[t1rocket] fix wrong logic when reg wait and write at same clock
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed Aug 24, 2024
1 parent 0338833 commit 7676d43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t1rocketemu/src/TestBench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ class TestBench(generator: SerializableModuleGenerator[T1RocketTile, T1RocketTil

// output the probes
// rocket reg write
when(rocketProbe.rfWen && !rocketProbe.isVector && rocketProbe.rfWaddr =/= 0.U)(
when(rocketProbe.rfWen && !rocketProbe.isVector && rocketProbe.rfWaddr =/= 0.U && !(rocketProbe.waitWen && rocketProbe.waitWaddr =/= 0.U))(
printf(
cf"""{"event":"RegWrite","idx":${rocketProbe.rfWaddr},"data":"${rocketProbe.rfWdata}%x","cycle":${simulationTime}}\n"""
)
)

when(rocketProbe.waitWen && !rocketProbe.isVector && rocketProbe.waitWaddr =/= 0.U)( // should this judge vector?
when(rocketProbe.waitWen && !rocketProbe.isVector && rocketProbe.waitWaddr =/= 0.U)(
printf(
cf"""{"event":"RegWriteWait","idx":${rocketProbe.waitWaddr},"cycle":${simulationTime}}\n"""
)
Expand Down

0 comments on commit 7676d43

Please sign in to comment.