diff options
author | Tushar Krishna <tushar@csail.mit.edu> | 2011-05-18 03:04:14 -0400 |
---|---|---|
committer | Tushar Krishna <tushar@csail.mit.edu> | 2011-05-18 03:04:14 -0400 |
commit | 26eaba4cb5a5933c17abe9efca8590610f1e36b4 (patch) | |
tree | e1edaf1ac8e04594b2d56c378834f1d47ae6cbfa /src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc | |
parent | 44e599a1a4843db07cb77cfedc136e8e994016cf (diff) | |
download | gem5-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/flexible-pipeline/GarnetNetwork.cc')
-rw-r--r-- | src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc | 11 |
1 files changed, 6 insertions, 5 deletions
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]) / |