Ruby: Update the Ruby request type names for LL/SC
authorJoel Hestness <hestness@cs.utexas.edu>
Mon, 7 Feb 2011 06:14:18 +0000 (22:14 -0800)
committerJoel Hestness <hestness@cs.utexas.edu>
Mon, 7 Feb 2011 06:14:18 +0000 (22:14 -0800)
src/mem/ruby/libruby.cc
src/mem/ruby/libruby.hh
src/mem/ruby/recorder/TraceRecord.cc
src/mem/ruby/system/DMASequencer.cc
src/mem/ruby/system/RubyPort.cc
src/mem/ruby/system/Sequencer.cc

index 2b61ce96c2d386c3e079273cfbb30a7442146de7..fe4cbcd52f39508518afceaf849560c607ca4a8f 100644 (file)
@@ -50,10 +50,10 @@ RubyRequestType_to_string(const RubyRequestType& obj)
         return "LD";
       case RubyRequestType_ST:
         return "ST";
-      case RubyRequestType_Locked_Read:
-        return "Locked_Read";
-      case RubyRequestType_Locked_Write:
-        return "Locked_Write";
+      case RubyRequestType_Load_Linked:
+        return "Load_Linked";
+      case RubyRequestType_Store_Conditional:
+        return "Store_Conditional";
       case RubyRequestType_RMW_Read:
         return "RMW_Read";
       case RubyRequestType_RMW_Write:
@@ -75,9 +75,9 @@ string_to_RubyRequestType(string str)
     else if (str == "ST")
         return RubyRequestType_ST;
     else if (str == "Locked_Read")
-        return RubyRequestType_Locked_Read;
+        return RubyRequestType_Load_Linked;
     else if (str == "Locked_Write")
-        return RubyRequestType_Locked_Write;
+        return RubyRequestType_Store_Conditional;
     else if (str == "RMW_Read")
         return RubyRequestType_RMW_Read;
     else if (str == "RMW_Write")
