garnet: Split network power in ruby.stats
Split out dynamic and static power numbers for printing to ruby.stats
This commit is contained in:
parent
5c2f4937b3
commit
ebe563e531
4 changed files with 30 additions and 0 deletions
|
@ -319,16 +319,28 @@ GarnetNetwork_d::printStats(ostream& out) const
|
||||||
out << "-------------" << endl;
|
out << "-------------" << endl;
|
||||||
|
|
||||||
double m_total_link_power = 0.0;
|
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_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++) {
|
for (int i = 0; i < m_link_ptr_vector.size(); i++) {
|
||||||
m_total_link_power += m_link_ptr_vector[i]->calculate_power();
|
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++) {
|
for (int i = 0; i < m_router_ptr_vector.size(); i++) {
|
||||||
m_total_router_power += m_router_ptr_vector[i]->calculate_power();
|
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 << "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 << "Total Router Power = " << m_total_router_power << " W " <<endl;
|
||||||
out << "-------------" << endl;
|
out << "-------------" << endl;
|
||||||
m_topology_ptr->printStats(out);
|
m_topology_ptr->printStats(out);
|
||||||
|
|
|
@ -54,6 +54,8 @@ class NetworkLink_d : public Consumer
|
||||||
int getLinkUtilization();
|
int getLinkUtilization();
|
||||||
std::vector<int> getVcLoad();
|
std::vector<int> getVcLoad();
|
||||||
int get_id(){return m_id;}
|
int get_id(){return m_id;}
|
||||||
|
double get_dynamic_power(){return m_power_dyn;}
|
||||||
|
double get_static_power(){return m_power_sta;}
|
||||||
void wakeup();
|
void wakeup();
|
||||||
|
|
||||||
double calculate_power();
|
double calculate_power();
|
||||||
|
@ -73,6 +75,9 @@ class NetworkLink_d : public Consumer
|
||||||
int m_link_utilized;
|
int m_link_utilized;
|
||||||
std::vector<int> m_vc_load;
|
std::vector<int> m_vc_load;
|
||||||
int m_flit_width;
|
int m_flit_width;
|
||||||
|
|
||||||
|
double m_power_dyn;
|
||||||
|
double m_power_sta;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_NETWORK_LINK_D_HH__
|
#endif // __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_NETWORK_LINK_D_HH__
|
||||||
|
|
|
@ -81,6 +81,9 @@ class Router_d
|
||||||
double calculate_power();
|
double calculate_power();
|
||||||
void calculate_performance_numbers();
|
void calculate_performance_numbers();
|
||||||
|
|
||||||
|
double get_dynamic_power(){return m_power_dyn;}
|
||||||
|
double get_static_power(){return m_power_sta;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_id;
|
int m_id;
|
||||||
int m_virtual_networks, m_num_vcs, m_vc_per_vnet;
|
int m_virtual_networks, m_num_vcs, m_vc_per_vnet;
|
||||||
|
@ -100,6 +103,9 @@ class Router_d
|
||||||
VCallocator_d *m_vc_alloc;
|
VCallocator_d *m_vc_alloc;
|
||||||
SWallocator_d *m_sw_alloc;
|
SWallocator_d *m_sw_alloc;
|
||||||
Switch_d *m_switch;
|
Switch_d *m_switch;
|
||||||
|
|
||||||
|
double m_power_dyn;
|
||||||
|
double m_power_sta;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_ROUTER_D_HH__
|
#endif // __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_ROUTER_D_HH__
|
||||||
|
|
|
@ -206,6 +206,7 @@ Router_d::calculate_power()
|
||||||
Pxbar_dyn +
|
Pxbar_dyn +
|
||||||
Pclk_dyn;
|
Pclk_dyn;
|
||||||
|
|
||||||
|
m_power_dyn = Ptotal_dyn;
|
||||||
|
|
||||||
// Static Power
|
// Static Power
|
||||||
Pbuf_sta = orion_rtr_ptr->get_static_power_buf();
|
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;
|
Ptotal_sta += Pbuf_sta + Pvc_arb_sta + Psw_arb_sta + Pxbar_sta;
|
||||||
|
|
||||||
|
m_power_sta = Ptotal_sta;
|
||||||
|
|
||||||
Ptotal = Ptotal_dyn + Ptotal_sta;
|
Ptotal = Ptotal_dyn + Ptotal_sta;
|
||||||
|
|
||||||
return Ptotal;
|
return Ptotal;
|
||||||
|
@ -250,9 +253,13 @@ NetworkLink_d::calculate_power()
|
||||||
double Plink_dyn = orion_link_ptr->calc_dynamic_energy(channel_width/2)*
|
double Plink_dyn = orion_link_ptr->calc_dynamic_energy(channel_width/2)*
|
||||||
(m_link_utilized/ sim_cycles)*freq_Hz;
|
(m_link_utilized/ sim_cycles)*freq_Hz;
|
||||||
|
|
||||||
|
m_power_dyn = Plink_dyn;
|
||||||
|
|
||||||
// Static Power
|
// Static Power
|
||||||
double Plink_sta = orion_link_ptr->get_static_power();
|
double Plink_sta = orion_link_ptr->get_static_power();
|
||||||
|
|
||||||
|
m_power_sta = Plink_sta;
|
||||||
|
|
||||||
double Ptotal = Plink_dyn + Plink_sta;
|
double Ptotal = Plink_dyn + Plink_sta;
|
||||||
|
|
||||||
return Ptotal;
|
return Ptotal;
|
||||||
|
|
Loading…
Reference in a new issue