changeset 3a02353d6e43 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=3a02353d6e43
description:
        garnet: Split network power in ruby.stats

        Split out dynamic and static power numbers for printing to ruby.stats

diffstat:

 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc |  12 +++++++++++
 src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh   |   5 ++++
 src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh        |   6 +++++
 src/mem/ruby/network/orion/NetworkPower.cc                    |   7 ++++++
 4 files changed, 30 insertions(+), 0 deletions(-)

diffs (111 lines):

diff -r 409a2692b8e6 -r 3a02353d6e43 
src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc     Sun Feb 
06 22:14:19 2011 -0800
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc     Sun Feb 
06 22:14:19 2011 -0800
@@ -319,16 +319,28 @@
     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 -r 409a2692b8e6 -r 3a02353d6e43 
src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh       Sun Feb 
06 22:14:19 2011 -0800
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh       Sun Feb 
06 22:14:19 2011 -0800
@@ -54,6 +54,8 @@
     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 @@
     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 -r 409a2692b8e6 -r 3a02353d6e43 
src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh
--- a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh    Sun Feb 06 
22:14:19 2011 -0800
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh    Sun Feb 06 
22:14:19 2011 -0800
@@ -81,6 +81,9 @@
     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 @@
     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 -r 409a2692b8e6 -r 3a02353d6e43 src/mem/ruby/network/orion/NetworkPower.cc
--- a/src/mem/ruby/network/orion/NetworkPower.cc        Sun Feb 06 22:14:19 
2011 -0800
+++ b/src/mem/ruby/network/orion/NetworkPower.cc        Sun Feb 06 22:14:19 
2011 -0800
@@ -206,6 +206,7 @@
                  Pxbar_dyn +
                  Pclk_dyn;
 
+    m_power_dyn = Ptotal_dyn;
 
     // Static Power
     Pbuf_sta = orion_rtr_ptr->get_static_power_buf();
@@ -215,6 +216,8 @@
 
     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 @@
     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;
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to