Ruby: Update the Ruby request type names for LL/SC

This commit is contained in:
Joel Hestness 2011-02-06 22:14:18 -08:00
parent 9782ca5def
commit 16c1edebd0
6 changed files with 25 additions and 25 deletions

View file

@ -50,10 +50,10 @@ RubyRequestType_to_string(const RubyRequestType& obj)
return "LD"; return "LD";
case RubyRequestType_ST: case RubyRequestType_ST:
return "ST"; return "ST";
case RubyRequestType_Locked_Read: case RubyRequestType_Load_Linked:
return "Locked_Read"; return "Load_Linked";
case RubyRequestType_Locked_Write: case RubyRequestType_Store_Conditional:
return "Locked_Write"; return "Store_Conditional";
case RubyRequestType_RMW_Read: case RubyRequestType_RMW_Read:
return "RMW_Read"; return "RMW_Read";
case RubyRequestType_RMW_Write: case RubyRequestType_RMW_Write:
@ -75,9 +75,9 @@ string_to_RubyRequestType(string str)
else if (str == "ST") else if (str == "ST")
return RubyRequestType_ST; return RubyRequestType_ST;
else if (str == "Locked_Read") else if (str == "Locked_Read")
return RubyRequestType_Locked_Read; return RubyRequestType_Load_Linked;
else if (str == "Locked_Write") else if (str == "Locked_Write")
return RubyRequestType_Locked_Write; return RubyRequestType_Store_Conditional;
else if (str == "RMW_Read") else if (str == "RMW_Read")
return RubyRequestType_RMW_Read; return RubyRequestType_RMW_Read;
else if (str == "RMW_Write") else if (str == "RMW_Write")

View file

@ -40,8 +40,8 @@ enum RubyRequestType {
RubyRequestType_IFETCH, RubyRequestType_IFETCH,
RubyRequestType_LD, RubyRequestType_LD,
RubyRequestType_ST, RubyRequestType_ST,
RubyRequestType_Locked_Read, RubyRequestType_Load_Linked,
RubyRequestType_Locked_Write, RubyRequestType_Store_Conditional,
RubyRequestType_RMW_Read, RubyRequestType_RMW_Read,
RubyRequestType_RMW_Write, RubyRequestType_RMW_Write,
RubyRequestType_NUM RubyRequestType_NUM

View file

@ -45,9 +45,9 @@ TraceRecord::TraceRecord(Sequencer* _sequencer, const Address& data_addr,
// Don't differentiate between store misses and atomic requests in // Don't differentiate between store misses and atomic requests in
// the trace // the trace
if (m_type == RubyRequestType_Locked_Read) { if (m_type == RubyRequestType_Load_Linked) {
m_type = RubyRequestType_ST; m_type = RubyRequestType_ST;
} else if (m_type == RubyRequestType_Locked_Write) { } else if (m_type == RubyRequestType_Store_Conditional) {
m_type = RubyRequestType_ST; m_type = RubyRequestType_ST;
} }
} }

View file

@ -66,8 +66,8 @@ DMASequencer::makeRequest(const RubyRequest &request)
break; break;
case RubyRequestType_NULL: case RubyRequestType_NULL:
case RubyRequestType_IFETCH: case RubyRequestType_IFETCH:
case RubyRequestType_Locked_Read: case RubyRequestType_Load_Linked:
case RubyRequestType_Locked_Write: case RubyRequestType_Store_Conditional:
case RubyRequestType_RMW_Read: case RubyRequestType_RMW_Read:
case RubyRequestType_RMW_Write: case RubyRequestType_RMW_Write:
case RubyRequestType_NUM: case RubyRequestType_NUM:

View file

