diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-01-14 10:05:10 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-01-14 10:05:10 -0600 |
commit | 20129837186a5eb28a1b1e2f8dcd441934af68a6 (patch) | |
tree | ab8daf1e72d64ec8ffadc6bdce4129c891dd3c8d /src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc | |
parent | cf232de4615f0fe9435d6e92a1d6319c972a8c88 (diff) | |
download | gem5-20129837186a5eb28a1b1e2f8dcd441934af68a6.tar.xz |
Ruby: remove reference to g_system_ptr from class Message
This patch was initiated so as to remove reference to g_system_ptr,
the pointer to Ruby System that is used for getting the current time.
That simple change actual requires changing a lot many things in slicc and
garnet. All these changes are related to how time is handled.
In most of the places, g_system_ptr has been replaced by another clock
object. The changes have been done under the assumption that all the
components in the memory system are on the same clock frequency, but the
actual clocks might be distributed.
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.cc | 6 |
1 files changed, 3 insertions, 3 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 c7ac85ad3..6404eb6ff 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc @@ -272,7 +272,7 @@ GarnetNetwork_d::printLinkStats(ostream& out) const for (int i = 0; i < m_link_ptr_vector.size(); i++) { average_link_utilization += (double(m_link_ptr_vector[i]->getLinkUtilization())) / - (double(g_system_ptr->getTime()-m_ruby_start)); + (double(curCycle() - m_ruby_start)); vector<int> vc_load = m_link_ptr_vector[i]->getVcLoad(); for (int j = 0; j < vc_load.size(); j++) { @@ -290,8 +290,8 @@ GarnetNetwork_d::printLinkStats(ostream& out) const if (!m_in_use[i/m_vcs_per_vnet]) continue; - average_vc_load[i] = (double(average_vc_load[i]) / - (double(g_system_ptr->getTime()) - m_ruby_start)); + average_vc_load[i] = (double(average_vc_load[i])) / + (double(curCycle() - m_ruby_start)); out << "Average VC Load [" << i << "] = " << average_vc_load[i] << " flits/cycle " << endl; } |