summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r--src/mem/ruby/network/simple/PerfectSwitch.cc8
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/ruby/network/simple/PerfectSwitch.cc b/src/mem/ruby/network/simple/PerfectSwitch.cc
index ecd1eb0be..cf2430e36 100644
--- a/src/mem/ruby/network/simple/PerfectSwitch.cc
+++ b/src/mem/ruby/network/simple/PerfectSwitch.cc
@@ -260,6 +260,10 @@ PerfectSwitch::wakeup()
unmodified_msg_ptr = msg_ptr->clone();
}
+ // Dequeue msg
+ m_in[incoming][vnet]->dequeue();
+ m_pending_message_count[vnet]--;
+
// Enqueue it - for all outgoing queues
for (int i=0; i<output_links.size(); i++) {
int outgoing = output_links[i];
@@ -284,10 +288,6 @@ PerfectSwitch::wakeup()
m_out[outgoing][vnet]->enqueue(msg_ptr);
}
-
- // Dequeue msg
- m_in[incoming][vnet]->dequeue();
- m_pending_message_count[vnet]--;
}
}
}
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index 778436c6d..da7b1732b 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -157,8 +157,8 @@ Throttle::wakeup()
g_system_ptr->curCycle());
// Move the message
- m_out[vnet]->enqueue(m_in[vnet]->peekMsgPtr(), m_link_latency);
m_in[vnet]->dequeue();
+ m_out[vnet]->enqueue(msg_ptr, m_link_latency);
// Count the message
m_msg_counts[net_msg_ptr->getMessageSize()][vnet]++;