summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2016-11-07 15:51:45 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-03-06 14:09:05 +0000
commit17d7f736ace967a38b5b611c40776a0bbc9197da (patch)
treea031b595d2ee8e6e132d251ed3849cc5e3d84221
parenta66fe6a8c36c9ab49cb3a35065bfc645d51036c8 (diff)
downloadgem5-17d7f736ace967a38b5b611c40776a0bbc9197da.tar.xz
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 <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8285 Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
-rw-r--r--src/mem/cache/cache.cc3
1 files changed, 3 insertions, 0 deletions
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<uint8_t>(), 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) {