summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2011-03-19 18:34:59 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2011-03-19 18:34:59 -0500
commit611f052e963b06b4a7e02b2fc6d847cd6d08d038 (patch)
tree0a3bdb5787d5e6ae9b0e07145cf2d32b4a532d6b /src/mem/ruby/slicc_interface
parent2f4276448b82b2aa077ae257171b5cb04b7048f6 (diff)
downloadgem5-611f052e963b06b4a7e02b2fc6d847cd6d08d038.tar.xz
Ruby: Convert CacheRequestType to RubyRequestType
This patch converts CacheRequestType to RubyRequestType so that both the protocol dependent and independent code makes use of the same request type.
Diffstat (limited to 'src/mem/ruby/slicc_interface')
-rw-r--r--src/mem/ruby/slicc_interface/RubyRequest.cc63
-rw-r--r--src/mem/ruby/slicc_interface/RubyRequest.hh18
-rw-r--r--src/mem/ruby/slicc_interface/RubySlicc_Util.hh2
3 files changed, 2 insertions, 81 deletions
diff --git a/src/mem/ruby/slicc_interface/RubyRequest.cc b/src/mem/ruby/slicc_interface/RubyRequest.cc
index 9189bfa7a..2d8c94ed6 100644
--- a/src/mem/ruby/slicc_interface/RubyRequest.cc
+++ b/src/mem/ruby/slicc_interface/RubyRequest.cc
@@ -4,69 +4,6 @@
using namespace std;
-string
-RubyRequestType_to_string(const RubyRequestType& obj)
-{
- switch(obj) {
- case RubyRequestType_IFETCH:
- return "IFETCH";
- case RubyRequestType_LD:
- return "LD";
- case RubyRequestType_ST:
- return "ST";
- 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:
- return "RMW_Write";
- case RubyRequestType_Locked_RMW_Read:
- return "Locked_RMW_Read";
- case RubyRequestType_Locked_RMW_Write:
- return "Locked_RMW_Write";
- case RubyRequestType_NULL:
- default:
- assert(0);
- return "";
- }
-}
-
-RubyRequestType
-string_to_RubyRequestType(string str)
-{
- if (str == "IFETCH")
- return RubyRequestType_IFETCH;
- else if (str == "LD")
- return RubyRequestType_LD;
- else if (str == "ST")
- return RubyRequestType_ST;
- else if (str == "Locked_Read")
- return RubyRequestType_Load_Linked;
- else if (str == "Locked_Write")
- return RubyRequestType_Store_Conditional;
- else if (str == "RMW_Read")
- return RubyRequestType_RMW_Read;
- else if (str == "RMW_Write")
- return RubyRequestType_RMW_Write;
- else if (str == "Locked_RMW_Read")
- return RubyRequestType_Locked_RMW_Read;
- else if (str == "Locked_RMW_Write")
- return RubyRequestType_Locked_RMW_Write;
- else
- assert(0);
- return RubyRequestType_NULL;
-}
-
-ostream&
-operator<<(ostream& out, const RubyRequestType& obj)
-{
- out << RubyRequestType_to_string(obj);
- out << flush;
- return out;
-}
-
ostream&
operator<<(ostream& out, const RubyRequest& obj)
{
diff --git a/src/mem/ruby/slicc_interface/RubyRequest.hh b/src/mem/ruby/slicc_interface/RubyRequest.hh
index 6d0e23bfe..d7acfd578 100644
--- a/src/mem/ruby/slicc_interface/RubyRequest.hh
+++ b/src/mem/ruby/slicc_interface/RubyRequest.hh
@@ -33,25 +33,12 @@
#include "mem/packet.hh"
#include "mem/protocol/RubyAccessMode.hh"
-#include "mem/protocol/CacheRequestType.hh"
+#include "mem/protocol/RubyRequestType.hh"
#include "mem/protocol/Message.hh"
#include "mem/protocol/PrefetchBit.hh"
#include "mem/ruby/common/Address.hh"
typedef void* RubyPortHandle;
-enum RubyRequestType {
- RubyRequestType_NULL,
- RubyRequestType_IFETCH,
- RubyRequestType_LD,
- RubyRequestType_ST,
- RubyRequestType_Load_Linked,
- RubyRequestType_Store_Conditional,
- RubyRequestType_RMW_Read,
- RubyRequestType_RMW_Write,
- RubyRequestType_Locked_RMW_Read,
- RubyRequestType_Locked_RMW_Write,
- RubyRequestType_NUM
-};
class RubyRequest
{
@@ -87,9 +74,6 @@ class RubyRequest
void print(std::ostream& out) const;
};
-std::string RubyRequestType_to_string(const RubyRequestType& obj);
-RubyRequestType string_to_RubyRequestType(std::string);
-std::ostream& operator<<(std::ostream& out, const RubyRequestType& obj);
std::ostream& operator<<(std::ostream& out, const RubyRequest& obj);
#endif
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh
index 81de8e468..bb23406b9 100644
--- a/src/mem/ruby/slicc_interface/RubySlicc_Util.hh
+++ b/src/mem/ruby/slicc_interface/RubySlicc_Util.hh
@@ -37,7 +37,7 @@
#include "mem/protocol/AccessType.hh"
#include "mem/protocol/CacheMsg.hh"
-#include "mem/protocol/CacheRequestType.hh"
+#include "mem/protocol/RubyRequestType.hh"
#include "mem/protocol/Directory_State.hh"
#include "mem/protocol/GenericRequestType.hh"
#include "mem/protocol/L1Cache_State.hh"