ruby: network: garnet: remove functions for computing power
This commit is contained in:
parent
9321a41c62
commit
25bb18f12b
5 changed files with 5 additions and 82 deletions
|
@ -210,13 +210,7 @@ void
|
|||
GarnetNetwork_d::regStats()
|
||||
{
|
||||
BaseGarnetNetwork::regStats();
|
||||
regLinkStats();
|
||||
regPowerStats();
|
||||
}
|
||||
|
||||
void
|
||||
GarnetNetwork_d::regLinkStats()
|
||||
{
|
||||
m_average_link_utilization.name(name() + ".avg_link_utilization");
|
||||
|
||||
m_average_vc_load
|
||||
|
@ -226,34 +220,8 @@ GarnetNetwork_d::regLinkStats()
|
|||
;
|
||||
}
|
||||
|
||||
void
|
||||
GarnetNetwork_d::regPowerStats()
|
||||
{
|
||||
m_dynamic_link_power.name(name() + ".link_dynamic_power");
|
||||
m_static_link_power.name(name() + ".link_static_power");
|
||||
|
||||
m_total_link_power.name(name() + ".link_total_power");
|
||||
m_total_link_power = m_dynamic_link_power + m_static_link_power;
|
||||
|
||||
m_dynamic_router_power.name(name() + ".router_dynamic_power");
|
||||
m_static_router_power.name(name() + ".router_static_power");
|
||||
m_clk_power.name(name() + ".clk_power");
|
||||
|
||||
m_total_router_power.name(name() + ".router_total_power");
|
||||
m_total_router_power = m_dynamic_router_power +
|
||||
m_static_router_power +
|
||||
m_clk_power;
|
||||
}
|
||||
|
||||
void
|
||||
GarnetNetwork_d::collateStats()
|
||||
{
|
||||
collateLinkStats();
|
||||
collatePowerStats();
|
||||
}
|
||||
|
||||
void
|
||||
GarnetNetwork_d::collateLinkStats()
|
||||
{
|
||||
for (int i = 0; i < m_links.size(); i++) {
|
||||
m_average_link_utilization +=
|
||||
|
@ -266,23 +234,10 @@ GarnetNetwork_d::collateLinkStats()
|
|||
((double)vc_load[j] / (double)(curCycle() - g_ruby_start));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GarnetNetwork_d::collatePowerStats()
|
||||
{
|
||||
double sim_cycles = (double)(curCycle() - g_ruby_start);
|
||||
for (int i = 0; i < m_links.size(); i++) {
|
||||
m_links[i]->calculate_power(sim_cycles);
|
||||
m_dynamic_link_power += m_links[i]->get_dynamic_power();
|
||||
m_static_link_power += m_links[i]->get_static_power();
|
||||
}
|
||||
|
||||
// Ask the routers to collate their statistics
|
||||
for (int i = 0; i < m_routers.size(); i++) {
|
||||
m_routers[i]->calculate_power();
|
||||
m_dynamic_router_power += m_routers[i]->get_dynamic_power();
|
||||
m_static_router_power += m_routers[i]->get_static_power();
|
||||
m_clk_power += m_routers[i]->get_clk_power();
|
||||
m_routers[i]->collateStats();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,13 +90,7 @@ class GarnetNetwork_d : public BaseGarnetNetwork
|
|||
GarnetNetwork_d(const GarnetNetwork_d& obj);
|
||||
GarnetNetwork_d& operator=(const GarnetNetwork_d& obj);
|
||||
|
||||
void collateLinkStats();
|
||||
void collatePowerStats();
|
||||
void regLinkStats();
|
||||
void regPowerStats();
|
||||
|
||||
std::vector<VNET_type > m_vnet_type;
|
||||
|
||||
std::vector<Router_d *> m_routers; // All Routers in Network
|
||||
std::vector<NetworkLink_d *> m_links; // All links in the network
|
||||
std::vector<CreditLink_d *> m_creditlinks; // All links in net
|
||||
|
@ -105,16 +99,6 @@ class GarnetNetwork_d : public BaseGarnetNetwork
|
|||
int m_buffers_per_data_vc;
|
||||
int m_buffers_per_ctrl_vc;
|
||||
|
||||
// Statistical variables for power
|
||||
Stats::Scalar m_dynamic_link_power;
|
||||
Stats::Scalar m_static_link_power;
|
||||
Stats::Formula m_total_link_power;
|
||||
|
||||
Stats::Scalar m_dynamic_router_power;
|
||||
Stats::Scalar m_static_router_power;
|
||||
Stats::Scalar m_clk_power;
|
||||
Stats::Formula m_total_router_power;
|
||||
|
||||
// Statistical variables for performance
|
||||
Stats::Scalar m_average_link_utilization;
|
||||
Stats::Vector m_average_vc_load;
|
||||
|
|
|
@ -55,10 +55,6 @@ class NetworkLink_d : public ClockedObject, public Consumer
|
|||
int get_id(){return m_id;}
|
||||
void wakeup();
|
||||
|
||||
void calculate_power(double) {}
|
||||
double get_dynamic_power() const { return m_power_dyn; }
|
||||
double get_static_power()const { return m_power_sta; }
|
||||
|
||||
unsigned int getLinkUtilization() const { return m_link_utilized; }
|
||||
const std::vector<unsigned int> & getVcLoad() const { return m_vc_load; }
|
||||
|
||||
|
@ -83,9 +79,6 @@ class NetworkLink_d : public ClockedObject, public Consumer
|
|||
// Statistical variables
|
||||
unsigned int m_link_utilized;
|
||||
std::vector<unsigned int> m_vc_load;
|
||||
|
||||
double m_power_dyn;
|
||||
double m_power_sta;
|
||||
};
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_NETWORK_LINK_D_HH__
|
||||
|
|
|
@ -158,7 +158,7 @@ Router_d::update_sw_winner(int inport, flit_d *t_flit)
|
|||
}
|
||||
|
||||
void
|
||||
Router_d::calculate_performance_numbers()
|
||||
Router_d::collateStats()
|
||||
{
|
||||
for (int j = 0; j < m_virtual_networks; j++) {
|
||||
for (int i = 0; i < m_input_unit.size(); i++) {
|
||||
|
|
|
@ -85,14 +85,10 @@ class Router_d : public BasicRouter
|
|||
void route_req(flit_d *t_flit, InputUnit_d* in_unit, int invc);
|
||||
void vcarb_req();
|
||||
void swarb_req();
|
||||
|
||||
void printFaultVector(std::ostream& out);
|
||||
void printAggregateFaultProbability(std::ostream& out);
|
||||
|
||||
void calculate_power() {}
|
||||
void calculate_performance_numbers();
|
||||
double get_dynamic_power() const { return m_power_dyn; }
|
||||
double get_static_power() const { return m_power_sta; }
|
||||
double get_clk_power() const { return m_clk_power; }
|
||||
void collateStats();
|
||||
|
||||
bool get_fault_vector(int temperature, float fault_vector[]){
|
||||
return m_network_ptr->fault_model->fault_vector(m_id, temperature,
|
||||
|
@ -119,11 +115,6 @@ class Router_d : public BasicRouter
|
|||
SWallocator_d *m_sw_alloc;
|
||||
Switch_d *m_switch;
|
||||
|
||||
// Statistical variables for power
|
||||
double m_power_dyn;
|
||||
double m_power_sta;
|
||||
double m_clk_power;
|
||||
|
||||
// Statistical variables for performance
|
||||
std::vector<double> buf_read_count;
|
||||
std::vector<double> buf_write_count;
|
||||
|
|
Loading…
Reference in a new issue