diff options
Diffstat (limited to 'src/mem/ruby/network/garnet/flexible-pipeline')
8 files changed, 16 insertions, 13 deletions
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py index 4077f30e6..591ab4beb 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py @@ -37,8 +37,8 @@ class NetworkLink(SimObject): type = 'NetworkLink' link_id = Param.Int(Parent.link_id, "link id") link_latency = Param.Int(Parent.latency, "link latency") - vcs_per_class = Param.Int(Parent.vcs_per_class, - "virtual channels per message class") + vcs_per_vnet = Param.Int(Parent.vcs_per_vnet, + "virtual channels per virtual network") virt_nets = Param.Int(Parent.number_of_virtual_networks, "number of virtual networks") channel_width = Param.Int(Parent.bandwidth_factor, diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc index d403633a8..62ae2dbd6 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc @@ -49,6 +49,7 @@ GarnetNetwork::GarnetNetwork(const Params *p) : BaseGarnetNetwork(p) { m_buffer_size = p->buffer_size; + m_number_of_pipe_stages = p->number_of_pipe_stages; // record the routers for (vector<BasicRouter*>::const_iterator i = @@ -221,9 +222,9 @@ GarnetNetwork::printStats(ostream& out) const { double average_link_utilization = 0; vector<double> average_vc_load; - average_vc_load.resize(m_virtual_networks*m_vcs_per_class); + average_vc_load.resize(m_virtual_networks*m_vcs_per_vnet); - for (int i = 0; i < m_virtual_networks*m_vcs_per_class; i++) { + for (int i = 0; i < m_virtual_networks*m_vcs_per_vnet; i++) { average_vc_load[i] = 0; } @@ -236,7 +237,7 @@ GarnetNetwork::printStats(ostream& out) const m_link_ptr_vector[i]->getLinkUtilization(); vector<int> vc_load = m_link_ptr_vector[i]->getVcLoad(); for (int j = 0; j < vc_load.size(); j++) { - assert(vc_load.size() == m_vcs_per_class*m_virtual_networks); + assert(vc_load.size() == m_vcs_per_vnet*m_virtual_networks); average_vc_load[j] += vc_load[j]; } } @@ -246,8 +247,8 @@ GarnetNetwork::printStats(ostream& out) const " flits/cycle" <<endl; out << "-------------" << endl; - for (int i = 0; i < m_vcs_per_class*m_virtual_networks; i++) { - if (!m_in_use[i/m_vcs_per_class]) + for (int i = 0; i < m_vcs_per_vnet*m_virtual_networks; i++) { + if (!m_in_use[i/m_vcs_per_vnet]) continue; average_vc_load[i] = (double(average_vc_load[i]) / diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh index a19e167a8..6e08330f3 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh @@ -57,6 +57,7 @@ class GarnetNetwork : public BaseGarnetNetwork void init(); int getBufferSize() { return m_buffer_size; } + int getNumPipeStages() {return m_number_of_pipe_stages; } // returns the queue requested for the given component MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num); @@ -115,6 +116,7 @@ class GarnetNetwork : public BaseGarnetNetwork std::vector<NetworkInterface *> m_ni_ptr_vector; // All NI's in Network int m_buffer_size; + int m_number_of_pipe_stages; }; inline std::ostream& diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py index 0844fe3b4..7ad61a5ce 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py @@ -35,4 +35,4 @@ class GarnetNetwork(BaseGarnetNetwork): type = 'GarnetNetwork' buffer_size = Param.Int(0, "default buffer size; 0 indicates infinite buffering"); - + number_of_pipe_stages = Param.Int(4, "router pipeline stages"); diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetRouter.py b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetRouter.py index a7ddfb7fb..b626471a6 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetRouter.py +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetRouter.py @@ -35,8 +35,8 @@ from BasicRouter import BasicRouter class GarnetRouter(BasicRouter): type = 'GarnetRouter' cxx_class = 'Router' - vcs_per_class = Param.Int(Parent.vcs_per_class, - "virtual channels per message class") + vcs_per_vnet = Param.Int(Parent.vcs_per_vnet, + "virtual channels per virtual network") virt_nets = Param.Int(Parent.number_of_virtual_networks, "number of virtual networks") diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc index df9f91c2d..a41c2768d 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc @@ -47,7 +47,7 @@ NetworkInterface::NetworkInterface(int id, int virtual_networks, m_id = id; m_net_ptr = network_ptr; m_virtual_networks = virtual_networks; - m_vc_per_vnet = m_net_ptr->getVCsPerClass(); + m_vc_per_vnet = m_net_ptr->getVCsPerVnet(); m_num_vcs = m_vc_per_vnet*m_virtual_networks; m_vc_round_robin = 0; diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc index c6584700a..3886be69e 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc @@ -41,7 +41,7 @@ NetworkLink::NetworkLink(const Params *p) m_latency = p->link_latency; m_id = p->link_id; int num_net = p->virt_nets; - int num_vc = p->vcs_per_class; + int num_vc = p->vcs_per_vnet; m_vc_load.resize(num_net * num_vc); for (int i = 0; i < num_net * num_vc; i++) diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc index 51af50b7d..9965d3211 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc @@ -44,7 +44,7 @@ Router::Router(const Params *p) { m_id = p->router_id; m_virtual_networks = p->virt_nets; - m_vc_per_vnet = p->vcs_per_class; + m_vc_per_vnet = p->vcs_per_vnet; m_round_robin_inport = 0; m_round_robin_start = 0; m_num_vcs = m_vc_per_vnet * m_virtual_networks; |