From cd33f9bc42816e812298e726fe40a8c68934f965 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 21 Feb 2014 08:02:05 -0600 Subject: ruby: network: move message buffers to base network class. --- src/mem/ruby/network/BasicRouter.hh | 3 --- src/mem/ruby/network/Network.hh | 8 +++++++- src/mem/ruby/network/garnet/BaseGarnetNetwork.cc | 2 -- src/mem/ruby/network/garnet/BaseGarnetNetwork.hh | 6 ------ src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc | 3 --- src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh | 3 --- src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc | 3 --- src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh | 3 --- src/mem/ruby/network/simple/SimpleNetwork.cc | 2 -- src/mem/ruby/network/simple/SimpleNetwork.hh | 10 ---------- 10 files changed, 7 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/mem/ruby/network/BasicRouter.hh b/src/mem/ruby/network/BasicRouter.hh index fa0a417cc..9f2d0ecd9 100644 --- a/src/mem/ruby/network/BasicRouter.hh +++ b/src/mem/ruby/network/BasicRouter.hh @@ -46,9 +46,6 @@ class BasicRouter : public ClockedObject void init(); void print(std::ostream& out) const; - - friend class Topology; - protected: // // ID in relation to other routers in the system diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh index 527f22ca2..9ddf5c8e6 100644 --- a/src/mem/ruby/network/Network.hh +++ b/src/mem/ruby/network/Network.hh @@ -54,7 +54,6 @@ class NetDest; class MessageBuffer; -class Throttle; class Network : public ClockedObject { @@ -111,6 +110,13 @@ class Network : public ClockedObject static uint32_t m_control_msg_size; static uint32_t m_data_msg_size; + // vector of queues from the components + std::vector > m_toNetQueues; + std::vector > m_fromNetQueues; + + std::vector m_in_use; + std::vector m_ordered; + private: //! Callback class used for collating statistics from all the //! controller of this type. diff --git a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc index 1082a15fb..f237c4dcc 100644 --- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc +++ b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc @@ -29,8 +29,6 @@ */ #include "mem/ruby/buffers/MessageBuffer.hh" -#include "mem/ruby/network/BasicLink.hh" -#include "mem/ruby/network/Topology.hh" #include "mem/ruby/network/garnet/BaseGarnetNetwork.hh" using namespace std; diff --git a/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh b/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh index 57d4cc581..c4bb9f5b1 100644 --- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh +++ b/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh @@ -88,12 +88,6 @@ class BaseGarnetNetwork : public Network int m_vcs_per_vnet; bool m_enable_fault_model; - std::vector m_in_use; - std::vector m_ordered; - - std::vector > m_toNetQueues; - std::vector > m_fromNetQueues; - // Statistical variables Stats::Vector m_flits_received; Stats::Vector m_flits_injected; 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 831c0b2fe..ca19d7775 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc @@ -33,16 +33,13 @@ #include "base/cast.hh" #include "base/stl_helpers.hh" #include "mem/protocol/MachineType.hh" -#include "mem/ruby/buffers/MessageBuffer.hh" #include "mem/ruby/common/NetDest.hh" -#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh" #include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh" #include "mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.hh" #include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh" #include "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh" #include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh" #include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh" -#include "mem/ruby/network/Topology.hh" using namespace std; using m5::stl_helpers::deletePointers; 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 53cf595e5..5aef42f3a 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh +++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh @@ -36,14 +36,11 @@ #include "mem/ruby/network/garnet/BaseGarnetNetwork.hh" #include "mem/ruby/network/garnet/NetworkHeader.hh" -#include "mem/ruby/network/Network.hh" #include "params/GarnetNetwork_d.hh" class FaultModel; class NetworkInterface_d; -class MessageBuffer; class Router_d; -class Topology; class NetDest; class NetworkLink_d; class CreditLink_d; diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc index 1e24cbc69..7bb0389b5 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc @@ -33,7 +33,6 @@ #include "base/cast.hh" #include "base/stl_helpers.hh" #include "mem/protocol/MachineType.hh" -#include "mem/ruby/buffers/MessageBuffer.hh" #include "mem/ruby/common/NetDest.hh" #include "mem/ruby/network/BasicLink.hh" #include "mem/ruby/network/garnet/flexible-pipeline/GarnetLink.hh" @@ -41,7 +40,6 @@ #include "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh" #include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh" #include "mem/ruby/network/garnet/flexible-pipeline/Router.hh" -#include "mem/ruby/network/Topology.hh" using namespace std; using m5::stl_helpers::deletePointers; @@ -145,7 +143,6 @@ GarnetNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link, m_routers[dest]->addInPort(net_link); m_routers[src]->addOutPort(net_link, routing_table_entry, link->m_weight); - } void diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh index d468e9614..bd273b0c8 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh @@ -36,13 +36,10 @@ #include "mem/ruby/network/garnet/BaseGarnetNetwork.hh" #include "mem/ruby/network/garnet/NetworkHeader.hh" -#include "mem/ruby/network/Network.hh" #include "params/GarnetNetwork.hh" class NetworkInterface; -class MessageBuffer; class Router; -class Topology; class NetDest; class NetworkLink; diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc index 9ab1f8866..05b729183 100644 --- a/src/mem/ruby/network/simple/SimpleNetwork.cc +++ b/src/mem/ruby/network/simple/SimpleNetwork.cc @@ -33,12 +33,10 @@ #include "base/stl_helpers.hh" #include "mem/ruby/buffers/MessageBuffer.hh" #include "mem/ruby/common/NetDest.hh" -#include "mem/ruby/network/BasicLink.hh" #include "mem/ruby/network/simple/SimpleLink.hh" #include "mem/ruby/network/simple/SimpleNetwork.hh" #include "mem/ruby/network/simple/Switch.hh" #include "mem/ruby/network/simple/Throttle.hh" -#include "mem/ruby/network/Topology.hh" #include "mem/ruby/profiler/Profiler.hh" #include "mem/ruby/system/System.hh" diff --git a/src/mem/ruby/network/simple/SimpleNetwork.hh b/src/mem/ruby/network/simple/SimpleNetwork.hh index e0193f2e0..335ba15a0 100644 --- a/src/mem/ruby/network/simple/SimpleNetwork.hh +++ b/src/mem/ruby/network/simple/SimpleNetwork.hh @@ -32,16 +32,13 @@ #include #include -#include "mem/ruby/common/Global.hh" #include "mem/ruby/network/Network.hh" #include "params/SimpleNetwork.hh" -#include "sim/sim_object.hh" class NetDest; class MessageBuffer; class Throttle; class Switch; -class Topology; class SimpleNetwork : public Network { @@ -94,13 +91,6 @@ class SimpleNetwork : public Network // Private copy constructor and assignment operator SimpleNetwork(const SimpleNetwork& obj); SimpleNetwork& operator=(const SimpleNetwork& obj); - - // vector of queues from the components - std::vector > m_toNetQueues; - std::vector > m_fromNetQueues; - - std::vector m_in_use; - std::vector m_ordered; std::vector m_switches; std::vector m_buffers_to_free; std::vector m_endpoint_switches; -- cgit v1.2.3