1
0

Debug: Fix off-by-1 for detecting nonexistent harts.

This commit is contained in:
Megan Wachs 2017-04-07 15:22:16 -07:00 committed by Andrew Waterman
parent 01372e1686
commit 051acee76c

View File

@ -524,7 +524,7 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int)(implicit p:
val unavailVec = Wire(init = Vec.fill(nComponents){false.B}) val unavailVec = Wire(init = Vec.fill(nComponents){false.B})
unavailVec := io.debugUnavail unavailVec := io.debugUnavail
when (selectedHartReg > nComponents.U) { when (selectedHartReg >= nComponents.U) {
DMSTATUSRdData.allnonexistent := true.B DMSTATUSRdData.allnonexistent := true.B
DMSTATUSRdData.anynonexistent := true.B DMSTATUSRdData.anynonexistent := true.B
}.elsewhen (unavailVec(selectedHartReg)) { }.elsewhen (unavailVec(selectedHartReg)) {