diff options
Diffstat (limited to 'src/mem/cache')
-rw-r--r-- | src/mem/cache/base.cc | 2 | ||||
-rw-r--r-- | src/mem/cache/base.hh | 6 | ||||
-rw-r--r-- | src/mem/cache/cache.cc | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc index f43c2ecf3..ddcfd80a7 100644 --- a/src/mem/cache/base.cc +++ b/src/mem/cache/base.cc @@ -2451,7 +2451,7 @@ BaseCache::CacheReqPacketQueue::sendDeferredPacket() } else { // let our snoop responses go first if there are responses to // the same addresses - if (checkConflictingSnoop(entry->blkAddr)) { + if (checkConflictingSnoop(entry->getTarget()->pkt)) { return; } waitingOnRetry = entry->sendPacket(cache); diff --git a/src/mem/cache/base.hh b/src/mem/cache/base.hh index a45dcba6f..8d5ed11d0 100644 --- a/src/mem/cache/base.hh +++ b/src/mem/cache/base.hh @@ -189,10 +189,12 @@ class BaseCache : public MemObject * send out, and if so simply stall any requests, and schedule * a send event at the same time as the next snoop response is * being sent out. + * + * @param pkt The packet to check for conflicts against. */ - bool checkConflictingSnoop(Addr addr) + bool checkConflictingSnoop(const PacketPtr pkt) { - if (snoopRespQueue.hasAddr(addr)) { + if (snoopRespQueue.checkConflict(pkt, cache.blkSize)) { DPRINTF(CachePort, "Waiting for snoop response to be " "sent\n"); Tick when = snoopRespQueue.deferredPacketReadyTime(); diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc index eac278a3b..4643e1d35 100644 --- a/src/mem/cache/cache.cc +++ b/src/mem/cache/cache.cc @@ -383,7 +383,7 @@ Cache::handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, pkt->req->masterId()); pf = new Packet(req, pkt->cmd); pf->allocate(); - assert(pf->getAddr() == pkt->getAddr()); + assert(pf->matchAddr(pkt)); assert(pf->getSize() == pkt->getSize()); } @@ -781,7 +781,7 @@ Cache::serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk) pkt->payloadDelay; if (pkt->isRead() && !is_error) { // sanity check - assert(pkt->getAddr() == tgt_pkt->getAddr()); + assert(pkt->matchAddr(tgt_pkt)); assert(pkt->getSize() >= tgt_pkt->getSize()); tgt_pkt->setData(pkt->getConstPtr<uint8_t>()); |