return !(s1 > e2 || e1 < s2);
}
-bool
-fixDelayedResponsePacket(PacketPtr func, PacketPtr timing)
-{
- bool result;
-
- if (timing->isRead() || timing->isWrite()) {
- // Ugly hack to deal with the fact that we queue the requests
- // and don't convert them to responses until we issue them on
- // the bus. I tried to avoid this by converting packets to
- // responses right away, but this breaks during snoops where a
- // responder may do the conversion before other caches have
- // done the snoop. Would work if we copied the packet instead
- // of just hanging on to a pointer.
- MemCmd oldCmd = timing->cmd;
- timing->cmd = timing->cmd.responseCommand();
- result = fixPacket(func, timing);
- timing->cmd = oldCmd;
- }
- else {
- //Don't toggle if it isn't a read/write response
- result = fixPacket(func, timing);
- }
-
- return result;
-}
bool
Packet::checkFunctional(Addr addr, int size, uint8_t *data)
}
};
-
-
-/** Temporary for backwards compatibility.
- */
-inline
-bool fixPacket(PacketPtr func, PacketPtr timing) {
- return !func->checkFunctional(timing);
-}
-
-/** This function is a wrapper for the fixPacket field that toggles
- * the hasData bit it is used when a response is waiting in the
- * caches, but hasn't been marked as a response yet (so the fixPacket
- * needs to get the correct value for the hasData)
- */
-bool fixDelayedResponsePacket(PacketPtr func, PacketPtr timing);
-
std::ostream & operator<<(std::ostream &o, const Packet &p);
#endif //__MEM_PACKET_HH
PacketPtr target = i->pkt;
// If the target contains data, and it overlaps the
// probed request, need to update data
- if (target->intersect(pkt)) {
- if (!fixPacket(pkt, target)) {
- // fixPacket returns true for continue, false for done
- return;
- }
+ if (pkt->checkFunctional(target)) {
+ return;
}
}
}