1
0

fix get merging, and always turn it on

This commit is contained in:
Yunsup Lee 2015-03-17 22:43:00 -07:00
parent f4f59464df
commit aa5435800d

View File

@ -172,7 +172,6 @@ abstract trait L2HellaCacheParameters extends CacheParameters with CoherenceAgen
require(amoAluOperandBits <= innerDataBits) require(amoAluOperandBits <= innerDataBits)
require(rowBits == innerDataBits) // TODO: relax this by improving s_data_* states require(rowBits == innerDataBits) // TODO: relax this by improving s_data_* states
val nSecondaryMisses = 4 val nSecondaryMisses = 4
val enableGetMerging = false
} }
abstract class L2HellaCacheBundle extends Bundle with L2HellaCacheParameters abstract class L2HellaCacheBundle extends Bundle with L2HellaCacheParameters
@ -697,8 +696,7 @@ class L2AcquireTracker(trackerId: Int, bankId: Int) extends L2XactTracker {
val mergeDataInner = mergeData(innerDataBits) _ val mergeDataInner = mergeData(innerDataBits) _
val mergeDataOuter = mergeData(outerDataBits) _ val mergeDataOuter = mergeData(outerDataBits) _
val can_merge_iacq_get = Bool(enableGetMerging) && val can_merge_iacq_get = (xact.isBuiltInType(Acquire.getType) &&
(xact.isBuiltInType(Acquire.getType) &&
io.iacq().isBuiltInType(Acquire.getType)) && io.iacq().isBuiltInType(Acquire.getType)) &&
(xact_src === io.inner.acquire.bits.header.src) && (xact_src === io.inner.acquire.bits.header.src) &&
xact.conflicts(io.iacq()) && xact.conflicts(io.iacq()) &&
@ -979,13 +977,15 @@ class L2AcquireTracker(trackerId: Int, bankId: Int) extends L2XactTracker {
} }
// Handle Get and Put merging // Handle Get and Put merging
when(io.inner.acquire.fire() && io.iacq().hasData()) { when(io.inner.acquire.fire()) {
val beat = io.iacq().addr_beat when (io.iacq().hasData()) {
val wmask = io.iacq().wmask() val beat = io.iacq().addr_beat
val full = FillInterleaved(8, wmask) val wmask = io.iacq().wmask()
data_buffer(beat) := (~full & data_buffer(beat)) | (full & io.iacq().data) val full = FillInterleaved(8, wmask)
wmask_buffer(beat) := wmask | Mux(state === s_idle, Bits(0), wmask_buffer(beat)) data_buffer(beat) := (~full & data_buffer(beat)) | (full & io.iacq().data)
when(!xact.hasMultibeatData()) { ignt_q.io.enq.valid := Bool(true) } wmask_buffer(beat) := wmask | Mux(state === s_idle, Bits(0), wmask_buffer(beat))
}
when(!io.iacq().hasMultibeatData()) { ignt_q.io.enq.valid := Bool(true) }
} }
assert(!(state != s_idle && io.inner.acquire.fire() && assert(!(state != s_idle && io.inner.acquire.fire() &&