Skip to content

Commit

Permalink
Fix wfi probe with multiple harts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Apr 3, 2024
1 parent 9172027 commit 156d6a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/vexiiriscv/execute/lsu/LsuPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ class LsuPlugin(var layer : LaneLayer,
val capture = False
val reserved = RegInit(False) setWhen(capture) //TODO punish on double reserve !
val address = RegNextWhen(apply(l1.PHYSICAL_ADDRESS), capture)
when(!elp.isFreezed() && l1.SEL && !l1.ABORD && !IO) {
when(!elp.isFreezed() && l1.SEL && !l1.ABORD && !IO) { //TODO this is probably missing some case
when(l1.STORE){
reserved := False
} elsewhen(apply(l1.ATOMIC)){
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/vexiiriscv/test/VexiiRiscvProbe.scala
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,8 @@ class VexiiRiscvProbe(cpu : VexiiRiscv, kb : Option[konata.Backend], var withRvl

def checkCommits(): Unit = {
val wfi = proxies.wfi.toInt
for(hart <- harts) {
if(((wfi >> hart.hartId) & 1) != 0){
for((hart, localHartId) <- harts.zipWithIndex) {
if(((wfi >> localHartId) & 1) != 0){
hart.lastCommitAt = cycle
}
if (checkLiveness && hart.lastCommitAt + 4000l < cycle) {
Expand Down

0 comments on commit 156d6a2

Please sign in to comment.