diff options
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/ruby/libruby.cc | 16 | ||||
-rw-r--r-- | src/mem/ruby/libruby.hh | 4 | ||||
-rw-r--r-- | src/mem/ruby/recorder/TraceRecord.cc | 5 | ||||
-rw-r--r-- | src/mem/ruby/system/DMASequencer.cc | 3 | ||||
-rw-r--r-- | src/mem/ruby/system/Sequencer.cc | 20 |
5 files changed, 26 insertions, 22 deletions
diff --git a/src/mem/ruby/libruby.cc b/src/mem/ruby/libruby.cc index d21b29dec..d35600960 100644 --- a/src/mem/ruby/libruby.cc +++ b/src/mem/ruby/libruby.cc @@ -19,10 +19,10 @@ string RubyRequestType_to_string(const RubyRequestType& obj) return "LD"; case RubyRequestType_ST: return "ST"; - case RubyRequestType_RMW_Read: - return "RMW_Read"; - case RubyRequestType_RMW_Write: - return "RMW_Write"; + case RubyRequestType_Locked_Read: + return "Locked_Read"; + case RubyRequestType_Locked_Write: + return "Locked_Write"; case RubyRequestType_NULL: default: assert(0); @@ -38,10 +38,10 @@ RubyRequestType string_to_RubyRequestType(std::string str) return RubyRequestType_LD; else if (str == "ST") return RubyRequestType_ST; - else if (str == "RMW_Read") - return RubyRequestType_RMW_Read; - else if (str == "RMW_Write") - return RubyRequestType_RMW_Write; + else if (str == "Locked_Read") + return RubyRequestType_Locked_Read; + else if (str == "Locked_Write") + return RubyRequestType_Locked_Write; else assert(0); return RubyRequestType_NULL; diff --git a/src/mem/ruby/libruby.hh b/src/mem/ruby/libruby.hh index 8edcfa0fc..85de794f1 100644 --- a/src/mem/ruby/libruby.hh +++ b/src/mem/ruby/libruby.hh @@ -11,8 +11,8 @@ enum RubyRequestType { RubyRequestType_IFETCH, RubyRequestType_LD, RubyRequestType_ST, - RubyRequestType_RMW_Read, - RubyRequestType_RMW_Write + RubyRequestType_Locked_Read, + RubyRequestType_Locked_Write }; enum RubyAccessMode { diff --git a/src/mem/ruby/recorder/TraceRecord.cc b/src/mem/ruby/recorder/TraceRecord.cc index 1521d2a3f..6cc33665b 100644 --- a/src/mem/ruby/recorder/TraceRecord.cc +++ b/src/mem/ruby/recorder/TraceRecord.cc @@ -47,7 +47,10 @@ TraceRecord::TraceRecord(const string & sequencer_name, const Address& data_addr // Don't differentiate between store misses and atomic requests in // the trace - if (m_type == RubyRequestType_RMW) { + if (m_type == RubyRequestType_Locked_Read) { + m_type = RubyRequestType_ST; + } + if (m_type == RubyRequestType_Locked_Write) { m_type = RubyRequestType_ST; } } diff --git a/src/mem/ruby/system/DMASequencer.cc b/src/mem/ruby/system/DMASequencer.cc index 4aa092113..ec5e0b49f 100644 --- a/src/mem/ruby/system/DMASequencer.cc +++ b/src/mem/ruby/system/DMASequencer.cc @@ -46,7 +46,8 @@ int64_t DMASequencer::makeRequest(const RubyRequest & request) break; case RubyRequestType_NULL: case RubyRequestType_IFETCH: - case RubyRequestType_RMW: + case RubyRequestType_Locked_Read: + case RubyRequestType_Locked_Write: assert(0); } diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index db60bb11a..c3a8e9424 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -201,8 +201,8 @@ bool Sequencer::insertRequest(SequencerRequest* request) { Address line_addr(request->ruby_request.paddr); line_addr.makeLineAddress(); 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)) { if (m_writeRequestTable.exist(line_addr)) { m_writeRequestTable.lookup(line_addr) = request; // return true; @@ -238,8 +238,8 @@ void Sequencer::removeRequest(SequencerRequest* srequest) { Address line_addr(ruby_request.paddr); line_addr.makeLineAddress(); 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)) { m_writeRequestTable.deallocate(line_addr); } else { m_readRequestTable.deallocate(line_addr); @@ -258,10 +258,10 @@ void Sequencer::writeCallback(const Address& address, DataBlock& data) { removeRequest(request); 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)); // POLINA: the assumption is that atomics are only on data cache and not instruction cache - if (request->ruby_request.type == RubyRequestType_RMW_Read) { + if (request->ruby_request.type == RubyRequestType_Locked_Read) { m_dataCache_ptr->setLocked(address, m_version); } @@ -364,7 +364,7 @@ int64_t Sequencer::makeRequest(const RubyRequest & request) SequencerRequest *srequest = new SequencerRequest(request, id, g_eventQueue_ptr->getTime()); bool found = insertRequest(srequest); if (!found) - if (request.type == RubyRequestType_RMW_Write) { + if (request.type == RubyRequestType_Locked_Write) { if (!m_dataCache_ptr->isLocked(line_address(Address(request.paddr)), m_version)) { return -2; } @@ -396,10 +396,10 @@ void Sequencer::issueRequest(const RubyRequest& request) { case RubyRequestType_ST: ctype = CacheRequestType_ST; break; - case RubyRequestType_RMW_Read: + case RubyRequestType_Locked_Read: ctype = CacheRequestType_ATOMIC; break; - case RubyRequestType_RMW_Write: + case RubyRequestType_Locked_Write: ctype = CacheRequestType_ATOMIC; break; default: |