ruby: network: move message buffers to base network class.
authorNilay Vaish <nilay@cs.wisc.edu>
Fri, 21 Feb 2014 14:02:05 +0000 (08:02 -0600)
committerNilay Vaish <nilay@cs.wisc.edu>
Fri, 21 Feb 2014 14:02:05 +0000 (08:02 -0600)
src/mem/ruby/network/BasicRouter.hh
src/mem/ruby/network/Network.hh
src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
src/mem/ruby/network/garnet/BaseGarnetNetwork.hh
src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
src/mem/ruby/network/simple/SimpleNetwork.cc
src/mem/ruby/network/simple/SimpleNetwork.hh

index fa0a417cc13ee9279b36d32ba5ee06f413fa07d3..9f2d0ecd9b9350833c44eda4c339e6fdb9084d88 100644 (file)
@@ -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
index 527f22ca26d506ad42e28dbdc74b40a61536a359..9ddf5c8e600cd04d89117c28bc90cf8f5bd640f8 100644 (file)
@@ -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<std::vector<MessageBuffer*> > m_toNetQueues;
+    std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;
+
+    std::vector<bool> m_in_use;
+    std::vector<bool> m_ordered;
+
   private:
     //! Callback class used for collating statistics from all the
     //! controller of this type.
index 1082a15fb5f1449a070ce2258c948dd8ec815c79..f237c4dcc806e3f7eaa9fd1c5332284f087f061d 100644 (file)
@@ -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;
index 57d4cc581383fce257e5cf1d126b35f4d3e97c95..c4bb9f5b184fbe0428a01eba0d7610fba52a448a 100644 (file)
@@ -88,12 +88,6 @@ class BaseGarnetNetwork : public Network
     int m_vcs_per_vnet;
     bool m_enable_fault_model;
 
-    std::vector<bool> m_in_use;
-    std::vector<bool> m_ordered;
-
-    std::vector<std::vector<MessageBuffer*> > m_toNetQueues;
-    std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;
-
     // Statistical variables
     Stats::Vector m_flits_received;
     Stats::Vector m_flits_injected;
index 831c0b2fe13342afe15e41b970e0629e8f695d87..ca19d7775f089d970fb4d8ffabdda9b751d54fb4 100644 (file)
 #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;
index 53cf595e5357764ea29dcad37a838a4646679e24..5aef42f3aeb1f652727a76effa82c2745d88cc54 100644 (file)
 
 #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;
index 1e24cbc69ba2901d38f34cdcc5024dbe559caa58..7bb0389b569f96ab626b6f9dfe3dc6b747e1a79f 100644 (file)
@@ -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
index d468e9614cd3d21103357fcfa47cb027a5439789..bd273b0c84616835a1234a56c28593cc29881207 100644 (file)
 
 #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;
 
index 9ab1f886648dc332374f6b6bdd35a1c167b1f394..05b729183a5c591366569a592952a73b9e67f305 100644 (file)
 #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"
 
index e0193f2e0ac9a90dd6aeb5a7d412d1a1ab5520fb..335ba15a0a770099bb77fe6709d6d44e348b266f 100644 (file)
 #include <iostream>
 #include <vector>
 
-#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<std::vector<MessageBuffer*> > m_toNetQueues;
-    std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;
-
-    std::vector<bool> m_in_use;
-    std::vector<bool> m_ordered;
     std::vector<Switch*> m_switches;
     std::vector<MessageBuffer*> m_buffers_to_free;
     std::vector<Switch*> m_endpoint_switches;