double m_total_router_power = 0.0;
double m_dynamic_router_power = 0.0;
double m_static_router_power = 0.0;
+ double m_clk_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_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();
+ m_clk_power += m_router_ptr_vector[i]->get_clk_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 Clock Power = " << m_clk_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;
//Network Activities from garnet
calculate_performance_numbers();
double sim_cycles;
- sim_cycles = g_eventQueue_ptr->getTime() - m_network_ptr->getRubyStartTime();
+ sim_cycles =
+ g_eventQueue_ptr->getTime() - m_network_ptr->getRubyStartTime();
// Number of virtual networks/message classes declared in Ruby
// maybe greater than active virtual networks.
for (int i = 0; i < m_virtual_networks; i++) {
if (active_vclass_ary[i]) {
int temp_vc = i*m_vc_per_vnet;
- vclass_type_ary.push_back((uint32_t) m_network_ptr->get_vnet_type(temp_vc));
+ vclass_type_ary.push_back((uint32_t)
+ m_network_ptr->get_vnet_type(temp_vc));
}
}
assert(vclass_type_ary.size() == num_active_vclass);
uint32_t in_buf_per_data_vc = m_network_ptr->getBuffersPerDataVC();
uint32_t in_buf_per_ctrl_vc = m_network_ptr->getBuffersPerCtrlVC();
//flit width in bits
- uint32_t flit_width = m_network_ptr->getNiFlitSize() * 8;
+ uint32_t flit_width_bits = m_network_ptr->getNiFlitSize() * 8;
orion_rtr_ptr = new OrionRouter(
num_in_port,
num_vc_per_vclass,
in_buf_per_data_vc,
in_buf_per_ctrl_vc,
- flit_width,
+ flit_width_bits,
orion_cfg_ptr
);
double Psw_arb_local_dyn = 0.0;
double Psw_arb_global_dyn = 0.0;
double Pxbar_dyn = 0.0;
- double Pclk_dyn = 0.0;
double Ptotal_dyn = 0.0;
double Pbuf_sta = 0.0;
// Switch Allocation Local
// Each input port chooses one input VC as requestor
// Arbiter size: num_vclass*num_vc_per_vclass:1
- Psw_arb_local_dyn +=
+ Psw_arb_local_dyn =
orion_rtr_ptr->calc_dynamic_energy_local_sw_arb(
num_vclass*num_vc_per_vclass/2, false)*
(sw_local_arbit_count/sim_cycles)*
// Switch Allocation Global
// Each output port chooses one input port as winner
// Arbiter size: num_in_port:1
- Psw_arb_global_dyn +=
+ Psw_arb_global_dyn =
orion_rtr_ptr->calc_dynamic_energy_global_sw_arb(
num_in_port/2, false)*
(sw_global_arbit_count/sim_cycles)*
freq_Hz;
// Crossbar
- Pxbar_dyn +=
+ Pxbar_dyn =
orion_rtr_ptr->calc_dynamic_energy_xbar(false)*
(crossbar_count/sim_cycles)*freq_Hz;
- // Clock
- Pclk_dyn += orion_rtr_ptr->calc_dynamic_energy_clock()*freq_Hz;
-
// Total
Ptotal_dyn = Pbuf_wr_dyn + Pbuf_rd_dyn +
Pvc_arb_local_dyn + Pvc_arb_global_dyn +
Psw_arb_local_dyn + Psw_arb_global_dyn +
- Pxbar_dyn +
- Pclk_dyn;
+ Pxbar_dyn;
m_power_dyn = Ptotal_dyn;
+
+ // Clock Power
+ m_clk_power = orion_rtr_ptr->calc_dynamic_energy_clock()*freq_Hz;
// Static Power
Pbuf_sta = orion_rtr_ptr->get_static_power_buf();
m_power_sta = Ptotal_sta;
- Ptotal = Ptotal_dyn + Ptotal_sta;
+ Ptotal = m_power_dyn + m_power_sta + m_clk_power;
return Ptotal;
}
link_length = orion_cfg_ptr->get<double>("LINK_LENGTH");
+ int channel_width_bits = channel_width*8;
+
orion_link_ptr = new OrionLink(
link_length,
- channel_width /* channel width */,
+ channel_width_bits,
orion_cfg_ptr);
-// // Dynamic Power
double sim_cycles =
(double)(g_eventQueue_ptr->getTime() - m_net_ptr->getRubyStartTime());
- double Plink_dyn = orion_link_ptr->calc_dynamic_energy(channel_width/2)*
+ // Dynamic Power
+ // Assume half the bits flipped on every link activity
+ double Plink_dyn =
+ orion_link_ptr->calc_dynamic_energy(channel_width_bits/2)*
(m_link_utilized/ sim_cycles)*freq_Hz;
m_power_dyn = Plink_dyn;
// Static Power
+ // Calculates number of repeaters needed in link, and their static power
+ // For short links, like 1mm, no repeaters are needed so static power is 0
double Plink_sta = orion_link_ptr->get_static_power();
m_power_sta = Plink_sta;
- double Ptotal = Plink_dyn + Plink_sta;
+ double Ptotal = m_power_dyn + m_power_sta;
return Ptotal;
}