Gabriel Busnot has uploaded this change for review. ( 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
---
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(-)



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: 1
Gerrit-Owner: Gabriel Busnot <garbage2collec...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to