gem5-dev@gem5.org

The gem5 Developer List

View all threads

[S] Change in gem5/gem5[develop]: mem-ruby: fix data state for partial WU

TM
Tiago Muck (Gerrit)
Wed, Jun 1, 2022 3:23 PM

Tiago Muck has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/59989 )

Change subject: mem-ruby: fix data state for partial WU
......................................................................

mem-ruby: fix data state for partial WU

When receiving data from a WriteUniquePtl we were wrongfully clearing
the data valid flag.

JIRA: https://gem5.atlassian.net/browse/GEM5-1195

Change-Id: I5c17433f1cfb706e443a0169a9f0e99ff5c1fcc0
Signed-off-by: Tiago Mück tiago.muck@arm.com
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59989
Tested-by: kokoro noreply+kokoro@google.com
Reviewed-by: Jason Lowe-Power power.jg@gmail.com
Maintainer: Jason Lowe-Power power.jg@gmail.com

M src/mem/ruby/protocol/chi/CHI-cache-actions.sm
1 file changed, 25 insertions(+), 1 deletion(-)

Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass

diff --git a/src/mem/ruby/protocol/chi/CHI-cache-actions.sm
b/src/mem/ruby/protocol/chi/CHI-cache-actions.sm
index 968cdf2..7208fc2 100644
--- a/src/mem/ruby/protocol/chi/CHI-cache-actions.sm
+++ b/src/mem/ruby/protocol/chi/CHI-cache-actions.sm
@@ -1934,7 +1934,12 @@
peek(datInPort, CHIDataMsg) {
assert(in_msg.type == CHIDataType:NCBWrData);
tbe.dataDirty := true;

  •  tbe.dataValid := tbe.accSize == blockSize;
    
  •  if (tbe.reqType == CHIRequestType:WriteUniquePtl) {
    
  •    // we are just updating any valid data we already had
    
  •    tbe.dataValid := tbe.dataValid || (tbe.accSize == blockSize);
    
  •  } else {
    
  •    tbe.dataValid := tbe.accSize == blockSize;
    
  •  }
    }
    
    }
    printTBEState(tbe);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/59989
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I5c17433f1cfb706e443a0169a9f0e99ff5c1fcc0
Gerrit-Change-Number: 59989
Gerrit-PatchSet: 3
Gerrit-Owner: Tiago Muck tiago.muck@arm.com
Gerrit-Reviewer: Jason Lowe-Power jason@lowepower.com
Gerrit-Reviewer: Jason Lowe-Power power.jg@gmail.com
Gerrit-Reviewer: Tiago Muck tiago.muck@arm.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com
Gerrit-MessageType: merged

Tiago Muck has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/59989 ) Change subject: mem-ruby: fix data state for partial WU ...................................................................... mem-ruby: fix data state for partial WU When receiving data from a WriteUniquePtl we were wrongfully clearing the data valid flag. JIRA: https://gem5.atlassian.net/browse/GEM5-1195 Change-Id: I5c17433f1cfb706e443a0169a9f0e99ff5c1fcc0 Signed-off-by: Tiago Mück <tiago.muck@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59989 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> --- M src/mem/ruby/protocol/chi/CHI-cache-actions.sm 1 file changed, 25 insertions(+), 1 deletion(-) Approvals: Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/src/mem/ruby/protocol/chi/CHI-cache-actions.sm b/src/mem/ruby/protocol/chi/CHI-cache-actions.sm index 968cdf2..7208fc2 100644 --- a/src/mem/ruby/protocol/chi/CHI-cache-actions.sm +++ b/src/mem/ruby/protocol/chi/CHI-cache-actions.sm @@ -1934,7 +1934,12 @@ peek(datInPort, CHIDataMsg) { assert(in_msg.type == CHIDataType:NCBWrData); tbe.dataDirty := true; - tbe.dataValid := tbe.accSize == blockSize; + if (tbe.reqType == CHIRequestType:WriteUniquePtl) { + // we are just updating any valid data we already had + tbe.dataValid := tbe.dataValid || (tbe.accSize == blockSize); + } else { + tbe.dataValid := tbe.accSize == blockSize; + } } } printTBEState(tbe); -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/59989 To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I5c17433f1cfb706e443a0169a9f0e99ff5c1fcc0 Gerrit-Change-Number: 59989 Gerrit-PatchSet: 3 Gerrit-Owner: Tiago Muck <tiago.muck@arm.com> Gerrit-Reviewer: Jason Lowe-Power <jason@lowepower.com> Gerrit-Reviewer: Jason Lowe-Power <power.jg@gmail.com> Gerrit-Reviewer: Tiago Muck <tiago.muck@arm.com> Gerrit-Reviewer: kokoro <noreply+kokoro@google.com> Gerrit-MessageType: merged