index ac29a377fe280d8b4fad308da1912ffd5073b60c..70b5bde20738c28eec0d6d9b7db4cffd038e5939 100644 (file)
@@ -40,8 +40,8 @@ enum RubyRequestType {
   RubyRequestType_IFETCH,
   RubyRequestType_LD,
   RubyRequestType_ST,
-  RubyRequestType_Locked_Read,
-  RubyRequestType_Locked_Write,
+  RubyRequestType_Load_Linked,
+  RubyRequestType_Store_Conditional,
   RubyRequestType_RMW_Read,
   RubyRequestType_RMW_Write,
   RubyRequestType_NUM
index 7f1e963694a76367dca322c0bc65308d329c0626..e8cff9459b90390186722786771f2d9d077f65ff 100644 (file)
@@ -45,9 +45,9 @@ TraceRecord::TraceRecord(Sequencer* _sequencer, const Address& data_addr,
 
     // Don't differentiate between store misses and atomic requests in
     // the trace
-    if (m_type == RubyRequestType_Locked_Read) {
+    if (m_type == RubyRequestType_Load_Linked) {
         m_type = RubyRequestType_ST;
-    } else if (m_type == RubyRequestType_Locked_Write) {
+    } else if (m_type == RubyRequestType_Store_Conditional) {
         m_type = RubyRequestType_ST;
     }
 }
index 4d10a1e2f05c1fa1528708ae7e4fe98993b6dae8..f864c10188ac373d3687c7e40496afb562759b3c 100644 (file)
@@ -66,8 +66,8 @@ DMASequencer::makeRequest(const RubyRequest &request)
         break;
       case RubyRequestType_NULL:
       case RubyRequestType_IFETCH:
-      case RubyRequestType_Locked_Read:
-      case RubyRequestType_Locked_Write:
+      case RubyRequestType_Load_Linked:
+      case RubyRequestType_Store_Conditional:
       case RubyRequestType_RMW_Read:
       case RubyRequestType_RMW_Write:
       case RubyRequestType_NUM:
index b3225cdca57c98d361c142ca85e726cfe9d440a6..7dbc22e19d67f14d54419a96816d7071ab454994 100644 (file)
@@ -195,11 +195,11 @@ RubyPort::M5Port::recvTiming(PacketPtr pkt)
     if (pkt->isLLSC()) {
         if (pkt->isWrite()) {
             DPRINTF(MemoryAccess, "Issuing SC\n");
-            type = RubyRequestType_Locked_Write;
+            type = RubyRequestType_Store_Conditional;
         } else {
             DPRINTF(MemoryAccess, "Issuing LL\n");
             assert(pkt->isRead());
-            type = RubyRequestType_Locked_Read;
+            type = RubyRequestType_Load_Linked;
         }
     } else {
         if (pkt->isRead()) {
index a82bcd2af9269b2e62f490e21c9436a894cd6dbc..66829ed45073947b46034bd29d7492f96ba44310 100644 (file)
@@ -231,8 +231,8 @@ Sequencer::insertRequest(SequencerRequest* request)
     if ((request->ruby_request.type == RubyRequestType_ST) ||
         (request->ruby_request.type == RubyRequestType_RMW_Read) ||
         (request->ruby_request.type == RubyRequestType_RMW_Write) ||
-        (request->ruby_request.type == RubyRequestType_Locked_Read) ||
-        (request->ruby_request.type == RubyRequestType_Locked_Write)) {
+        (request->ruby_request.type == RubyRequestType_Load_Linked) ||
+        (request->ruby_request.type == RubyRequestType_Store_Conditional)) {
         pair<RequestTable::iterator, bool> r =
             m_writeRequestTable.insert(RequestTable::value_type(line_addr, 0));
         bool success = r.second;
@@ -290,8 +290,8 @@ Sequencer::removeRequest(SequencerRequest* srequest)
     if ((ruby_request.type == RubyRequestType_ST) ||
         (ruby_request.type == RubyRequestType_RMW_Read) ||
         (ruby_request.type == RubyRequestType_RMW_Write) ||
-        (ruby_request.type == RubyRequestType_Locked_Read) ||
-        (ruby_request.type == RubyRequestType_Locked_Write)) {
+        (ruby_request.type == RubyRequestType_Load_Linked) ||
+        (ruby_request.type == RubyRequestType_Store_Conditional)) {
         m_writeRequestTable.erase(line_addr);
     } else {
         m_readRequestTable.erase(line_addr);
@@ -309,7 +309,7 @@ Sequencer::handleLlsc(const Address& address, SequencerRequest* request)
     // longer locked.
     //
     bool success = true;
-    if (request->ruby_request.type == RubyRequestType_Locked_Write) {
+    if (request->ruby_request.type == RubyRequestType_Store_Conditional) {
         if (!m_dataCache_ptr->isLocked(address, m_version)) {
             //
             // For failed SC requests, indicate the failure to the cpu by
@@ -328,7 +328,7 @@ Sequencer::handleLlsc(const Address& address, SequencerRequest* request)
         // Independent of success, all SC operations must clear the lock
         //
         m_dataCache_ptr->clearLocked(address);
-    } else if (request->ruby_request.type == RubyRequestType_Locked_Read) {
+    } else if (request->ruby_request.type == RubyRequestType_Load_Linked) {
         //
         // Note: To fully follow Alpha LLSC semantics, should the LL clear any
         // previously locked cache lines?
@@ -378,8 +378,8 @@ Sequencer::writeCallback(const Address& address,
     assert((request->ruby_request.type == RubyRequestType_ST) ||
            (request->ruby_request.type == RubyRequestType_RMW_Read) ||
            (request->ruby_request.type == RubyRequestType_RMW_Write) ||
-           (request->ruby_request.type == RubyRequestType_Locked_Read) ||
-           (request->ruby_request.type == RubyRequestType_Locked_Write));
+           (request->ruby_request.type == RubyRequestType_Load_Linked) ||
+           (request->ruby_request.type == RubyRequestType_Store_Conditional));
 
     //
     // For Alpha, properly handle LL, SC, and write requests with respect to
@@ -501,7 +501,7 @@ Sequencer::hitCallback(SequencerRequest* srequest,
         if ((type == RubyRequestType_LD) ||
             (type == RubyRequestType_IFETCH) ||
             (type == RubyRequestType_RMW_Read) ||
-            (type == RubyRequestType_Locked_Read)) {
+            (type == RubyRequestType_Load_Linked)) {
 
             memcpy(ruby_request.data,
                    data.getData(request_address.getOffset(), ruby_request.len),
@@ -614,8 +614,8 @@ Sequencer::issueRequest(const RubyRequest& request)
       case RubyRequestType_ST:
         ctype = CacheRequestType_ST;
         break;
-      case RubyRequestType_Locked_Read:
-      case RubyRequestType_Locked_Write:
+      case RubyRequestType_Load_Linked:
+      case RubyRequestType_Store_Conditional:
         ctype = CacheRequestType_ATOMIC;
         break;
       case RubyRequestType_RMW_Read: