Fix BTB perf bug
In rare cases, it would replace into a different row than it recorded.
This commit is contained in:
parent
f3e22984d5
commit
c0e6ecebfc
@ -182,9 +182,8 @@ class BTB(implicit p: Parameters) extends BtbModule {
|
|||||||
val useUpdatePageHit = updatePageHit.orR
|
val useUpdatePageHit = updatePageHit.orR
|
||||||
val usePageHit = pageHit.orR
|
val usePageHit = pageHit.orR
|
||||||
val doIdxPageRepl = !useUpdatePageHit
|
val doIdxPageRepl = !useUpdatePageHit
|
||||||
val idxPageRepl = UIntToOH(nextPageRepl)
|
val idxPageRepl = Mux(usePageHit, Cat(pageHit(nPages-2,0), pageHit(nPages-1)), UIntToOH(nextPageRepl))
|
||||||
val idxPageUpdateOH = Mux(useUpdatePageHit, updatePageHit,
|
val idxPageUpdateOH = Mux(useUpdatePageHit, updatePageHit, idxPageRepl)
|
||||||
Mux(usePageHit, Cat(pageHit(nPages-2,0), pageHit(nPages-1)), idxPageRepl))
|
|
||||||
val idxPageUpdate = OHToUInt(idxPageUpdateOH)
|
val idxPageUpdate = OHToUInt(idxPageUpdateOH)
|
||||||
val idxPageReplEn = Mux(doIdxPageRepl, idxPageRepl, UInt(0))
|
val idxPageReplEn = Mux(doIdxPageRepl, idxPageRepl, UInt(0))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user