From bf305c14c47c4bd228c0910ea3bb30ab4bc935e1 Mon Sep 17 00:00:00 2001 From: Nikos Nikoleris Date: Mon, 10 Oct 2016 13:48:08 +0100 Subject: mem: Delay servicing an MSHR after its allocation An MSHR is allocated and the computed latency determines when the MSHR will be ready and can be serviced by the cache. This patch adds a function that allows changing the time that an MSHR is ready and adjusts the queue such that other MSHRs can be serviced first if they are ready. Change-Id: Ie908191fcb3c2d84d4c6f855c8b1e41ca5881bff Reviewed-on: https://gem5-review.googlesource.com/c/12906 Reviewed-by: Daniel Carvalho Maintainer: Nikos Nikoleris --- src/mem/cache/mshr.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mem/cache/mshr.hh') diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh index 56b81b6b2..b94dfb9c5 100644 --- a/src/mem/cache/mshr.hh +++ b/src/mem/cache/mshr.hh @@ -513,6 +513,16 @@ class MSHR : public QueueEntry, public Printable bool trySatisfyFunctional(PacketPtr pkt); + /** + * Adds a delay relative to the current tick to the current MSHR + * @param delay_ticks the desired delay in ticks + */ + void delay(Tick delay_ticks) + { + assert(readyTime <= curTick()); + readyTime = curTick() + delay_ticks; + } + /** * Prints the contents of this MSHR for debugging. */ -- cgit v1.2.3