make sure no-data voluntary releases get tracked
This commit is contained in:
parent
ebe95fa827
commit
b75b6fdcda
@ -113,14 +113,13 @@ class BufferedBroadcastVoluntaryReleaseTracker(trackerId: Int)(implicit p: Param
|
|||||||
// A release beat can be accepted if we are idle, if its a mergeable transaction, or if its a tail beat
|
// A release beat can be accepted if we are idle, if its a mergeable transaction, or if its a tail beat
|
||||||
io.inner.release.ready := state === s_idle || irel_can_merge || irel_same_xact
|
io.inner.release.ready := state === s_idle || irel_can_merge || irel_same_xact
|
||||||
|
|
||||||
when(irel_is_allocating) { pending_orel := io.irel().hasData() }
|
|
||||||
|
|
||||||
when(io.inner.release.fire()) { data_buffer(io.irel().addr_beat) := io.irel().data }
|
when(io.inner.release.fire()) { data_buffer(io.irel().addr_beat) := io.irel().data }
|
||||||
|
|
||||||
// Dispatch outer release
|
// Dispatch outer release
|
||||||
outerRelease(
|
outerRelease(
|
||||||
coh = outer_coh.onHit(M_XWR),
|
coh = outer_coh.onHit(M_XWR),
|
||||||
data = data_buffer(vol_ognt_counter.up.idx))
|
data = data_buffer(vol_ognt_counter.up.idx),
|
||||||
|
add_pending_send_bit = irel_is_allocating)
|
||||||
|
|
||||||
quiesce() {}
|
quiesce() {}
|
||||||
}
|
}
|
||||||
|
@ -1045,11 +1045,16 @@ class L2WritebackUnit(val trackerId: Int)(implicit p: Parameters) extends XactTr
|
|||||||
// If a release didn't write back data, have to read it from data array
|
// If a release didn't write back data, have to read it from data array
|
||||||
readDataArray(drop_pending_bit = dropPendingBitWhenBeatHasData(io.inner.release))
|
readDataArray(drop_pending_bit = dropPendingBitWhenBeatHasData(io.inner.release))
|
||||||
|
|
||||||
|
val coh = io.wb.req.bits.coh
|
||||||
|
val needs_inner_probes = coh.inner.requiresProbesOnVoluntaryWriteback()
|
||||||
|
val needs_outer_release = coh.outer.requiresVoluntaryWriteback()
|
||||||
|
|
||||||
// Once the data is buffered we can write it back to outer memory
|
// Once the data is buffered we can write it back to outer memory
|
||||||
outerRelease(
|
outerRelease(
|
||||||
coh = outer_coh,
|
coh = outer_coh,
|
||||||
data = data_buffer(vol_ognt_counter.up.idx),
|
data = data_buffer(vol_ognt_counter.up.idx),
|
||||||
add_pending_bit = addPendingBitInternal(io.data.resp))
|
add_pending_data_bits = addPendingBitInternal(io.data.resp),
|
||||||
|
add_pending_send_bit = io.wb.req.fire() && needs_outer_release)
|
||||||
|
|
||||||
// Respond to the initiating transaction handler signalling completion of the writeback
|
// Respond to the initiating transaction handler signalling completion of the writeback
|
||||||
io.wb.resp.valid := state === s_busy && all_pending_done
|
io.wb.resp.valid := state === s_busy && all_pending_done
|
||||||
@ -1064,14 +1069,9 @@ class L2WritebackUnit(val trackerId: Int)(implicit p: Parameters) extends XactTr
|
|||||||
xact_way_en := io.wb.req.bits.way_en
|
xact_way_en := io.wb.req.bits.way_en
|
||||||
xact_addr_block := (if (cacheIdBits == 0) Cat(io.wb.req.bits.tag, io.wb.req.bits.idx)
|
xact_addr_block := (if (cacheIdBits == 0) Cat(io.wb.req.bits.tag, io.wb.req.bits.idx)
|
||||||
else Cat(io.wb.req.bits.tag, io.wb.req.bits.idx, UInt(cacheId, cacheIdBits)))
|
else Cat(io.wb.req.bits.tag, io.wb.req.bits.idx, UInt(cacheId, cacheIdBits)))
|
||||||
val coh = io.wb.req.bits.coh
|
|
||||||
val needs_inner_probes = coh.inner.requiresProbesOnVoluntaryWriteback()
|
|
||||||
val needs_outer_release = coh.outer.requiresVoluntaryWriteback()
|
|
||||||
when(needs_inner_probes) { initializeProbes() }
|
when(needs_inner_probes) { initializeProbes() }
|
||||||
pending_reads := Mux(needs_outer_release, ~UInt(0, width = innerDataBeats), UInt(0))
|
pending_reads := Mux(needs_outer_release, ~UInt(0, width = innerDataBeats), UInt(0))
|
||||||
pending_resps := UInt(0)
|
pending_resps := UInt(0)
|
||||||
pending_orel := needs_outer_release
|
|
||||||
//pending_orel_data := UInt(0)
|
|
||||||
pending_coh := coh
|
pending_coh := coh
|
||||||
state := Mux(needs_inner_probes, s_inner_probe, s_busy)
|
state := Mux(needs_inner_probes, s_inner_probe, s_busy)
|
||||||
}
|
}
|
||||||
|
@ -264,18 +264,23 @@ trait AcceptsVoluntaryReleases extends HasVoluntaryReleaseMetadataBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
trait EmitsVoluntaryReleases extends HasVoluntaryReleaseMetadataBuffer {
|
trait EmitsVoluntaryReleases extends HasVoluntaryReleaseMetadataBuffer {
|
||||||
val pending_orel = Reg(init=Bool(false))
|
val pending_orel_send = Reg(init=Bool(false))
|
||||||
val pending_orel_data = Reg(init=Bits(0, width = innerDataBeats))
|
val pending_orel_data = Reg(init=Bits(0, width = innerDataBeats))
|
||||||
val vol_ognt_counter = Wire(new TwoWayBeatCounterStatus)
|
val vol_ognt_counter = Wire(new TwoWayBeatCounterStatus)
|
||||||
|
val pending_orel = pending_orel_send || pending_orel_data.orR || vol_ognt_counter.pending
|
||||||
|
|
||||||
def outerRelease(
|
def outerRelease(
|
||||||
coh: ClientMetadata,
|
coh: ClientMetadata,
|
||||||
buffering: Bool = Bool(true),
|
buffering: Bool = Bool(true),
|
||||||
data: UInt = io.irel().data,
|
data: UInt = io.irel().data,
|
||||||
add_pending_bit: UInt = UInt(0)) {
|
add_pending_data_bits: UInt = UInt(0),
|
||||||
|
add_pending_send_bit: Bool = Bool(false)) {
|
||||||
|
|
||||||
pending_orel_data := (pending_orel_data & dropPendingBitWhenBeatHasData(io.outer.release)) |
|
pending_orel_data := (pending_orel_data & dropPendingBitWhenBeatHasData(io.outer.release)) |
|
||||||
addPendingBitWhenBeatHasData(io.inner.release) |
|
addPendingBitWhenBeatHasData(io.inner.release) |
|
||||||
add_pending_bit
|
add_pending_data_bits
|
||||||
|
when (add_pending_send_bit) { pending_orel_send := Bool(true) }
|
||||||
|
when (io.outer.release.fire()) { pending_orel_send := Bool(false) }
|
||||||
|
|
||||||
connectTwoWayBeatCounters(
|
connectTwoWayBeatCounters(
|
||||||
status = vol_ognt_counter,
|
status = vol_ognt_counter,
|
||||||
@ -290,7 +295,7 @@ trait EmitsVoluntaryReleases extends HasVoluntaryReleaseMetadataBuffer {
|
|||||||
pending_orel_data(vol_ognt_counter.up.idx),
|
pending_orel_data(vol_ognt_counter.up.idx),
|
||||||
io.inner.release.valid),
|
io.inner.release.valid),
|
||||||
pending_orel)
|
pending_orel)
|
||||||
|
|
||||||
|
|
||||||
io.outer.release.bits := coh.makeVoluntaryWriteback(
|
io.outer.release.bits := coh.makeVoluntaryWriteback(
|
||||||
client_xact_id = UInt(0), // TODO was tracker id, but not needed?
|
client_xact_id = UInt(0), // TODO was tracker id, but not needed?
|
||||||
@ -298,9 +303,6 @@ trait EmitsVoluntaryReleases extends HasVoluntaryReleaseMetadataBuffer {
|
|||||||
addr_beat = vol_ognt_counter.up.idx,
|
addr_beat = vol_ognt_counter.up.idx,
|
||||||
data = data)
|
data = data)
|
||||||
|
|
||||||
when(pending_orel_data.orR) { pending_orel := Bool(true) }
|
|
||||||
when(vol_ognt_counter.up.done) { pending_orel := Bool(false) }
|
|
||||||
|
|
||||||
io.outer.grant.ready := state === s_busy
|
io.outer.grant.ready := state === s_busy
|
||||||
|
|
||||||
scoreboard += (pending_orel, vol_ognt_counter.pending)
|
scoreboard += (pending_orel, vol_ognt_counter.pending)
|
||||||
|
Loading…
Reference in New Issue
Block a user