@ -195,11 +195,11 @@ RubyPort::M5Port::recvTiming(PacketPtr pkt)
if (pkt->isLLSC()) { if (pkt->isLLSC()) {
if (pkt->isWrite()) { if (pkt->isWrite()) {
DPRINTF(MemoryAccess, "Issuing SC\n"); DPRINTF(MemoryAccess, "Issuing SC\n");
type = RubyRequestType_Locked_Write; type = RubyRequestType_Store_Conditional;
} else { } else {
DPRINTF(MemoryAccess, "Issuing LL\n"); DPRINTF(MemoryAccess, "Issuing LL\n");
assert(pkt->isRead()); assert(pkt->isRead());
type = RubyRequestType_Locked_Read; type = RubyRequestType_Load_Linked;
} }
} else { } else {
if (pkt->isRead()) { if (pkt->isRead()) {

View file

@ -231,8 +231,8 @@ Sequencer::insertRequest(SequencerRequest* request)
if ((request->ruby_request.type == RubyRequestType_ST) || if ((request->ruby_request.type == RubyRequestType_ST) ||
(request->ruby_request.type == RubyRequestType_RMW_Read) || (request->ruby_request.type == RubyRequestType_RMW_Read) ||
(request->ruby_request.type == RubyRequestType_RMW_Write) || (request->ruby_request.type == RubyRequestType_RMW_Write) ||
(request->ruby_request.type == RubyRequestType_Locked_Read) || (request->ruby_request.type == RubyRequestType_Load_Linked) ||
(request->ruby_request.type == RubyRequestType_Locked_Write)) { (request->ruby_request.type == RubyRequestType_Store_Conditional)) {
pair<RequestTable::iterator, bool> r = pair<RequestTable::iterator, bool> r =
m_writeRequestTable.insert(RequestTable::value_type(line_addr, 0)); m_writeRequestTable.insert(RequestTable::value_type(line_addr, 0));
bool success = r.second; bool success = r.second;
@ -290,8 +290,8 @@ Sequencer::removeRequest(SequencerRequest* srequest)
if ((ruby_request.type == RubyRequestType_ST) || if ((ruby_request.type == RubyRequestType_ST) ||
(ruby_request.type == RubyRequestType_RMW_Read) || (ruby_request.type == RubyRequestType_RMW_Read) ||
(ruby_request.type == RubyRequestType_RMW_Write) || (ruby_request.type == RubyRequestType_RMW_Write) ||
(ruby_request.type == RubyRequestType_Locked_Read) || (ruby_request.type == RubyRequestType_Load_Linked) ||
(ruby_request.type == RubyRequestType_Locked_Write)) { (ruby_request.type == RubyRequestType_Store_Conditional)) {
m_writeRequestTable.erase(line_addr); m_writeRequestTable.erase(line_addr);
} else { } else {
m_readRequestTable.erase(line_addr); m_readRequestTable.erase(line_addr);
@ -309,7 +309,7 @@ Sequencer::handleLlsc(const Address& address, SequencerRequest* request)
// longer locked. // longer locked.
// //
bool success = true; 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)) { if (!m_dataCache_ptr->isLocked(address, m_version)) {
// //
// For failed SC requests, indicate the failure to the cpu by // 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 // Independent of success, all SC operations must clear the lock
// //
m_dataCache_ptr->clearLocked(address); 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 // Note: To fully follow Alpha LLSC semantics, should the LL clear any
// previously locked cache lines? // previously locked cache lines?
@ -378,8 +378,8 @@ Sequencer::writeCallback(const Address& address,
assert((request->ruby_request.type == RubyRequestType_ST) || assert((request->ruby_request.type == RubyRequestType_ST) ||
(request->ruby_request.type == RubyRequestType_RMW_Read) || (request->ruby_request.type == RubyRequestType_RMW_Read) ||
(request->ruby_request.type == RubyRequestType_RMW_Write) || (request->ruby_request.type == RubyRequestType_RMW_Write) ||
(request->ruby_request.type == RubyRequestType_Locked_Read) || (request->ruby_request.type == RubyRequestType_Load_Linked) ||
(request->ruby_request.type == RubyRequestType_Locked_Write)); (request->ruby_request.type == RubyRequestType_Store_Conditional));
// //
// For Alpha, properly handle LL, SC, and write requests with respect to // For Alpha, properly handle LL, SC, and write requests with respect to
@ -501,7 +501,7 @@ Sequencer::hitCallback(SequencerRequest* srequest,
if ((type == RubyRequestType_LD) || if ((type == RubyRequestType_LD) ||
(type == RubyRequestType_IFETCH) || (type == RubyRequestType_IFETCH) ||
(type == RubyRequestType_RMW_Read) || (type == RubyRequestType_RMW_Read) ||
(type == RubyRequestType_Locked_Read)) { (type == RubyRequestType_Load_Linked)) {
memcpy(ruby_request.data, memcpy(ruby_request.data,
data.getData(request_address.getOffset(), ruby_request.len), data.getData(request_address.getOffset(), ruby_request.len),
@ -614,8 +614,8 @@ Sequencer::issueRequest(const RubyRequest& request)
case RubyRequestType_ST: case RubyRequestType_ST:
ctype = CacheRequestType_ST; ctype = CacheRequestType_ST;
break; break;
case RubyRequestType_Locked_Read: case RubyRequestType_Load_Linked:
case RubyRequestType_Locked_Write: case RubyRequestType_Store_Conditional:
ctype = CacheRequestType_ATOMIC; ctype = CacheRequestType_ATOMIC;
break; break;
case RubyRequestType_RMW_Read: case RubyRequestType_RMW_Read: