diff options
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r-- | src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc | 6 | ||||
-rw-r--r-- | src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh | 1 | ||||
-rw-r--r-- | src/mem/ruby/network/garnet2.0/NetworkLink.cc | 10 | ||||
-rw-r--r-- | src/mem/ruby/network/garnet2.0/NetworkLink.hh | 1 | ||||
-rw-r--r-- | src/mem/ruby/network/garnet2.0/Router.cc | 3 | ||||
-rw-r--r-- | src/mem/ruby/network/garnet2.0/SwitchAllocator.cc | 7 | ||||
-rw-r--r-- | src/mem/ruby/network/garnet2.0/SwitchAllocator.hh | 2 |
7 files changed, 30 insertions, 0 deletions
diff --git a/src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc b/src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc index 340f56d61..fbaf25b7d 100644 --- a/src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc +++ b/src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc @@ -110,3 +110,9 @@ CrossbarSwitch::functionalWrite(Packet *pkt) return num_functional_writes; } + +void +CrossbarSwitch::resetStats() +{ + m_crossbar_activity = 0; +}
\ No newline at end of file diff --git a/src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh b/src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh index 7aaeabf0c..bca3a92e4 100644 --- a/src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh +++ b/src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh @@ -59,6 +59,7 @@ class CrossbarSwitch : public Consumer inline double get_crossbar_activity() { return m_crossbar_activity; } uint32_t functionalWrite(Packet *pkt); + void resetStats(); private: int m_num_vcs; diff --git a/src/mem/ruby/network/garnet2.0/NetworkLink.cc b/src/mem/ruby/network/garnet2.0/NetworkLink.cc index 6010071f0..e718fb867 100644 --- a/src/mem/ruby/network/garnet2.0/NetworkLink.cc +++ b/src/mem/ruby/network/garnet2.0/NetworkLink.cc @@ -75,6 +75,16 @@ NetworkLink::wakeup() } } +void +NetworkLink::resetStats() +{ + for (int i = 0; i < m_vc_load.size(); i++) { + m_vc_load[i] = 0; + } + + m_link_utilized = 0; +} + NetworkLink * NetworkLinkParams::create() { diff --git a/src/mem/ruby/network/garnet2.0/NetworkLink.hh b/src/mem/ruby/network/garnet2.0/NetworkLink.hh index cb69b39ad..10399ec37 100644 --- a/src/mem/ruby/network/garnet2.0/NetworkLink.hh +++ b/src/mem/ruby/network/garnet2.0/NetworkLink.hh @@ -70,6 +70,7 @@ class NetworkLink : public ClockedObject, public Consumer inline flit* consumeLink() { return linkBuffer->getTopFlit(); } uint32_t functionalWrite(Packet *); + void resetStats(); private: const int m_id; diff --git a/src/mem/ruby/network/garnet2.0/Router.cc b/src/mem/ruby/network/garnet2.0/Router.cc index 65a730096..7266f998a 100644 --- a/src/mem/ruby/network/garnet2.0/Router.cc +++ b/src/mem/ruby/network/garnet2.0/Router.cc @@ -241,6 +241,9 @@ Router::resetStats() m_input_unit[i]->resetStats(); } } + + m_switch->resetStats(); + m_sw_alloc->resetStats(); } void diff --git a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc b/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc index 4619b0b8a..836f071fe 100644 --- a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc +++ b/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc @@ -387,3 +387,10 @@ SwitchAllocator::clear_request_vector() } } } + +void +SwitchAllocator::resetStats() +{ + m_input_arbiter_activity = 0; + m_output_arbiter_activity = 0; +}
\ No newline at end of file diff --git a/src/mem/ruby/network/garnet2.0/SwitchAllocator.hh b/src/mem/ruby/network/garnet2.0/SwitchAllocator.hh index 162264e85..7515b734f 100644 --- a/src/mem/ruby/network/garnet2.0/SwitchAllocator.hh +++ b/src/mem/ruby/network/garnet2.0/SwitchAllocator.hh @@ -70,6 +70,8 @@ class SwitchAllocator : public Consumer return m_output_arbiter_activity; } + void resetStats(); + private: int m_num_inports, m_num_outports; int m_num_vcs, m_vc_per_vnet; |