diff options
author | Tushar Krishna <tushar@csail.mit.edu> | 2012-03-19 17:34:17 -0400 |
---|---|---|
committer | Tushar Krishna <tushar@csail.mit.edu> | 2012-03-19 17:34:17 -0400 |
commit | c9e4bca8d8deea063a09bf852b0d37dc129bc227 (patch) | |
tree | 4791501d08b85f82055676d36a24c063773a36bd /src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc | |
parent | 72538294fb1eb2e4dcd5d818c78bcdf78b0de491 (diff) | |
download | gem5-c9e4bca8d8deea063a09bf852b0d37dc129bc227.tar.xz |
Garnet: Stats at vnet granularity + code cleanup
This patch
(1) Moves redundant code from fixed and flexible networks to BaseGarnetNetwork.
(2) Prints network stats at vnet granularity.
Diffstat (limited to 'src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc')
-rw-r--r-- | src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc index b38e2b1d6..07a58de58 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc @@ -164,7 +164,7 @@ NetworkInterface::flitisizeMessage(MsgPtr msg_ptr, int vnet) net_msg_ptr->getInternalDestination().removeNetDest(personal_dest); } for (int i = 0; i < num_flits; i++) { - m_net_ptr->increment_injected_flits(); + m_net_ptr->increment_injected_flits(vnet); flit *fl = new flit(i, vc, vnet, num_flits, new_msg_ptr); fl->set_delay(g_eventQueue_ptr->getTime() - msg_ptr->getTime()); m_ni_buffers[vc]->insert(fl); @@ -273,12 +273,13 @@ NetworkInterface::wakeup() inNetLink->release_vc_link(t_flit->get_vc(), g_eventQueue_ptr->getTime() + 1); } - m_net_ptr->increment_received_flits(); + int vnet = t_flit->get_vnet(); + m_net_ptr->increment_received_flits(vnet); int network_delay = g_eventQueue_ptr->getTime() - t_flit->get_enqueue_time(); int queueing_delay = t_flit->get_delay(); - m_net_ptr->increment_network_latency(network_delay); - m_net_ptr->increment_queueing_latency(queueing_delay); + m_net_ptr->increment_network_latency(network_delay, vnet); + m_net_ptr->increment_queueing_latency(queueing_delay, vnet); delete t_flit; } } |