summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
diff options
context:
space:
mode:
authorTushar Krishna <tushar@csail.mit.edu>2011-05-18 03:04:14 -0400
committerTushar Krishna <tushar@csail.mit.edu>2011-05-18 03:04:14 -0400
commit26eaba4cb5a5933c17abe9efca8590610f1e36b4 (patch)
treee1edaf1ac8e04594b2d56c378834f1d47ae6cbfa /src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
parent44e599a1a4843db07cb77cfedc136e8e994016cf (diff)
downloadgem5-26eaba4cb5a5933c17abe9efca8590610f1e36b4.tar.xz
garnet: rename and rearrange config parameters.
Renamed (message) class to vnet for consistency with rest of ruby. Moved some parameters specific to fixed/flexible garnet networks into their corresponding py files.
Diffstat (limited to 'src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc')
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc13
1 files changed, 8 insertions, 5 deletions
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 c8b9fbea7..17dba251d 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
@@ -49,6 +49,9 @@ using m5::stl_helpers::deletePointers;
GarnetNetwork_d::GarnetNetwork_d(const Params *p)
: BaseGarnetNetwork(p)
{
+ m_buffers_per_data_vc = p->buffers_per_data_vc;
+ m_buffers_per_ctrl_vc = p->buffers_per_ctrl_vc;
+
// record the routers
for (vector<BasicRouter*>::const_iterator i =
m_topology_ptr->params()->routers.begin();
@@ -254,9 +257,9 @@ GarnetNetwork_d::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;
}
@@ -272,7 +275,7 @@ GarnetNetwork_d::printStats(ostream& out) const
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];
}
}
@@ -282,8 +285,8 @@ GarnetNetwork_d::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]) /