diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2011-04-28 17:18:14 -0700 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2011-04-28 17:18:14 -0700 |
commit | 40bcbf42539fec83628f2ae2627238adff27f62c (patch) | |
tree | 993083e3b6e5661697261e81869bf40e17027826 /src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh | |
parent | bc5eb596053f7f69c88f8218f20709d94b2a331c (diff) | |
download | gem5-40bcbf42539fec83628f2ae2627238adff27f62c.tar.xz |
network: convert links & switches to first class C++ SimObjects
This patch converts links and switches from second class simobjects that were
virtually ignored by the networks (both simple and Garnet) to first class
simobjects that directly correspond to c++ ojbects manipulated by the
topology and network classes. This is especially true for Garnet, where the
links and switches directly correspond to specific C++ objects.
By making this change, many aspects of the Topology class were simplified.
--HG--
rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/BasicLink.cc
rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/BasicLink.hh
rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.cc
rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.hh
rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.py
rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/fixed-pipeline/GarnetRouter_d.py
rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.cc
rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.hh
rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py
rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/flexible-pipeline/GarnetRouter.py
Diffstat (limited to 'src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh')
-rw-r--r-- | src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh index 4c2b83312..ec44cc7b3 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh +++ b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh @@ -35,9 +35,11 @@ #include <vector> #include "mem/ruby/common/NetDest.hh" +#include "mem/ruby/network/BasicRouter.hh" #include "mem/ruby/network/garnet/fixed-pipeline/flit_d.hh" #include "mem/ruby/network/garnet/NetworkHeader.hh" #include "mem/ruby/network/orion/NetworkPower.hh" +#include "params/GarnetRouter_d.hh" class GarnetNetwork_d; class NetworkLink_d; @@ -49,10 +51,11 @@ class VCallocator_d; class SWallocator_d; class Switch_d; -class Router_d +class Router_d : public BasicRouter { public: - Router_d(int id, GarnetNetwork_d *network_ptr); + typedef GarnetRouter_dParams Params; + Router_d(const Params *p); ~Router_d(); @@ -68,6 +71,11 @@ class Router_d int get_num_outports() { return m_output_unit.size(); } int get_id() { return m_id; } + void init_net_ptr(GarnetNetwork_d* net_ptr) + { + m_network_ptr = net_ptr; + } + GarnetNetwork_d* get_net_ptr() { return m_network_ptr; } std::vector<InputUnit_d *>& get_inputUnit_ref() { return m_input_unit; } std::vector<OutputUnit_d *>& get_outputUnit_ref() { return m_output_unit; } @@ -86,7 +94,6 @@ class Router_d double get_static_power(){return m_power_sta;} private: - int m_id; int m_virtual_networks, m_num_vcs, m_vc_per_vnet; GarnetNetwork_d *m_network_ptr; int m_flit_width; |