summaryrefslogtreecommitdiff
path: root/src/mem/cache
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2006-10-12 15:02:56 -0400
committerRon Dreslinski <rdreslin@umich.edu>2006-10-12 15:02:56 -0400
commiteddbb6801f6f9666d81cb5491b4ceedd3955f996 (patch)
treeeefa1a8ab1113b9c0e6e3b42b8b6505a848ca10a /src/mem/cache
parent4a96779350c6f246f7244daf8be7dbceffbadc8f (diff)
downloadgem5-eddbb6801f6f9666d81cb5491b4ceedd3955f996.tar.xz
Fix CSHR retrys
--HG-- extra : convert_revision : caa7664f6c945396fa38ce62fbda018ebed4eaa6
Diffstat (limited to 'src/mem/cache')
-rw-r--r--src/mem/cache/base_cache.cc32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/mem/cache/base_cache.cc b/src/mem/cache/base_cache.cc
index 4a4a81f73..3f7a52fab 100644
--- a/src/mem/cache/base_cache.cc
+++ b/src/mem/cache/base_cache.cc
@@ -189,7 +189,6 @@ BaseCache::CachePort::recvRetry()
{
DPRINTF(CachePort, "%s has more requests\n", name());
//Still more to issue, rerequest in 1 cycle
- pkt = NULL;
BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(this);
reqCpu->schedule(curTick + 1);
}
@@ -202,12 +201,13 @@ BaseCache::CachePort::recvRetry()
pkt = cshrRetry;
bool success = sendTiming(pkt);
waitingOnRetry = !success;
- if (success && cache->doSlaveRequest())
+ if (success)
{
- //Still more to issue, rerequest in 1 cycle
- pkt = NULL;
- BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(this);
- reqCpu->schedule(curTick + 1);
+ if (cache->doSlaveRequest()) {
+ //Still more to issue, rerequest in 1 cycle
+ BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(this);
+ reqCpu->schedule(curTick + 1);
+ }
cshrRetry = NULL;
}
}
@@ -305,20 +305,28 @@ BaseCache::CacheEvent::process()
}
else
{
- assert(cachePort->cache->doSlaveRequest());
//CSHR
- pkt = cachePort->cache->getCoherencePacket();
+ if (!cachePort->cshrRetry) {
+ assert(cachePort->cache->doSlaveRequest());
+ pkt = cachePort->cache->getCoherencePacket();
+ }
+ else {
+ pkt = cachePort->cshrRetry;
+ }
bool success = cachePort->sendTiming(pkt);
if (!success) {
//Need to send on a retry
cachePort->cshrRetry = pkt;
cachePort->waitingOnRetry = true;
}
- else if (cachePort->cache->doSlaveRequest())
+ else
{
- //Still more to issue, rerequest in 1 cycle
- pkt = NULL;
- this->schedule(curTick+1);
+ cachePort->cshrRetry = NULL;
+ if (cachePort->cache->doSlaveRequest()) {
+ //Still more to issue, rerequest in 1 cycle
+ pkt = NULL;
+ this->schedule(curTick+1);
+ }
}
}
return;