Fix CSHR retrys

--HG--
extra : convert_revision : caa7664f6c945396fa38ce62fbda018ebed4eaa6
This commit is contained in:
Ron Dreslinski 2006-10-12 15:02:56 -04:00
parent 4a96779350
commit eddbb6801f

View file

@ -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)
{
if (cache->doSlaveRequest()) {
//Still more to issue, rerequest in 1 cycle
pkt = NULL;
BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(this);
reqCpu->schedule(curTick + 1);
}
cshrRetry = NULL;
}
}
@ -305,22 +305,30 @@ BaseCache::CacheEvent::process()
}
else
{
assert(cachePort->cache->doSlaveRequest());
//CSHR
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
{
cachePort->cshrRetry = NULL;
if (cachePort->cache->doSlaveRequest()) {
//Still more to issue, rerequest in 1 cycle
pkt = NULL;
this->schedule(curTick+1);
}
}
}
return;
}
//Response