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>
This commit is contained in:
3
src/mem/cache/cache.cc
vendored
3
src/mem/cache/cache.cc
vendored
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user