mem-cache: Remove old todo about latency in hit function
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Tue, 4 Dec 2018 12:28:04 +0000 (13:28 +0100)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Thu, 7 Mar 2019 11:13:37 +0000 (11:13 +0000)
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 <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/14875
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

src/mem/cache/base.cc

index 5b4307b764da716c38a01382d2762ef62ff07650..0949e498ced05f42304fcab32c5318c3b8e327f9 100644 (file)
@@ -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