diff options
author | Joel Hestness <hestness@cs.utexas.edu> | 2011-02-06 22:14:19 -0800 |
---|---|---|
committer | Joel Hestness <hestness@cs.utexas.edu> | 2011-02-06 22:14:19 -0800 |
commit | ebe563e531d5224ee7aad26767c08e8eba11e4e6 (patch) | |
tree | 932dcdabed9b2a99e98f17e21a63ae0d769b73c5 /src/mem | |
parent | 5c2f4937b33c5ed4684ff0eda03d427adb270841 (diff) | |
download | gem5-ebe563e531d5224ee7aad26767c08e8eba11e4e6.tar.xz |
garnet: Split network power in ruby.stats
Split out dynamic and static power numbers for printing to ruby.stats
Diffstat (limited to 'src/mem')
4 files changed, 30 insertions, 0 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 d11054abf..dbfabc8f1 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc @@ -319,16 +319,28 @@ GarnetNetwork_d::printStats(ostream& out) const out << "-------------" << endl; double m_total_link_power = 0.0; + double m_dynamic_link_power = 0.0; + double m_static_link_power = 0.0; double m_total_router_power = 0.0; + double m_dynamic_router_power = 0.0; + double m_static_router_power = 0.0; for (int i = 0; i < m_link_ptr_vector.size(); i++) { m_total_link_power += m_link_ptr_vector[i]->calculate_power(); + m_dynamic_link_power += m_link_ptr_vector[i]->get_dynamic_power(); + m_static_link_power += m_link_ptr_vector[i]->get_static_power(); } for (int i = 0; i < m_router_ptr_vector.size(); i++) { m_total_router_power += m_router_ptr_vector[i]->calculate_power(); + m_dynamic_router_power += m_router_ptr_vector[i]->get_dynamic_power(); + m_static_router_power += m_router_ptr_vector[i]->get_static_power(); } + out << "Link Dynamic Power = " << m_dynamic_link_power << " W" << endl; + out << "Link Static Power = " << m_static_link_power << " W" << endl; out << "Total Link Power = " << m_total_link_power << " W " << endl; + out << "Router Dynamic Power = " << m_dynamic_router_power << " W" << endl; + out << "Router Static Power = " << m_static_router_power << " W" << endl; out << "Total Router Power = " << m_total_router_power << " W " <<endl; out << "-------------" << endl; m_topology_ptr->printStats(out); diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh index cc13f5b9e..8024ebd9c 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh +++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh @@ -54,6 +54,8 @@ class NetworkLink_d : public Consumer int getLinkUtilization(); std::vector<int> getVcLoad(); int get_id(){return m_id;} + double get_dynamic_power(){return m_power_dyn;} + double get_static_power(){return m_power_sta;} void wakeup(); double calculate_power(); @@ -73,6 +75,9 @@ class NetworkLink_d : public Consumer int m_link_utilized; std::vector<int> m_vc_load; int m_flit_width; + + double m_power_dyn; + double m_power_sta; }; #endif // __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_NETWORK_LINK_D_HH__ 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 0c5d51fc3..b6899ea6b 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh +++ b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh @@ -81,6 +81,9 @@ class Router_d double calculate_power(); void calculate_performance_numbers(); + double get_dynamic_power(){return m_power_dyn;} + double get_static_power(){return m_power_sta;} + private: int m_id; int m_virtual_networks, m_num_vcs, m_vc_per_vnet; @@ -100,6 +103,9 @@ class Router_d VCallocator_d *m_vc_alloc; SWallocator_d *m_sw_alloc; Switch_d *m_switch; + + double m_power_dyn; + double m_power_sta; }; #endif // __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_ROUTER_D_HH__ diff --git a/src/mem/ruby/network/orion/NetworkPower.cc b/src/mem/ruby/network/orion/NetworkPower.cc index 7d4aae3ed..b71e09dce 100644 --- a/src/mem/ruby/network/orion/NetworkPower.cc +++ b/src/mem/ruby/network/orion/NetworkPower.cc @@ -206,6 +206,7 @@ Router_d::calculate_power() Pxbar_dyn + Pclk_dyn; + m_power_dyn = Ptotal_dyn; // Static Power Pbuf_sta = orion_rtr_ptr->get_static_power_buf(); @@ -215,6 +216,8 @@ Router_d::calculate_power() Ptotal_sta += Pbuf_sta + Pvc_arb_sta + Psw_arb_sta + Pxbar_sta; + m_power_sta = Ptotal_sta; + Ptotal = Ptotal_dyn + Ptotal_sta; return Ptotal; @@ -250,9 +253,13 @@ NetworkLink_d::calculate_power() double Plink_dyn = orion_link_ptr->calc_dynamic_energy(channel_width/2)* (m_link_utilized/ sim_cycles)*freq_Hz; + m_power_dyn = Plink_dyn; + // Static Power double Plink_sta = orion_link_ptr->get_static_power(); + m_power_sta = Plink_sta; + double Ptotal = Plink_dyn + Plink_sta; return Ptotal; |