remove unnecessary UInt encode/decode on releaseMatches path
This commit is contained in:
parent
3698153535
commit
e3efc09b5b
@ -304,6 +304,7 @@ class TSHRFile(implicit p: Parameters) extends L2HellaCacheModule()(p)
|
|||||||
|
|
||||||
// WritebackUnit evicts data from L2, including invalidating L1s
|
// WritebackUnit evicts data from L2, including invalidating L1s
|
||||||
val wb = Module(new L2WritebackUnit(nTransactors))
|
val wb = Module(new L2WritebackUnit(nTransactors))
|
||||||
|
val trackerAndWbIOs = trackerList.map(_.io) :+ wb.io
|
||||||
doInternalOutputArbitration(wb.io.wb.req, trackerList.map(_.io.wb.req))
|
doInternalOutputArbitration(wb.io.wb.req, trackerList.map(_.io.wb.req))
|
||||||
doInternalInputRouting(wb.io.wb.resp, trackerList.map(_.io.wb.resp))
|
doInternalInputRouting(wb.io.wb.resp, trackerList.map(_.io.wb.resp))
|
||||||
|
|
||||||
@ -329,15 +330,12 @@ class TSHRFile(implicit p: Parameters) extends L2HellaCacheModule()(p)
|
|||||||
"At most a single tracker should match for any given Acquire")
|
"At most a single tracker should match for any given Acquire")
|
||||||
|
|
||||||
// Wire releases from clients
|
// Wire releases from clients
|
||||||
val trackerReleaseIOs = trackerList.map(_.io.inner.release) :+ wb.io.inner.release
|
val releaseReadys = Vec(trackerAndWbIOs.map(_.inner.release.ready)).toBits
|
||||||
val releaseReadys = Vec(trackerReleaseIOs.map(_.ready)).toBits
|
val releaseMatches = Vec(trackerAndWbIOs.map(_.has_release_match)).toBits
|
||||||
val releaseMatches = Vec(trackerList.map(_.io.has_release_match) :+ wb.io.has_release_match).toBits
|
io.inner.release.ready := (releaseMatches & releaseReadys).orR
|
||||||
val release_idx = OHToUInt(releaseMatches)
|
trackerAndWbIOs foreach { tracker =>
|
||||||
io.inner.release.ready := releaseReadys(release_idx)
|
tracker.inner.release.bits := io.inner.release.bits
|
||||||
trackerReleaseIOs.zipWithIndex.foreach {
|
tracker.inner.release.valid := io.inner.release.valid && tracker.has_release_match
|
||||||
case(tracker, i) =>
|
|
||||||
tracker.bits := io.inner.release.bits
|
|
||||||
tracker.valid := io.inner.release.valid && (release_idx === UInt(i))
|
|
||||||
}
|
}
|
||||||
assert(PopCount(releaseMatches) <= UInt(nReleaseTransactors),
|
assert(PopCount(releaseMatches) <= UInt(nReleaseTransactors),
|
||||||
"At most a single tracker should match for any given Release")
|
"At most a single tracker should match for any given Release")
|
||||||
|
Loading…
Reference in New Issue
Block a user