Fix lookup succeeding on invalid entry; add test case

also enable VCS FSDB annotation in chiseltest
This commit is contained in:
Hansung Kim
2023-03-12 03:24:56 -07:00
parent 6de95587de
commit 400b356cfb
2 changed files with 57 additions and 12 deletions

View File

@@ -258,9 +258,10 @@ class InflightCoalReqTable(
// If entry with a lower index is empty, it always takes priority
cascadeMatchIndex(i) := Mux(match_, i.U, cascadeMatchIndex(i + 1))
}
val matchIndex = cascadeMatchIndex(0)
val matchValid = Wire(Bool())
matchValid := table(matchIndex).bits.respSourceId === io.lookupSourceId
val matchIndex = Wire(UInt())
matchIndex := cascadeMatchIndex(0)
val matchValid = table(matchIndex).valid &&
(table(matchIndex).bits.respSourceId === io.lookupSourceId)
io.lookup.valid := matchValid
// TODO: return something actually useful
io.lookup.bits := table(matchIndex).bits.respSourceId
@@ -272,7 +273,6 @@ class InflightCoalReqTable(
}
dontTouch(io.lookup)
dontTouch(matchIndex)
dontTouch(matchValid)
}
class InflightCoalReqTableEntry(val numLanes: Int, val sourceWidth: Int)