summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr.hh
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2016-12-05 16:48:17 -0500
committerNikos Nikoleris <nikos.nikoleris@arm.com>2016-12-05 16:48:17 -0500
commitf7a5de3becd60b93d89684f8e387046c497c183a (patch)
tree6f0d30bcff179db5654dba49af6ef4726571155e /src/mem/cache/mshr.hh
parent3d0a537862dc66f7bd1ffb0965651a14297f2e80 (diff)
downloadgem5-f7a5de3becd60b93d89684f8e387046c497c183a.tar.xz
mem: Add support for repopulating the flags of an MSHR TargetList
This patch adds support for repopulating the flags of an MSHR TargetList. The added functionality makes it possible to remove targets from a TargetList without leaving it in an inconsistent state. Change-Id: I3f7a8e97bfd3e2e49bebad056d11bbfb087aad91 Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Diffstat (limited to 'src/mem/cache/mshr.hh')
-rw-r--r--src/mem/cache/mshr.hh19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh
index 146e5e47a..253f5f388 100644
--- a/src/mem/cache/mshr.hh
+++ b/src/mem/cache/mshr.hh
@@ -143,7 +143,26 @@ class MSHR : public QueueEntry, public Printable
bool hasUpgrade;
TargetList();
+
+ /**
+ * Use the provided packet and the source to update the
+ * flags of this TargetList.
+ *
+ * @param pkt Packet considered for the flag update
+ * @param source Indicates the source of the packet
+ */
+ void updateFlags(PacketPtr pkt, Target::Source source);
+
void resetFlags() { needsWritable = hasUpgrade = false; }
+
+ /**
+ * Goes through the list of targets and uses them to populate
+ * the flags of this TargetList. When the function returns the
+ * flags are consistent with the properties of packets in the
+ * list.
+ */
+ void populateFlags();
+
bool isReset() const { return !needsWritable && !hasUpgrade; }
void add(PacketPtr pkt, Tick readyTime, Counter order,
Target::Source source, bool markPending);