- } else if (pkt->needsResponse()) {
- if (respQueueFull()) {
- DPRINTF(Bridge, "Response queue full\n");
- retryReq = true;
- } else {
- DPRINTF(Bridge, "Reserving space for response\n");
- assert(outstandingResponses != respQueueLimit);
- ++outstandingResponses;
- retryReq = false;
- masterPort.schedTimingReq(pkt, bridge.clockEdge(delay));
+ } else {
+ // look at the response queue if we expect to see a response
+ bool expects_response = pkt->needsResponse();
+ if (expects_response) {
+ if (respQueueFull()) {
+ DPRINTF(Bridge, "Response queue full\n");
+ retryReq = true;
+ } else {
+ // ok to send the request with space for the response
+ DPRINTF(Bridge, "Reserving space for response\n");
+ assert(outstandingResponses != respQueueLimit);
+ ++outstandingResponses;
+
+ // no need to set retryReq to false as this is already the
+ // case
+ }
+ }
+
+ if (!retryReq) {
+ // technically the packet only reaches us after the header
+ // delay, and typically we also need to deserialise any
+ // payload (unless the two sides of the bridge are
+ // synchronous)
+ Tick receive_delay = pkt->headerDelay + pkt->payloadDelay;
+ pkt->headerDelay = pkt->payloadDelay = 0;
+
+ masterPort.schedTimingReq(pkt, bridge.clockEdge(delay) +
+ receive_delay);