From: Daniel R. Carvalho Date: Tue, 4 Dec 2018 12:28:04 +0000 (+0100) Subject: mem-cache: Remove old todo about latency in hit function X-Git-Tag: v19.0.0.0~1074 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c00d57cce58973094e9cacd1bf3431a3407e866;p=gem5.git mem-cache: Remove old todo about latency in hit function The header and payload delay have already been accounted and zeroed previous to calling this function. The probe is not allowed to modify the packet, therefore no extra delays are added, and it is safe to remove the todo note. Change-Id: I8ddf7e189fbe609cdec34364f3c013427930daf7 Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/14875 Reviewed-by: Nikos Nikoleris Maintainer: Nikos Nikoleris --- diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc index 5b4307b76..0949e498c 100644 --- a/src/mem/cache/base.cc +++ b/src/mem/cache/base.cc @@ -220,9 +220,11 @@ void BaseCache::handleTimingReqHit(PacketPtr pkt, CacheBlk *blk, Tick request_time) { if (pkt->needsResponse()) { + // These delays should have been consumed by now + assert(pkt->headerDelay == 0); + assert(pkt->payloadDelay == 0); + pkt->makeTimingResponse(); - // @todo: Make someone pay for this - pkt->headerDelay = pkt->payloadDelay = 0; // In this case we are considering request_time that takes // into account the delay of the xbar, if any, and just