changeset 02cb69e5cfeb in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=02cb69e5cfeb
description:
        ruby: fixes to support more types of RubyRequests

diffstat:

 src/mem/ruby/system/Sequencer.cc |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r 54a65799e4c1 -r 02cb69e5cfeb src/mem/ruby/system/Sequencer.cc
--- a/src/mem/ruby/system/Sequencer.cc  Mon Apr 04 11:42:32 2011 -0500
+++ b/src/mem/ruby/system/Sequencer.cc  Wed Apr 06 14:41:41 2011 -0700
@@ -229,6 +229,7 @@
     Address line_addr(request->ruby_request.m_PhysicalAddress);
     line_addr.makeLineAddress();
     if ((request->ruby_request.m_Type == RubyRequestType_ST) ||
+        (request->ruby_request.m_Type == RubyRequestType_ATOMIC) ||
         (request->ruby_request.m_Type == RubyRequestType_RMW_Read) ||
         (request->ruby_request.m_Type == RubyRequestType_RMW_Write) ||
         (request->ruby_request.m_Type == RubyRequestType_Load_Linked) ||
@@ -381,6 +382,7 @@
     markRemoved();
 
     assert((request->ruby_request.m_Type == RubyRequestType_ST) ||
+           (request->ruby_request.m_Type == RubyRequestType_ATOMIC) ||
            (request->ruby_request.m_Type == RubyRequestType_RMW_Read) ||
            (request->ruby_request.m_Type == RubyRequestType_RMW_Write) ||
            (request->ruby_request.m_Type == RubyRequestType_Load_Linked) ||
@@ -648,6 +650,7 @@
       //
       case RubyRequestType_Load_Linked:
       case RubyRequestType_Store_Conditional:
+      case RubyRequestType_ATOMIC:
         ctype = RubyRequestType_ATOMIC;
         break;
       default:
@@ -671,8 +674,10 @@
 
     Address line_addr(request.m_PhysicalAddress);
     line_addr.makeLineAddress();
-    int proc_id = request.pkt->req->hasContextId() ?
-        request.pkt->req->contextId() : -1;
+    int proc_id = -1;
+    if (request.pkt != NULL && request.pkt->req->hasContextId()) {
+        proc_id = request.pkt->req->contextId();
+    }
     RubyRequest *msg = new RubyRequest(request.m_PhysicalAddress.getAddress(),
                                        request.data, request.m_Size,
                                        request.m_ProgramCounter.getAddress(),
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to