summaryrefslogtreecommitdiff
path: root/src/mem/protocol
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-04-02 11:20:32 -0700
committerNathan Binkert <nate@binkert.org>2010-04-02 11:20:32 -0700
commitf1c3f3044b73d890ffdfdd113b3b37ae2809d21b (patch)
tree959d71e897a8d01868c8dea8a8b225cbd1b5ce2c /src/mem/protocol
parentbe10204729c107b41d5d7487323c732e9fa09df5 (diff)
downloadgem5-f1c3f3044b73d890ffdfdd113b3b37ae2809d21b.tar.xz
ruby: get "using namespace" out of headers
In addition to obvious changes, this required a slight change to the slicc grammar to allow types with :: in them. Otherwise slicc barfs on std::string which we need for the headers that slicc generates.
Diffstat (limited to 'src/mem/protocol')
-rw-r--r--src/mem/protocol/MESI_CMP_directory-L2cache.sm4
-rw-r--r--src/mem/protocol/MESI_SCMP_bankdirectory-L2cache.sm4
-rw-r--r--src/mem/protocol/MOESI_CMP_directory-L2cache.sm4
-rw-r--r--src/mem/protocol/MOESI_CMP_token-L2cache.sm2
-rw-r--r--src/mem/protocol/MSI_MOSI_CMP_directory-L1cache.sm2
-rw-r--r--src/mem/protocol/MSI_MOSI_CMP_directory-L2cache.sm4
-rw-r--r--src/mem/protocol/MSI_MOSI_CMP_directory-dir.sm4
-rw-r--r--src/mem/protocol/MSI_MOSI_CMP_directory-msg.sm4
-rw-r--r--src/mem/protocol/RubySlicc_Exports.sm2
-rw-r--r--src/mem/protocol/RubySlicc_Profiler.sm3
-rw-r--r--src/mem/protocol/RubySlicc_Util.sm2
11 files changed, 18 insertions, 17 deletions
diff --git a/src/mem/protocol/MESI_CMP_directory-L2cache.sm b/src/mem/protocol/MESI_CMP_directory-L2cache.sm
index e7877211a..4739451b1 100644
--- a/src/mem/protocol/MESI_CMP_directory-L2cache.sm
+++ b/src/mem/protocol/MESI_CMP_directory-L2cache.sm
@@ -166,7 +166,7 @@ machine(L2Cache, "MESI Directory L2 Cache CMP")
}
}
- string getCoherenceRequestTypeStr(CoherenceRequestType type) {
+ std::string getCoherenceRequestTypeStr(CoherenceRequestType type) {
return CoherenceRequestType_to_string(type);
}
@@ -203,7 +203,7 @@ machine(L2Cache, "MESI Directory L2 Cache CMP")
return State:NP;
}
- string getStateStr(Address addr) {
+ std::string getStateStr(Address addr) {
return L2Cache_State_to_string(getState(addr));
}
diff --git a/src/mem/protocol/MESI_SCMP_bankdirectory-L2cache.sm b/src/mem/protocol/MESI_SCMP_bankdirectory-L2cache.sm
index 0bd9c2b14..8d3c2126f 100644
--- a/src/mem/protocol/MESI_SCMP_bankdirectory-L2cache.sm
+++ b/src/mem/protocol/MESI_SCMP_bankdirectory-L2cache.sm
@@ -171,7 +171,7 @@ machine(L2Cache, "MOSI Directory L2 Cache CMP") {
}
}
- string getCoherenceRequestTypeStr(CoherenceRequestType type) {
+ std::string getCoherenceRequestTypeStr(CoherenceRequestType type) {
return CoherenceRequestType_to_string(type);
}
@@ -209,7 +209,7 @@ machine(L2Cache, "MOSI Directory L2 Cache CMP") {
return State:NP;
}
- string getStateStr(Address addr) {
+ std::string getStateStr(Address addr) {
return L2Cache_State_to_string(getState(addr));
}
diff --git a/src/mem/protocol/MOESI_CMP_directory-L2cache.sm b/src/mem/protocol/MOESI_CMP_directory-L2cache.sm
index dff1dab27..0316e2310 100644
--- a/src/mem/protocol/MOESI_CMP_directory-L2cache.sm
+++ b/src/mem/protocol/MOESI_CMP_directory-L2cache.sm
@@ -457,11 +457,11 @@ machine(L2Cache, "Token protocol")
}
}
- string getStateStr(Address addr) {
+ std::string getStateStr(Address addr) {
return L2Cache_State_to_string(getState(addr));
}
- string getCoherenceRequestTypeStr(CoherenceRequestType type) {
+ std::string getCoherenceRequestTypeStr(CoherenceRequestType type) {
return CoherenceRequestType_to_string(type);
}
diff --git a/src/mem/protocol/MOESI_CMP_token-L2cache.sm b/src/mem/protocol/MOESI_CMP_token-L2cache.sm
index d3e11349d..789a2b5cd 100644
--- a/src/mem/protocol/MOESI_CMP_token-L2cache.sm
+++ b/src/mem/protocol/MOESI_CMP_token-L2cache.sm
@@ -183,7 +183,7 @@ machine(L2Cache, "Token protocol")
}
}
- string getStateStr(Address addr) {
+ std::string getStateStr(Address addr) {
return L2Cache_State_to_string(getState(addr));
}
diff --git a/src/mem/protocol/MSI_MOSI_CMP_directory-L1cache.sm b/src/mem/protocol/MSI_MOSI_CMP_directory-L1cache.sm
index c16a2fe80..6ca749ac7 100644
--- a/src/mem/protocol/MSI_MOSI_CMP_directory-L1cache.sm
+++ b/src/mem/protocol/MSI_MOSI_CMP_directory-L1cache.sm
@@ -187,7 +187,7 @@ machine(L1Cache, "MSI Directory L1 Cache CMP") {
return State:NP;
}
- string getStateStr(Address addr) {
+ std::string getStateStr(Address addr) {
return L1Cache_State_to_string(getState(addr));
}
diff --git a/src/mem/protocol/MSI_MOSI_CMP_directory-L2cache.sm b/src/mem/protocol/MSI_MOSI_CMP_directory-L2cache.sm
index 9f85e3a8f..8dbe5b8db 100644
--- a/src/mem/protocol/MSI_MOSI_CMP_directory-L2cache.sm
+++ b/src/mem/protocol/MSI_MOSI_CMP_directory-L2cache.sm
@@ -222,7 +222,7 @@ machine(L2Cache, "MOSI Directory L2 Cache CMP") {
}
}
- string getCoherenceRequestTypeStr(CoherenceRequestType type) {
+ std::string getCoherenceRequestTypeStr(CoherenceRequestType type) {
return CoherenceRequestType_to_string(type);
}
@@ -260,7 +260,7 @@ machine(L2Cache, "MOSI Directory L2 Cache CMP") {
return State:L2_NP;
}
- string getStateStr(Address addr) {
+ std::string getStateStr(Address addr) {
return L2Cache_State_to_string(getState(addr));
}
diff --git a/src/mem/protocol/MSI_MOSI_CMP_directory-dir.sm b/src/mem/protocol/MSI_MOSI_CMP_directory-dir.sm
index 435bf0eff..e806b333c 100644
--- a/src/mem/protocol/MSI_MOSI_CMP_directory-dir.sm
+++ b/src/mem/protocol/MSI_MOSI_CMP_directory-dir.sm
@@ -100,11 +100,11 @@ machine(Directory, "MOSI Directory Optimized") {
return State:NP;
}
- string getDirStateStr(Address addr) {
+ std::string getDirStateStr(Address addr) {
return Directory_State_to_string(getState(addr));
}
- string getRequestTypeStr(CoherenceRequestType type) {
+ std::string getRequestTypeStr(CoherenceRequestType type) {
return CoherenceRequestType_to_string(type);
}
diff --git a/src/mem/protocol/MSI_MOSI_CMP_directory-msg.sm b/src/mem/protocol/MSI_MOSI_CMP_directory-msg.sm
index 80ab0f246..fc653983a 100644
--- a/src/mem/protocol/MSI_MOSI_CMP_directory-msg.sm
+++ b/src/mem/protocol/MSI_MOSI_CMP_directory-msg.sm
@@ -69,8 +69,8 @@ structure(RequestMsg, desc="...", interface="NetworkMessage") {
DataBlock DataBlk, desc="Data for the cache line (if PUTX)";
int NumPendingExtAcks, desc="Number of acks to wait for"; // Needed for forwarded responses only
MessageSizeType MessageSize, desc="size category of the message";
- string L1CacheStateStr, desc="describes L1 cache block state";
- string L2CacheStateStr, desc="describes L2 cache block state";
+ std::string L1CacheStateStr, desc="describes L1 cache block state";
+ std::string L2CacheStateStr, desc="describes L2 cache block state";
PrefetchBit Prefetch, desc="Is this a prefetch request";
}
diff --git a/src/mem/protocol/RubySlicc_Exports.sm b/src/mem/protocol/RubySlicc_Exports.sm
index 8f1e5a6eb..599e895db 100644
--- a/src/mem/protocol/RubySlicc_Exports.sm
+++ b/src/mem/protocol/RubySlicc_Exports.sm
@@ -35,7 +35,7 @@
// defines
external_type(int, primitive="yes", default="0");
external_type(bool, primitive="yes", default="false");
-external_type(string, primitive="yes");
+external_type(std::string, primitive="yes");
external_type(uint64, primitive="yes");
external_type(Time, primitive="yes", default="0");
external_type(Address);
diff --git a/src/mem/protocol/RubySlicc_Profiler.sm b/src/mem/protocol/RubySlicc_Profiler.sm
index d360af160..ce1183e22 100644
--- a/src/mem/protocol/RubySlicc_Profiler.sm
+++ b/src/mem/protocol/RubySlicc_Profiler.sm
@@ -41,7 +41,8 @@ void profile_L1Cache_miss(CacheMsg msg, NodeID l1cacheID);
// used by CMP protocols
void profile_L2Cache_miss(GenericRequestType requestType, AccessModeType type, int msgSize, PrefetchBit pfBit, NodeID l2cacheID);
-void profile_request(string L1CacheStateStr, string L2CacheStateStr, string directoryStateStr, string requestTypeStr);
+void profile_request(std::string L1CacheStateStr, std::string L2CacheStateStr,
+ std::string directoryStateStr, std::string requestTypeStr);
void profileMessageReordering(bool wasReordered);
void profileMessageReorderingByNetwork(int vnet, bool wasReordered);
void profile_token_retry(Address addr, AccessType type, int count);
diff --git a/src/mem/protocol/RubySlicc_Util.sm b/src/mem/protocol/RubySlicc_Util.sm
index e1771448f..d4232650f 100644
--- a/src/mem/protocol/RubySlicc_Util.sm
+++ b/src/mem/protocol/RubySlicc_Util.sm
@@ -29,7 +29,7 @@
// Miscallaneous Functions
-void error(string msg);
+void error(std::string msg);
void assert(bool condition);
int random(int number);
Time get_time();