From db5b3d37fe9628dfe32c1114177d68ebadcea894 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Thu, 20 Feb 2014 17:27:07 -0600 Subject: [PATCH] ruby: network: removes unused code. --- src/mem/ruby/network/Network.cc | 6 ------ src/mem/ruby/network/Network.hh | 1 - .../network/garnet/fixed-pipeline/NetworkInterface_d.cc | 2 +- src/mem/ruby/network/simple/SimpleNetwork.cc | 9 --------- src/mem/ruby/network/simple/SimpleNetwork.hh | 1 - src/mem/ruby/network/simple/Switch.cc | 6 ------ src/mem/ruby/network/simple/Switch.hh | 1 - src/mem/ruby/network/simple/Throttle.cc | 2 -- 8 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/mem/ruby/network/Network.cc b/src/mem/ruby/network/Network.cc index 5e44c435e..1c6dd9da4 100644 --- a/src/mem/ruby/network/Network.cc +++ b/src/mem/ruby/network/Network.cc @@ -98,9 +98,3 @@ Network::MessageSizeType_to_int(MessageSizeType size_type) break; } } - -const std::vector* -Network::getThrottles(NodeID id) const -{ - return NULL; -} diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh index 33a3fc33f..527f22ca2 100644 --- a/src/mem/ruby/network/Network.hh +++ b/src/mem/ruby/network/Network.hh @@ -75,7 +75,6 @@ class Network : public ClockedObject int netNumber, std::string vnet_type) = 0; virtual MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int netNumber, std::string vnet_type) = 0; - virtual const std::vector* getThrottles(NodeID id) const; virtual int getNumNodes() {return 1;} virtual void makeOutLink(SwitchID src, NodeID dest, BasicLink* link, diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc index f3457ebc7..b48efb632 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc @@ -343,7 +343,7 @@ NetworkInterface_d::scheduleOutputLink() int NetworkInterface_d::get_vnet(int vc) { - for (int i = 0; i < m_net_ptr->getNumberOfVirtualNetworks(); i++) { + for (int i = 0; i < m_virtual_networks; i++) { if (vc >= (i*m_vc_per_vnet) && vc < ((i+1)*m_vc_per_vnet)) { return i; } diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc index a3848a8e3..9ab1f8866 100644 --- a/src/mem/ruby/network/simple/SimpleNetwork.cc +++ b/src/mem/ruby/network/simple/SimpleNetwork.cc @@ -196,15 +196,6 @@ SimpleNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num, return m_fromNetQueues[id][network_num]; } -const std::vector* -SimpleNetwork::getThrottles(NodeID id) const -{ - assert(id >= 0); - assert(id < m_nodes); - assert(m_endpoint_switches[id] != NULL); - return m_endpoint_switches[id]->getThrottles(); -} - void SimpleNetwork::regStats() { diff --git a/src/mem/ruby/network/simple/SimpleNetwork.hh b/src/mem/ruby/network/simple/SimpleNetwork.hh index 69aeeffb7..e0193f2e0 100644 --- a/src/mem/ruby/network/simple/SimpleNetwork.hh +++ b/src/mem/ruby/network/simple/SimpleNetwork.hh @@ -62,7 +62,6 @@ class SimpleNetwork : public Network // returns the queue requested for the given component 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* getThrottles(NodeID id) const; bool isVNetOrdered(int vnet) { return m_ordered[vnet]; } bool validVirtualNetwork(int vnet) { return m_in_use[vnet]; } diff --git a/src/mem/ruby/network/simple/Switch.cc b/src/mem/ruby/network/simple/Switch.cc index d5c32016e..1e153be76 100644 --- a/src/mem/ruby/network/simple/Switch.cc +++ b/src/mem/ruby/network/simple/Switch.cc @@ -116,12 +116,6 @@ Switch::getThrottle(LinkID link_number) const return m_throttles[link_number]; } -const vector* -Switch::getThrottles() const -{ - return &m_throttles; -} - void Switch::regStats() { diff --git a/src/mem/ruby/network/simple/Switch.hh b/src/mem/ruby/network/simple/Switch.hh index 85f1b6d6f..58193d42d 100644 --- a/src/mem/ruby/network/simple/Switch.hh +++ b/src/mem/ruby/network/simple/Switch.hh @@ -67,7 +67,6 @@ class Switch : public BasicRouter const NetDest& routing_table_entry, Cycles link_latency, int bw_multiplier); const Throttle* getThrottle(LinkID link_number) const; - const std::vector* getThrottles() const; void resetStats(); void collateStats(); diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc index df5e624b3..778436c6d 100644 --- a/src/mem/ruby/network/simple/Throttle.cc +++ b/src/mem/ruby/network/simple/Throttle.cc @@ -39,8 +39,6 @@ using namespace std; -const int HIGH_RANGE = 256; -const int ADJUST_INTERVAL = 50000; const int MESSAGE_SIZE_MULTIPLIER = 1000; //const int BROADCAST_SCALING = 4; // Have a 16p system act like a 64p systems const int BROADCAST_SCALING = 1; -- 2.30.2