summaryrefslogtreecommitdiff
path: root/src/mem/cache/cache.hh
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2018-05-02 11:51:06 +0100
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-05-31 13:39:51 +0000
commit18312bc263d7b3568044d0b361ce376077f432c9 (patch)
tree6ca489b542e0a4a1cf12326167600af4a9e22901 /src/mem/cache/cache.hh
parent8ba77ae8fc98a355082da2bd9fdc6ecf4928f725 (diff)
downloadgem5-18312bc263d7b3568044d0b361ce376077f432c9.tar.xz
mem-cache: Refactor the cache recvTimingReq function
The recvTimingReq function in the cache handles timing requests. Over time, recvTimingReq has grown in complexity and code size. This change factors out some of its functionality in two separate functions. The new functions handle timing requests that hit and timing requests that miss separately. Change-Id: I09902d648d7272f0f9ec2851fa6376f7305ba418 Reviewed-on: https://gem5-review.googlesource.com/10424 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/cache.hh')
-rw-r--r--src/mem/cache/cache.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mem/cache/cache.hh b/src/mem/cache/cache.hh
index 3076a56cf..0b04aadea 100644
--- a/src/mem/cache/cache.hh
+++ b/src/mem/cache/cache.hh
@@ -347,6 +347,26 @@ class Cache : public BaseCache
cmd.isLLSC();
}
+ /*
+ * Handle a timing request that hit in the cache
+ *
+ * @param ptk The request packet
+ * @param blk The referenced block
+ * @param request_time The tick at which the block lookup is compete
+ */
+ void handleTimingReqHit(PacketPtr pkt, CacheBlk *blk, Tick request_time);
+
+ /*
+ * Handle a timing request that missed in the cache
+ *
+ * @param ptk The request packet
+ * @param blk The referenced block
+ * @param forward_time The tick at which we can process dependent requests
+ * @param request_time The tick at which the block lookup is compete
+ */
+ void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time,
+ Tick request_time);
+
/**
* Performs the access specified by the request.
* @param pkt The request to perform.