diff options
author | Ron Dreslinski <rdreslin@umich.edu> | 2006-10-10 01:57:57 -0400 |
---|---|---|
committer | Ron Dreslinski <rdreslin@umich.edu> | 2006-10-10 01:57:57 -0400 |
commit | a0472af008bd13d8a4850ef67b0ef08d37cfb8f8 (patch) | |
tree | 79e12834910a62d400002736c6d306e0e4b8faed /src/mem/cache/base_cache.cc | |
parent | 5448517da4cd13e3c8438850f04367d9614d686b (diff) | |
parent | cc78d86661dfccaca2f144d5bdcc75761bf52521 (diff) | |
download | gem5-a0472af008bd13d8a4850ef67b0ef08d37cfb8f8.tar.xz |
Merge zizzer:/z/m5/Bitkeeper/newmem
into zazzer.eecs.umich.edu:/z/rdreslin/m5bk/newmemcleanest
src/mem/packet.hh:
Hand merge code
--HG--
extra : convert_revision : d659418f24f4f4bf9867fec8573a5d227c0dfcea
Diffstat (limited to 'src/mem/cache/base_cache.cc')
-rw-r--r-- | src/mem/cache/base_cache.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mem/cache/base_cache.cc b/src/mem/cache/base_cache.cc index c56f48eeb..b0be1c530 100644 --- a/src/mem/cache/base_cache.cc +++ b/src/mem/cache/base_cache.cc @@ -104,9 +104,11 @@ BaseCache::CachePort::recvRetry() if (result) drainList.pop_front(); } + if (!result) return; } else if (!isCpuSide) { + if (!cache->doMasterRequest()) return; pkt = cache->getPacket(); MSHR* mshr = (MSHR*)pkt->senderState; bool success = sendTiming(pkt); @@ -178,10 +180,23 @@ BaseCache::CacheEvent::CacheEvent(CachePort *_cachePort, Packet *_pkt) void BaseCache::CacheEvent::process() { + if (!cachePort->drainList.empty()) { + //We have some responses to drain first + bool result = true; + while (result && !cachePort->drainList.empty()) { + result = cachePort->sendTiming(cachePort->drainList.front()); + if (result) + cachePort->drainList.pop_front(); + } + if (!result) return; + } + if (!pkt) { if (!cachePort->isCpuSide) { + //For now, doMasterRequest somehow is still getting set + if (!cachePort->cache->doMasterRequest()) return; //MSHR pkt = cachePort->cache->getPacket(); MSHR* mshr = (MSHR*) pkt->senderState; |