small bus updates for functional accesses

--HG--
extra : convert_revision : c7a6b199c74ed4b4ffab14bbffb51e72d75b7742
This commit is contained in:
Ali Saidi 2006-10-12 15:02:25 -04:00
parent 2c9d506f46
commit 0615d92d33

View file

@ -320,7 +320,7 @@ Bus::functionalSnoop(Packet *pkt)
{ {
std::vector<int> ports = findSnoopPorts(pkt->getAddr(), pkt->getSrc()); std::vector<int> ports = findSnoopPorts(pkt->getAddr(), pkt->getSrc());
while (!ports.empty()) while (!ports.empty() && pkt->result != Packet::Success)
{ {
interfaces[ports.back()]->sendFunctional(pkt); interfaces[ports.back()]->sendFunctional(pkt);
ports.pop_back(); ports.pop_back();
@ -367,7 +367,10 @@ Bus::recvFunctional(Packet *pkt)
pkt->getSrc(), pkt->getDest(), pkt->getAddr(), pkt->cmdString()); pkt->getSrc(), pkt->getDest(), pkt->getAddr(), pkt->cmdString());
assert(pkt->getDest() == Packet::Broadcast); assert(pkt->getDest() == Packet::Broadcast);
functionalSnoop(pkt); functionalSnoop(pkt);
findPort(pkt->getAddr(), pkt->getSrc())->sendFunctional(pkt);
// If the snooping found what we were looking for, we're done.
if (pkt->result != Packet::Success)
findPort(pkt->getAddr(), pkt->getSrc())->sendFunctional(pkt);
} }
/** Function called by the port when the bus is receiving a status change.*/ /** Function called by the port when the bus is receiving a status change.*/