Gabriel Busnot has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/46559 )
Change subject: mem-ruby: Fix wrong test in CHI functional reads
......................................................................
mem-ruby: Fix wrong test in CHI functional reads
A bad write mask inclusion test in CHI cache functionalRead and CHI data
message
functionalRead was causing clean data not to be read in some cases. The
issue is
detailed in issue GEM5-1002.
Change-Id: I91254fa87636e8d22a8b2f27ad375f68f997932d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46559
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Tiago Mück <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
M src/mem/ruby/protocol/chi/CHI-msg.sm
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks
good to me, approved
Tiago Mück: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
b/src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
index db008b0..40f33ce 100644
--- a/src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
+++ b/src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
@@ -215,7 +215,7 @@
WriteMask test_mask := mask;
test_mask.orMask(read_mask);
- if ((test_mask.cmpMask(mask) == false) || dirty) {
+ if ((mask.cmpMask(test_mask) == false) || dirty) {
if (from_tbe) {
if(testAndReadMask(addr, tbe.dataBlk, read_mask, pkt)) {
DPRINTF(RubySlicc, "functionalRead tbe %x %s dirty=%d %s %s\n",
addr, tbe.dataBlk, tbe.dataDirty, read_mask, mask);
diff --git a/src/mem/ruby/protocol/chi/CHI-msg.sm
b/src/mem/ruby/protocol/chi/CHI-msg.sm
index d51fb76..22fc508 100644
--- a/src/mem/ruby/protocol/chi/CHI-msg.sm
+++ b/src/mem/ruby/protocol/chi/CHI-msg.sm
@@ -217,7 +217,7 @@
assert(bitMask.isEmpty() == false);
WriteMask test_mask := mask;
test_mask.orMask(bitMask);
- if ((test_mask.cmpMask(mask) == false) || is_dirty) {
+ if ((mask.cmpMask(test_mask) == false) || is_dirty) {
if (testAndReadMask(addr, dataBlk, bitMask, pkt)) {
mask.orMask(bitMask);
return true;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46559
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: I91254fa87636e8d22a8b2f27ad375f68f997932d
Gerrit-Change-Number: 46559
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriel Busnot <[email protected]>
Gerrit-Reviewer: Gabriel Busnot <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Tiago Mück <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-CC: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s