dev: Add response sanity checks in PioPort

Add an assert in the PioPort that checks if a response packet from a
device has the right flags set before passing it to them rest of the
memory system.
This commit is contained in:
Andreas Sandberg 2014-12-08 04:49:52 -05:00
parent 1ccc4e0e21
commit 6a9fbd295d

View file

@ -57,7 +57,9 @@ PioPort::recvAtomic(PacketPtr pkt)
// @todo: We need to pay for this and not just zero it out
pkt->firstWordDelay = pkt->lastWordDelay = 0;
return pkt->isRead() ? device->read(pkt) : device->write(pkt);
const Tick delay(pkt->isRead() ? device->read(pkt) : device->write(pkt));
assert(pkt->isResponse() || pkt->isError());
return delay;
}
AddrRangeList