From d4ef8368aa1dfb5e1e1ebe155c0fce1070046f83 Mon Sep 17 00:00:00 2001 From: Marco Balboni Date: Mon, 2 Mar 2015 04:00:48 -0500 Subject: mem: Downstream components consumes new crossbar delays This patch makes the caches and memory controllers consume the delay that is annotated to a packet by the crossbar. Previously many components simply threw these delays away. Note that the devices still do not pay for these delays. --- src/mem/dramsim2.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mem/dramsim2.cc') diff --git a/src/mem/dramsim2.cc b/src/mem/dramsim2.cc index 7346a4515..be244bd4a 100644 --- a/src/mem/dramsim2.cc +++ b/src/mem/dramsim2.cc @@ -268,8 +268,10 @@ DRAMSim2::accessAndRespond(PacketPtr pkt) if (needsResponse) { // access already turned the packet into a response assert(pkt->isResponse()); - - // @todo someone should pay for this + // Here we pay for xbar additional delay and to process the payload + // of the packet. + Tick time = curTick() + pkt->headerDelay + pkt->payloadDelay; + // Reset the timings of the packet pkt->headerDelay = pkt->payloadDelay = 0; DPRINTF(DRAMSim2, "Queuing response for address %lld\n", @@ -281,7 +283,7 @@ DRAMSim2::accessAndRespond(PacketPtr pkt) // if we are not already waiting for a retry, or are scheduled // to send a response, schedule an event if (!retryResp && !sendResponseEvent.scheduled()) - schedule(sendResponseEvent, curTick()); + schedule(sendResponseEvent, time); } else { // @todo the packet is going to be deleted, and the DRAMPacket // is still having a pointer to it -- cgit v1.2.3