summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/simple
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:42 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:42 -0500
commit00dbadcbb09c51b8d05a22c21193b55d7e9a0cf1 (patch)
treefc8e8e99d2f1e48176e0f00c7cf3c567aa5ddbec /src/mem/ruby/network/simple
parentcc2cc588693bb73b1892aea82fd0ac9729196f25 (diff)
downloadgem5-00dbadcbb09c51b8d05a22c21193b55d7e9a0cf1.tar.xz
ruby: network: move getNumNodes() to base class
All the implementations were doing the same things.
Diffstat (limited to 'src/mem/ruby/network/simple')
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.cc27
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.hh2
2 files changed, 0 insertions, 29 deletions
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc
index 9eca157f6..2d08f9fa4 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.cc
+++ b/src/mem/ruby/network/simple/SimpleNetwork.cc
@@ -53,30 +53,8 @@ SimpleNetwork::SimpleNetwork(const Params *p)
// Note: the parent Network Object constructor is called before the
// SimpleNetwork child constructor. Therefore, the member variables
// used below should already be initialized.
-
m_endpoint_switches.resize(m_nodes);
- m_in_use.resize(m_virtual_networks);
- m_ordered.resize(m_virtual_networks);
- for (int i = 0; i < m_virtual_networks; i++) {
- m_in_use[i] = false;
- m_ordered[i] = false;
- }
-
- // Allocate to and from queues
- m_toNetQueues.resize(m_nodes);
- m_fromNetQueues.resize(m_nodes);
- for (int node = 0; node < m_nodes; node++) {
- m_toNetQueues[node].resize(m_virtual_networks);
- m_fromNetQueues[node].resize(m_virtual_networks);
- for (int j = 0; j < m_virtual_networks; j++) {
- m_toNetQueues[node][j] =
- new MessageBuffer(csprintf("toNet node %d j %d", node, j));
- m_fromNetQueues[node][j] =
- new MessageBuffer(csprintf("fromNet node %d j %d", node, j));
- }
- }
-
// record the routers
for (vector<BasicRouter*>::const_iterator i = p->routers.begin();
i != p->routers.end(); ++i) {
@@ -99,13 +77,8 @@ SimpleNetwork::init()
SimpleNetwork::~SimpleNetwork()
{
- for (int i = 0; i < m_nodes; i++) {
- deletePointers(m_toNetQueues[i]);
- deletePointers(m_fromNetQueues[i]);
- }
deletePointers(m_switches);
deletePointers(m_buffers_to_free);
- // delete m_topology_ptr;
}
// From a switch to an endpoint node
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.hh b/src/mem/ruby/network/simple/SimpleNetwork.hh
index 335ba15a0..90560c267 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.hh
+++ b/src/mem/ruby/network/simple/SimpleNetwork.hh
@@ -63,8 +63,6 @@ class SimpleNetwork : public Network
bool isVNetOrdered(int vnet) { return m_ordered[vnet]; }
bool validVirtualNetwork(int vnet) { return m_in_use[vnet]; }
- int getNumNodes() {return m_nodes; }
-
// Methods used by Topology to setup the network
void makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
LinkDirection direction,