1
0

Merge pull request #834 from freechipsproject/resumereq-race

debug: Fix race between resumereq and resumeack
This commit is contained in:
Megan Wachs 2017-06-29 13:38:20 -07:00 committed by GitHub
commit ae6971b6db

View File

@ -540,8 +540,10 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int)(implicit p:
DMSTATUSRdData.anyrunning := true.B
}
DMSTATUSRdData.allresumeack := ~resumeReqRegs(selectedHartReg)
DMSTATUSRdData.anyresumeack := ~resumeReqRegs(selectedHartReg)
val resumereq = io.innerCtrl.fire() && io.innerCtrl.bits.resumereq
DMSTATUSRdData.allresumeack := ~resumeReqRegs(selectedHartReg) && ~resumereq
DMSTATUSRdData.anyresumeack := ~resumeReqRegs(selectedHartReg) && ~resumereq
//TODO
DMSTATUSRdData.cfgstrvalid := false.B
@ -710,7 +712,7 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int)(implicit p:
resumeReqRegs(component) := false.B
}
}
when(io.innerCtrl.fire() && io.innerCtrl.bits.resumereq) {
when(resumereq) {
resumeReqRegs(io.innerCtrl.bits.hartsel) := true.B
}
}