summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
authorTushar Krishna <tushar@csail.mit.edu>2011-05-18 03:06:07 -0400
committerTushar Krishna <tushar@csail.mit.edu>2011-05-18 03:06:07 -0400
commit3ed048e4f5854b260a29164da92ba16ad7881740 (patch)
treef5d4658fc36724eec7cac67c1900caf39a64b219 /src/mem/ruby/network
parent26eaba4cb5a5933c17abe9efca8590610f1e36b4 (diff)
downloadgem5-3ed048e4f5854b260a29164da92ba16ad7881740.tar.xz
slicc: added vnet_type field to identify response vnets from others
Identifying response vnets versus other vnets will allow garnet to determine which vnets will carry data packets, and which will carry ctrl packets, and use appropriate buffer sizes (since data packets are larger than ctrl packets). This in turn allows the orion power model to accurately estimate buffer power.
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r--src/mem/ruby/network/Network.hh4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc10
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh6
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc6
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh6
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.cc6
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.hh4
7 files changed, 28 insertions, 14 deletions
diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh
index cce81f266..309560921 100644
--- a/src/mem/ruby/network/Network.hh
+++ b/src/mem/ruby/network/Network.hh
@@ -71,9 +71,9 @@ class Network : public SimObject
// returns the queue requested for the given component
virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered,
- int netNumber) = 0;
+ int netNumber, std::string vnet_type) = 0;
virtual MessageBuffer* getFromNetQueue(NodeID id, bool ordered,
- int netNumber) = 0;
+ int netNumber, std::string vnet_type) = 0;
virtual const std::vector<Throttle*>* getThrottles(NodeID id) const;
virtual int getNumNodes() {return 1;}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
index 17dba251d..dc24900c4 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
@@ -227,14 +227,20 @@ GarnetNetwork_d::checkNetworkAllocation(NodeID id, bool ordered,
}
MessageBuffer*
-GarnetNetwork_d::getToNetQueue(NodeID id, bool ordered, int network_num)
+GarnetNetwork_d::getToNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type)
{
+ // TODO:
+ //if (vnet_type == "response")
+ // mark vnet as data vnet and use buffers_per_data_vc
+
checkNetworkAllocation(id, ordered, network_num);
return m_toNetQueues[id][network_num];
}
MessageBuffer*
-GarnetNetwork_d::getFromNetQueue(NodeID id, bool ordered, int network_num)
+GarnetNetwork_d::getFromNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type)
{
checkNetworkAllocation(id, ordered, network_num);
return m_fromNetQueues[id][network_num];
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
index 6254bd383..f2b3bd4ef 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
@@ -63,8 +63,10 @@ class GarnetNetwork_d : public BaseGarnetNetwork
int getBuffersPerCtrlVC() {return m_buffers_per_ctrl_vc; }
// returns the queue requested for the given component
- MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num);
- MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num);
+ MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type);
+ MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type);
void clearStats();
void printStats(std::ostream& out) const;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
index 62ae2dbd6..2c0d9f3aa 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
@@ -192,14 +192,16 @@ GarnetNetwork::checkNetworkAllocation(NodeID id, bool ordered,
}
MessageBuffer*
-GarnetNetwork::getToNetQueue(NodeID id, bool ordered, int network_num)
+GarnetNetwork::getToNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type)
{
checkNetworkAllocation(id, ordered, network_num);
return m_toNetQueues[id][network_num];
}
MessageBuffer*
-GarnetNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num)
+GarnetNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type)
{
checkNetworkAllocation(id, ordered, network_num);
return m_fromNetQueues[id][network_num];
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
index 6e08330f3..5c7959131 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
@@ -60,8 +60,10 @@ class GarnetNetwork : public BaseGarnetNetwork
int getNumPipeStages() {return m_number_of_pipe_stages; }
// returns the queue requested for the given component
- MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num);
- MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num);
+ MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type);
+ MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type);
void clearStats();
void printStats(std::ostream& out) const;
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc
index eb561b612..0f3472773 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.cc
+++ b/src/mem/ruby/network/simple/SimpleNetwork.cc
@@ -226,14 +226,16 @@ SimpleNetwork::checkNetworkAllocation(NodeID id, bool ordered, int network_num)
}
MessageBuffer*
-SimpleNetwork::getToNetQueue(NodeID id, bool ordered, int network_num)
+SimpleNetwork::getToNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type)
{
checkNetworkAllocation(id, ordered, network_num);
return m_toNetQueues[id][network_num];
}
MessageBuffer*
-SimpleNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num)
+SimpleNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num,
+ std::string vnet_type)
{
checkNetworkAllocation(id, ordered, network_num);
return m_fromNetQueues[id][network_num];
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.hh b/src/mem/ruby/network/simple/SimpleNetwork.hh
index 093ed959e..fb5481b46 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.hh
+++ b/src/mem/ruby/network/simple/SimpleNetwork.hh
@@ -64,8 +64,8 @@ class SimpleNetwork : public Network
void reset();
// returns the queue requested for the given component
- MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num);
- MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num);
+ MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num, std::string vnet_type);
+ MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num, std::string vnet_type);
virtual const std::vector<Throttle*>* getThrottles(NodeID id) const;
bool isVNetOrdered(int vnet) { return m_ordered[vnet]; }