From: Nikos Nikoleris Date: Mon, 7 Nov 2016 15:51:45 +0000 (+0000) Subject: mem-cache: Populate whenReady for blocks filled from writebacks X-Git-Tag: v19.0.0.0~2263 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=17d7f736ace967a38b5b611c40776a0bbc9197da;p=gem5.git mem-cache: Populate whenReady for blocks filled from writebacks Writebacks write data to either an existing block or a newly allocated block. In either case we need to populate the whenReady field of the block which will determine when the new value can be used. Change-Id: I5788fad0b8086a1be96714639bf6a9470b334926 Reviewed-by: Andreas Sandberg Reviewed-by: Curtis Dunham Reviewed-on: https://gem5-review.googlesource.com/8285 Maintainer: Nikos Nikoleris --- diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc index 64438c1c8..7bf073419 100644 --- a/src/mem/cache/cache.cc +++ b/src/mem/cache/cache.cc @@ -419,6 +419,9 @@ Cache::access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat, std::memcpy(blk->data, pkt->getConstPtr(), blkSize); DPRINTF(Cache, "%s new state is %s\n", __func__, blk->print()); incHitCount(pkt); + // populate the time when the block will be ready to access. + blk->whenReady = clockEdge(fillLatency) + pkt->headerDelay + + pkt->payloadDelay; return true; } else if (pkt->cmd == MemCmd::CleanEvict) { if (blk != nullptr) {