summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mem/cache/base_cache.cc14
-rw-r--r--src/mem/cache/base_cache.hh2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/mem/cache/base_cache.cc b/src/mem/cache/base_cache.cc
index e6138e320..fd97ea3aa 100644
--- a/src/mem/cache/base_cache.cc
+++ b/src/mem/cache/base_cache.cc
@@ -96,6 +96,15 @@ void
BaseCache::CachePort::recvRetry()
{
Packet *pkt;
+ if (!drainList.empty()) {
+ //We have some responses to drain first
+ bool result = true;
+ while (result && !drainList.empty()) {
+ result = sendTiming(drainList.front());
+ if (result)
+ drainList.pop_front();
+ }
+ }
if (!isCpuSide)
{
@@ -202,7 +211,10 @@ BaseCache::CacheEvent::process()
//Know the packet to send
pkt->result = Packet::Success;
pkt->makeTimingResponse();
- assert(cachePort->sendTiming(pkt));
+ if (!cachePort->sendTiming(pkt)) {
+ //It failed, save it to list of drain events
+ cachePort->drainList.push_back(pkt);
+ }
}
const char *
diff --git a/src/mem/cache/base_cache.hh b/src/mem/cache/base_cache.hh
index 7c16398aa..c69fb7fd5 100644
--- a/src/mem/cache/base_cache.hh
+++ b/src/mem/cache/base_cache.hh
@@ -110,6 +110,8 @@ class BaseCache : public MemObject
bool mustSendRetry;
bool isCpuSide;
+
+ std::list<Packet *> drainList;
};
struct CacheEvent : public Event