Only flush D$ on FENCE.I if it won't always be probed on I$ miss
This commit is contained in:
parent
991e16de92
commit
83875e3a0c
@ -6,7 +6,7 @@ import Chisel._
|
||||
import Chisel.ImplicitConversions._
|
||||
import freechips.rocketchip.config.Parameters
|
||||
import freechips.rocketchip.coreplex.{RationalCrossing, RocketCrossing, RocketTilesKey}
|
||||
import freechips.rocketchip.diplomacy.AddressSet
|
||||
import freechips.rocketchip.diplomacy.{AddressSet, RegionType}
|
||||
import freechips.rocketchip.tilelink._
|
||||
import freechips.rocketchip.util._
|
||||
import TLMessages._
|
||||
@ -640,7 +640,6 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) {
|
||||
val flushCounterNext = flushCounter +& 1
|
||||
val flushDone = (flushCounterNext >> log2Ceil(nSets)) === nWays
|
||||
val flushCounterWrap = flushCounterNext(log2Ceil(nSets)-1, 0)
|
||||
when (tl_out_a.fire() && !s2_uncached) { flushed := false }
|
||||
when (s2_valid_masked && s2_req.cmd === M_FLUSH_ALL) {
|
||||
io.cpu.s2_nack := !flushed
|
||||
when (!flushed) {
|
||||
@ -653,6 +652,9 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) {
|
||||
metaArb.io.in(5).bits.addr := Cat(io.cpu.req.bits.addr >> untagBits, flushCounter(idxBits-1, 0) << blockOffBits)
|
||||
metaArb.io.in(5).bits.way_en := ~UInt(0, nWays)
|
||||
metaArb.io.in(5).bits.data := metaArb.io.in(4).bits.data
|
||||
// Only flush D$ on FENCE.I if some cached executable regions are untracked.
|
||||
if (!edge.manager.managers.forall(m => !m.supportsAcquireB || !m.executable || m.regionType >= RegionType.TRACKED)) {
|
||||
when (tl_out_a.fire() && !s2_uncached) { flushed := false }
|
||||
when (flushing) {
|
||||
s1_victim_way := flushCounter >> log2Up(nSets)
|
||||
when (s2_flush_valid) {
|
||||
@ -666,6 +668,7 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) {
|
||||
flushing := false
|
||||
}
|
||||
}
|
||||
}
|
||||
metaArb.io.in(0).valid := resetting
|
||||
metaArb.io.in(0).bits.addr := metaArb.io.in(5).bits.addr
|
||||
metaArb.io.in(0).bits.write := true
|
||||
|
Loading…
Reference in New Issue
Block a user