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);
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();
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__
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;
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__
Pxbar_dyn +
Pclk_dyn;
+ m_power_dyn = Ptotal_dyn;
// Static Power
Pbuf_sta = orion_rtr_ptr->get_static_power_buf();
Ptotal_sta += Pbuf_sta + Pvc_arb_sta + Psw_arb_sta + Pxbar_sta;
+ m_power_sta = Ptotal_sta;
+
Ptotal = Ptotal_dyn + Ptotal_sta;
return Ptotal;
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;