summaryrefslogtreecommitdiff
path: root/src/mem/cache/cache.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2008-02-26 20:17:26 -0800
committerSteve Reinhardt <stever@gmail.com>2008-02-26 20:17:26 -0800
commitbdf33239151c7fcc194f6f9b8c62eb313c933755 (patch)
tree813955010ce9920d1f550133c5a19216b066a745 /src/mem/cache/cache.hh
parent8c0baf2ce478b16d351feb1f0ce147049f3a04f6 (diff)
downloadgem5-bdf33239151c7fcc194f6f9b8c62eb313c933755.tar.xz
Cache: better comments particularly regarding writeback situation.
--HG-- extra : convert_revision : 59ff9ee63ee0fec5a7dfc27b485b737455ccf362
Diffstat (limited to 'src/mem/cache/cache.hh')
-rw-r--r--src/mem/cache/cache.hh24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/mem/cache/cache.hh b/src/mem/cache/cache.hh
index 6f5428c13..f5f65d4dd 100644
--- a/src/mem/cache/cache.hh
+++ b/src/mem/cache/cache.hh
@@ -270,12 +270,32 @@ class Cache : public BaseCache
void squash(int threadNum);
/**
- * Selects a outstanding request to service.
- * @return The request to service, NULL if none found.
+ * Generate an appropriate downstream bus request packet for the
+ * given parameters.
+ * @param cpu_pkt The upstream request that needs to be satisfied.
+ * @param blk The block currently in the cache corresponding to
+ * cpu_pkt (NULL if none).
+ * @param needsExclusive Indicates that an exclusive copy is required
+ * even if the request in cpu_pkt doesn't indicate that.
+ * @return A new Packet containing the request, or NULL if the
+ * current request in cpu_pkt should just be forwarded on.
*/
PacketPtr getBusPacket(PacketPtr cpu_pkt, BlkType *blk,
bool needsExclusive);
+
+ /**
+ * Return the next MSHR to service, either a pending miss from the
+ * mshrQueue, a buffered write from the write buffer, or something
+ * from the prefetcher. This function is responsible for
+ * prioritizing among those sources on the fly.
+ */
MSHR *getNextMSHR();
+
+ /**
+ * Selects an outstanding request to service. Called when the
+ * cache gets granted the downstream bus in timing mode.
+ * @return The request to service, NULL if none found.
+ */
PacketPtr getTimingPacket();
/**