Add mechanism for caches to handle failure of the fast path on responses.
For now, responses have priority over requests (may want to revist this). src/mem/cache/base_cache.cc: src/mem/cache/base_cache.hh: Add mechanism for caches to handle failure of the fast path on responses. --HG-- extra : convert_revision : 01524c727d1bb300cc21bdc989eb862ec8bf0b7a
This commit is contained in:
parent
2c336f0a1f
commit
df3014a726
2 changed files with 15 additions and 1 deletions
14
src/mem/cache/base_cache.cc
vendored
14
src/mem/cache/base_cache.cc
vendored
|
@ -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 *
|
||||
|
|
2
src/mem/cache/base_cache.hh
vendored
2
src/mem/cache/base_cache.hh
vendored
|
@ -110,6 +110,8 @@ class BaseCache : public MemObject
|
|||
bool mustSendRetry;
|
||||
|
||||
bool isCpuSide;
|
||||
|
||||
std::list<Packet *> drainList;
|
||||
};
|
||||
|
||||
struct CacheEvent : public Event
|
||||
|
|
Loading…
Reference in a new issue