summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr_queue.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-03-27 04:55:55 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2015-03-27 04:55:55 -0400
commit7bae98459cc442f0c22d4eeac5901b61ea39c801 (patch)
tree112d5d799c511fa5b4306d08d73ad7012d0aef9b /src/mem/cache/mshr_queue.hh
parent15f0d9ff1441886eb6431544d9d3571f56a14840 (diff)
downloadgem5-7bae98459cc442f0c22d4eeac5901b61ea39c801.tar.xz
mem: Align all MSHR entries to block boundaries
This patch aligns all MSHR queue entries to block boundaries to simplify checks for matches. Previously there were corner cases that could lead to existing entries not being identified as matches. There are, rather alarmingly, a few regressions that change with this patch.
Diffstat (limited to 'src/mem/cache/mshr_queue.hh')
-rw-r--r--src/mem/cache/mshr_queue.hh34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/mem/cache/mshr_queue.hh b/src/mem/cache/mshr_queue.hh
index 1e1218782..4043bc565 100644
--- a/src/mem/cache/mshr_queue.hh
+++ b/src/mem/cache/mshr_queue.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 ARM Limited
+ * Copyright (c) 2012-2013, 2015 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -45,8 +45,8 @@
* Declaration of a structure to manage MSHRs.
*/
-#ifndef __MEM__CACHE__MISS__MSHR_QUEUE_HH__
-#define __MEM__CACHE__MISS__MSHR_QUEUE_HH__
+#ifndef __MEM_CACHE_MSHR_QUEUE_HH__
+#define __MEM_CACHE_MSHR_QUEUE_HH__
#include <vector>
@@ -120,44 +120,48 @@ class MSHRQueue : public Drainable
/**
* Find the first MSHR that matches the provided address.
- * @param addr The address to find.
+ * @param blk_addr The block address to find.
* @param is_secure True if the target memory space is secure.
* @return Pointer to the matching MSHR, null if not found.
*/
- MSHR *findMatch(Addr addr, bool is_secure) const;
+ MSHR *findMatch(Addr blk_addr, bool is_secure) const;
/**
* Find and return all the matching entries in the provided vector.
- * @param addr The address to find.
+ * @param blk_addr The block address to find.
* @param is_secure True if the target memory space is secure.
* @param matches The vector to return pointers to the matching entries.
* @return True if any matches are found, false otherwise.
- * @todo Typedef the vector??
*/
- bool findMatches(Addr addr, bool is_secure,
+ bool findMatches(Addr blk_addr, bool is_secure,
std::vector<MSHR*>& matches) const;
/**
* Find any pending requests that overlap the given request.
- * @param pkt The request to find.
+ * @param blk_addr Block address.
* @param is_secure True if the target memory space is secure.
* @return A pointer to the earliest matching MSHR.
*/
- MSHR *findPending(Addr addr, int size, bool is_secure) const;
+ MSHR *findPending(Addr blk_addr, bool is_secure) const;
bool checkFunctional(PacketPtr pkt, Addr blk_addr);
/**
* Allocates a new MSHR for the request and size. This places the request
* as the first target in the MSHR.
- * @param pkt The request to handle.
- * @param size The number in bytes to fetch from memory.
+ *
+ * @param blk_addr The address of the block.
+ * @param blk_size The number of bytes to request.
+ * @param pkt The original miss.
+ * @param when_ready When should the MSHR be ready to act upon.
+ * @param order The logical order of this MSHR
+ *
* @return The a pointer to the MSHR allocated.
*
* @pre There are free entries.
*/
- MSHR *allocate(Addr addr, int size, PacketPtr &pkt,
- Tick when, Counter order);
+ MSHR *allocate(Addr blk_addr, unsigned blk_size, PacketPtr pkt,
+ Tick when_ready, Counter order);
/**
* Removes the given MSHR from the queue. This places the MSHR on the
@@ -257,4 +261,4 @@ class MSHRQueue : public Drainable
unsigned int drain(DrainManager *dm);
};
-#endif //__MEM__CACHE__MISS__MSHR_QUEUE_HH__
+#endif //__MEM_CACHE_MSHR_QUEUE_HH__