mem-cache: schedule already ready pf next cycle

Fix a bug where a ready prefetch request was not
sent directly because the schedMemSideSendEvent
was not called with the right time.
This fix mimics what is done in recvTimingResp.

Change-Id: Ib11f8003ca1b006d976c8cc8ea541434b8902beb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67473
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Nathanael Premillieu
2023-01-27 15:11:19 +01:00
parent d48e53e0a2
commit a33b4931d7

View File

@@ -464,7 +464,8 @@ BaseCache::recvTimingReq(PacketPtr pkt)
if (prefetcher) { if (prefetcher) {
// track time of availability of next prefetch, if any // track time of availability of next prefetch, if any
Tick next_pf_time = prefetcher->nextPrefetchReadyTime(); Tick next_pf_time = std::max(
prefetcher->nextPrefetchReadyTime(), clockEdge());
if (next_pf_time != MaxTick) { if (next_pf_time != MaxTick) {
schedMemSideSendEvent(next_pf_time); schedMemSideSendEvent(next_pf_time);
} }