From: Daniel R. Carvalho Date: Wed, 5 Dec 2018 14:29:58 +0000 (+0100) Subject: mem-cache: Add header delay to handleFill whenReady X-Git-Tag: v19.0.0.0~1069 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a4686352714aa0d91b2d98b25a6f45b84262f97d;p=gem5.git mem-cache: Add header delay to handleFill whenReady A prefetch response will have a header delay, which was not being taken into account. Change-Id: I66a071bc81ef41b8c0de37aa2df75171d1979a6f Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/14895 Reviewed-by: Nikos Nikoleris Maintainer: Nikos Nikoleris --- diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc index 2f734ea16..a42f2ebda 100644 --- a/src/mem/cache/base.cc +++ b/src/mem/cache/base.cc @@ -1289,8 +1289,9 @@ BaseCache::handleFill(PacketPtr pkt, CacheBlk *blk, PacketList &writebacks, pkt->writeDataToBlock(blk->data, blkSize); } - // We pay for fillLatency here. - blk->setWhenReady(clockEdge(fillLatency) + pkt->payloadDelay); + // The block will be ready when the payload arrives and the fill is done + blk->setWhenReady(clockEdge(fillLatency) + pkt->headerDelay + + pkt->payloadDelay); return blk; }