diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-09-06 16:21:35 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-09-06 16:21:35 -0500 |
commit | 90bfbd9793e64b29d09f4ca4ee610ee08f82ea75 (patch) | |
tree | e14b49f9632b25cde8a32b5e5787a36a376e6dff /src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh | |
parent | e9ae8b7d29e83fa2cad55006d2c6dc58115965cc (diff) | |
download | gem5-90bfbd9793e64b29d09f4ca4ee610ee08f82ea75.tar.xz |
ruby: network: convert to gem5 style stats
Diffstat (limited to 'src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh')
-rw-r--r-- | src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh index 4aa437c9c..17ba54fa5 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh +++ b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh @@ -89,12 +89,12 @@ class Router_d : public BasicRouter void printFaultVector(std::ostream& out); void printAggregateFaultProbability(std::ostream& out); - double calculate_power(); + 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; } - double get_dynamic_power(){return m_power_dyn;} - double get_static_power(){return m_power_sta;} - double get_clk_power(){return m_clk_power;} bool get_fault_vector(int temperature, float fault_vector[]){ return m_network_ptr->fault_model->fault_vector(m_id, temperature, fault_vector); @@ -110,11 +110,6 @@ class Router_d : public BasicRouter private: int m_virtual_networks, m_num_vcs, m_vc_per_vnet; GarnetNetwork_d *m_network_ptr; - - std::vector<double> buf_read_count; - std::vector<double> buf_write_count; - std::vector<double> vc_local_arbit_count; - std::vector<double> vc_global_arbit_count; double sw_local_arbit_count, sw_global_arbit_count; double crossbar_count; @@ -125,9 +120,16 @@ 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; + std::vector<double> vc_local_arbit_count; + std::vector<double> vc_global_arbit_count; }; #endif // __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_ROUTER_D_HH__ |