diff options
author | David Hashe <david.hashe@amd.com> | 2015-07-20 09:15:18 -0500 |
---|---|---|
committer | David Hashe <david.hashe@amd.com> | 2015-07-20 09:15:18 -0500 |
commit | 63a9f10de80a2a117aa06858e65dee2b6654762f (patch) | |
tree | ee333f5d8539196fc1c1688f508b1f9101831347 /src/mem/ruby/slicc_interface | |
parent | fbb220b4ae4a608a4954e7cef9007f37f1612b42 (diff) | |
download | gem5-63a9f10de80a2a117aa06858e65dee2b6654762f.tar.xz |
ruby: Fix for stallAndWait bug
It was previously possible for a stalled message to be reordered after an
incomming message. This patch ensures that any stalled message stays in its
original request order.
Diffstat (limited to 'src/mem/ruby/slicc_interface')
-rw-r--r-- | src/mem/ruby/slicc_interface/AbstractController.cc | 8 | ||||
-rw-r--r-- | src/mem/ruby/slicc_interface/AbstractController.hh | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractController.cc b/src/mem/ruby/slicc_interface/AbstractController.cc index a6d05fd3a..1ac99c882 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.cc +++ b/src/mem/ruby/slicc_interface/AbstractController.cc @@ -154,6 +154,7 @@ AbstractController::wakeUpAllBuffers() // std::vector<MsgVecType*> wokeUpMsgVecs; + MsgBufType wokeUpMsgBufs; if(m_waiting_buffers.size() > 0) { for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin(); @@ -162,8 +163,13 @@ AbstractController::wakeUpAllBuffers() for (MsgVecType::iterator vec_iter = buf_iter->second->begin(); vec_iter != buf_iter->second->end(); ++vec_iter) { - if (*vec_iter != NULL) { + // + // Make sure the MessageBuffer has not already be reanalyzed + // + if (*vec_iter != NULL && + (wokeUpMsgBufs.count(*vec_iter) == 0)) { (*vec_iter)->reanalyzeAllMessages(); + wokeUpMsgBufs.insert(*vec_iter); } } wokeUpMsgVecs.push_back(buf_iter->second); diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh index e01a2a824..aadf03bd8 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.hh +++ b/src/mem/ruby/slicc_interface/AbstractController.hh @@ -150,6 +150,7 @@ class AbstractController : public MemObject, public Consumer std::map<Address, MessageBuffer*> m_block_map; typedef std::vector<MessageBuffer*> MsgVecType; + typedef std::set<MessageBuffer*> MsgBufType; typedef std::map< Address, MsgVecType* > WaitingBufType; WaitingBufType m_waiting_buffers; |