Skip to content

Commit

Permalink
fix performance counter csr write hazard
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Feb 6, 2024
1 parent e956ca0 commit 3c3be46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/scala/vexiiriscv/misc/PerformanceCounterPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ class PerformanceCounterPlugin(var additionalCounterCount : Int,
IDLE whenIsActive{
holdCsrWrite := False
cmd.oh := B(for (c <- counters.list) yield idleCsrAddress === c.counterId)
when(flusherCmd.valid){
when(csrWriteCmd.valid) {
goto(CSR_WRITE)
}elsewhen(flusherCmd.valid){
cmd.flusher := True
cmd.oh := flusherCmd.oh
flusherCmd.ready := True
Expand All @@ -160,8 +162,6 @@ class PerformanceCounterPlugin(var additionalCounterCount : Int,
cmd.flusher := False
csrReadCmd.ready := True
goto(READ_LOW)
} elsewhen(csrWriteCmd.valid){
goto(CSR_WRITE)
}
carry := False
}
Expand Down

0 comments on commit 3c3be46

Please sign in to comment.