Gabriel Busnot has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/46561 )

Change subject: mem-ruby: Fix RubySystem::functionalRead with partial data
......................................................................

mem-ruby: Fix RubySystem::functionalRead with partial data

Some protocol other than CHI require the read-write and/or read-only and/or
backing-store controller's buffers to be checked if the system is busy.

More details in issue GEM5-1000

Change-Id: I0ad6385ad5a88fc158e68e4c63c540504b817ccb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46561
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/mem/ruby/system/RubySystem.cc
1 file changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/src/mem/ruby/system/RubySystem.cc b/src/mem/ruby/system/RubySystem.cc
index 239b652..caee770 100644
--- a/src/mem/ruby/system/RubySystem.cc
+++ b/src/mem/ruby/system/RubySystem.cc
@@ -651,13 +651,21 @@
     for (auto ctrl : ctrl_ro)
         ctrl->functionalRead(line_address, pkt, bytes);

-    ctrl_bs->functionalRead(line_address, pkt, bytes);
+    if (ctrl_bs)
+        ctrl_bs->functionalRead(line_address, pkt, bytes);

// if there is any busy controller or bytes still not set, then a partial
     // and/or dirty copy of the line might be in a message buffer or the
     // network
     if (!ctrl_busy.empty() || !bytes.isFull()) {
-        DPRINTF(RubySystem, "Reading from busy controllers and network\n");
+        DPRINTF(RubySystem, "Reading from remaining controllers, "
+                            "buffers and networks\n");
+        if (ctrl_rw != nullptr)
+            ctrl_rw->functionalReadBuffers(pkt, bytes);
+        for (auto ctrl : ctrl_ro)
+            ctrl->functionalReadBuffers(pkt, bytes);
+        if (ctrl_bs != nullptr)
+            ctrl_bs->functionalReadBuffers(pkt, bytes);
         for (auto ctrl : ctrl_busy) {
             ctrl->functionalRead(line_address, pkt, bytes);
             ctrl->functionalReadBuffers(pkt, bytes);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46561
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: I0ad6385ad5a88fc158e68e4c63c540504b817ccb
Gerrit-Change-Number: 46561
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriel Busnot <garbage2collec...@gmail.com>
Gerrit-Reviewer: Gabriel Busnot <garbage2collec...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
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