Fix CSHR retrys
--HG-- extra : convert_revision : caa7664f6c945396fa38ce62fbda018ebed4eaa6
This commit is contained in:
parent
4a96779350
commit
eddbb6801f
1 changed files with 20 additions and 12 deletions
32
src/mem/cache/base_cache.cc
vendored
32
src/mem/cache/base_cache.cc
vendored
|
@ -189,7 +189,6 @@ BaseCache::CachePort::recvRetry()
|
||||||
{
|
{
|
||||||
DPRINTF(CachePort, "%s has more requests\n", name());
|
DPRINTF(CachePort, "%s has more requests\n", name());
|
||||||
//Still more to issue, rerequest in 1 cycle
|
//Still more to issue, rerequest in 1 cycle
|
||||||
pkt = NULL;
|
|
||||||
BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(this);
|
BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(this);
|
||||||
reqCpu->schedule(curTick + 1);
|
reqCpu->schedule(curTick + 1);
|
||||||
}
|
}
|
||||||
|
@ -202,12 +201,13 @@ BaseCache::CachePort::recvRetry()
|
||||||
pkt = cshrRetry;
|
pkt = cshrRetry;
|
||||||
bool success = sendTiming(pkt);
|
bool success = sendTiming(pkt);
|
||||||
waitingOnRetry = !success;
|
waitingOnRetry = !success;
|
||||||
if (success && cache->doSlaveRequest())
|
if (success)
|
||||||
{
|
{
|
||||||
//Still more to issue, rerequest in 1 cycle
|
if (cache->doSlaveRequest()) {
|
||||||
pkt = NULL;
|
//Still more to issue, rerequest in 1 cycle
|
||||||
BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(this);
|
BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(this);
|
||||||
reqCpu->schedule(curTick + 1);
|
reqCpu->schedule(curTick + 1);
|
||||||
|
}
|
||||||
cshrRetry = NULL;
|
cshrRetry = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,20 +305,28 @@ BaseCache::CacheEvent::process()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(cachePort->cache->doSlaveRequest());
|
|
||||||
//CSHR
|
//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);
|
bool success = cachePort->sendTiming(pkt);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
//Need to send on a retry
|
//Need to send on a retry
|
||||||
cachePort->cshrRetry = pkt;
|
cachePort->cshrRetry = pkt;
|
||||||
cachePort->waitingOnRetry = true;
|
cachePort->waitingOnRetry = true;
|
||||||
}
|
}
|
||||||
else if (cachePort->cache->doSlaveRequest())
|
else
|
||||||
{
|
{
|
||||||
//Still more to issue, rerequest in 1 cycle
|
cachePort->cshrRetry = NULL;
|
||||||
pkt = NULL;
|
if (cachePort->cache->doSlaveRequest()) {
|
||||||
this->schedule(curTick+1);
|
//Still more to issue, rerequest in 1 cycle
|
||||||
|
pkt = NULL;
|
||||||
|
this->schedule(curTick+1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue