Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MSHR): reject DS writes on Probe toT nested by Release #305

Merged
merged 2 commits into from
Dec 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/scala/coupledL2/tl2chi/MSHR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ class MSHR(implicit p: Parameters) extends TL2CHIL2Module with HasCHIOpcodes {
)
mp_probeack.metaWen := !req.snpHitRelease || req.snpHitReleaseToB
mp_probeack.tagWen := false.B
mp_probeack.dsWen := !snpToN && probeDirty
mp_probeack.dsWen := !snpToN && probeDirty && meta.clients.orR
mp_probeack.wayMask := 0.U(cacheParams.ways.W)
mp_probeack.reqSource := 0.U(MemReqSource.reqSourceBits.W)
mp_probeack.replTask := false.B
Expand Down Expand Up @@ -1142,7 +1142,7 @@ class MSHR(implicit p: Parameters) extends TL2CHIL2Module with HasCHIOpcodes {
/* ======== Handling Nested C ======== */
// for A miss, only when replResp do we finally choose a way, allowing nested C
// for A-alias, always allowing nested C (state.w_replResp === true.B)
// for CMO, always allowing nested C (state.s_cmoresp === false.B)
// for CMO, always allowing nested C on directory hit (state.s_cmoresp === false.B)
val nestedwb_match = req_valid && meta.state =/= INVALID &&
dirResult.set === io.nestedwb.set &&
dirResult.tag === io.nestedwb.tag &&
Expand All @@ -1154,6 +1154,8 @@ class MSHR(implicit p: Parameters) extends TL2CHIL2Module with HasCHIOpcodes {
when (nestedwb_match) {
when (io.nestedwb.c_set_dirty) {
meta.dirty := true.B
meta.state := TIP
meta.clients := Fill(clientBits, false.B)
}
when (io.nestedwb.b_inv_dirty && req.fromA) {
meta.dirty := false.B
Expand Down
Loading