diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2011-03-22 06:41:54 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2011-03-22 06:41:54 -0500 |
commit | 1764ebbf30cfd94eb7ccc618ade0d70049db000e (patch) | |
tree | 3c400317f716fcf50c996e9f4fb03980efd9cf3a /src/mem/ruby/slicc_interface/RubyRequest.cc | |
parent | 46cce440be4999cfdedebbf190c83570ba9f1b49 (diff) | |
download | gem5-1764ebbf30cfd94eb7ccc618ade0d70049db000e.tar.xz |
Ruby: Remove CacheMsg class from SLICC
The goal of the patch is to do away with the CacheMsg class currently in use
in coherence protocols. In place of CacheMsg, the RubyRequest class will used.
This class is already present in slicc_interface/RubyRequest.hh. In fact,
objects of class CacheMsg are generated by copying values from a RubyRequest
object.
Diffstat (limited to 'src/mem/ruby/slicc_interface/RubyRequest.cc')
-rw-r--r-- | src/mem/ruby/slicc_interface/RubyRequest.cc | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/src/mem/ruby/slicc_interface/RubyRequest.cc b/src/mem/ruby/slicc_interface/RubyRequest.cc index 2d8c94ed6..2aae61d7b 100644 --- a/src/mem/ruby/slicc_interface/RubyRequest.cc +++ b/src/mem/ruby/slicc_interface/RubyRequest.cc @@ -4,34 +4,17 @@ using namespace std; -ostream& -operator<<(ostream& out, const RubyRequest& obj) +void +RubyRequest::print(ostream& out) const { - out << hex << "0x" << obj.paddr << " data: 0x" << flush; - for (int i = 0; i < obj.len; i++) { - out << (int)obj.data[i]; - } - out << dec << " type: " << RubyRequestType_to_string(obj.type) << endl; - return out; -} - -vector<string> -tokenizeString(string str, string delims) -{ - vector<string> tokens; - char* pch; - char* tmp; - const char* c_delims = delims.c_str(); - tmp = new char[str.length()+1]; - strcpy(tmp, str.c_str()); - pch = strtok(tmp, c_delims); - while (pch != NULL) { - string tmp_str(pch); - if (tmp_str == "null") tmp_str = ""; - tokens.push_back(tmp_str); - - pch = strtok(NULL, c_delims); - } - delete [] tmp; - return tokens; + out << "[RubyRequest: "; + out << "LineAddress = " << m_LineAddress << " "; + out << "PhysicalAddress = " << m_PhysicalAddress << " "; + out << "Type = " << m_Type << " "; + out << "ProgramCounter = " << m_ProgramCounter << " "; + out << "AccessMode = " << m_AccessMode << " "; + out << "Size = " << m_Size << " "; + out << "Prefetch = " << m_Prefetch << " "; +// out << "Time = " << getTime() << " "; + out << "]"; } |