X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmem%2Ftport.cc;h=9f0f08814b92ed4961985743a2d56117cbfd5d06;hb=24bfdc36f19fddbfcb33cc2f33fb216e8da0382d;hp=7a0dd7cd9dd6a1be2fa8128f64ca01a3ed62e780;hpb=e317d8b9ff611f16e116946054ac9a90cb453300;p=gem5.git diff --git a/src/mem/tport.cc b/src/mem/tport.cc index 7a0dd7cd9..9f0f08814 100644 --- a/src/mem/tport.cc +++ b/src/mem/tport.cc @@ -41,9 +41,10 @@ * Andreas Hansson */ -#include "mem/mem_object.hh" #include "mem/tport.hh" +#include "mem/mem_object.hh" + SimpleTimingPort::SimpleTimingPort(const std::string& _name, MemObject* _owner) : QueuedSlavePort(_name, _owner, queueImpl), queueImpl(*_owner, *this) @@ -53,7 +54,7 @@ SimpleTimingPort::SimpleTimingPort(const std::string& _name, void SimpleTimingPort::recvFunctional(PacketPtr pkt) { - if (!queue.checkFunctional(pkt)) { + if (!respQueue.trySatisfyFunctional(pkt)) { // do an atomic access and throw away the returned latency recvAtomic(pkt); } @@ -62,18 +63,12 @@ SimpleTimingPort::recvFunctional(PacketPtr pkt) bool SimpleTimingPort::recvTimingReq(PacketPtr pkt) { - /// @todo temporary hack to deal with memory corruption issue until - /// 4-phase transactions are complete. Remove me later - for (int x = 0; x < pendingDelete.size(); x++) - delete pendingDelete[x]; - pendingDelete.clear(); - - if (pkt->memInhibitAsserted()) { - // snooper will supply based on copy of packet - // still target's responsibility to delete packet - delete pkt; - return true; - } + // the SimpleTimingPort should not be used anywhere where there is + // a need to deal with snoop responses and their flow control + // requirements + if (pkt->cacheResponding()) + panic("SimpleTimingPort should never see packets with the " + "cacheResponding flag set\n"); bool needsResponse = pkt->needsResponse(); Tick latency = recvAtomic(pkt); @@ -84,10 +79,8 @@ SimpleTimingPort::recvTimingReq(PacketPtr pkt) assert(pkt->isResponse()); schedTimingResp(pkt, curTick() + latency); } else { - /// @todo nominally we should just delete the packet here. - /// Until 4-phase stuff we can't because the sending - /// cache is still relying on it - pendingDelete.push_back(pkt); + // queue the packet for deletion + pendingDelete.reset(pkt); } return true;