diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2018-05-02 14:41:22 +0100 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2018-05-30 13:08:55 +0000 |
commit | 8100fb5f19b09a93c1f3e3e8533322e1fa73e6d3 (patch) | |
tree | 5d0450c632ea767afc5939b0382fe479e2bf86a7 /src/mem/cache/mshr.hh | |
parent | f94f70237dfaac86c83dfbb7cb24e6a821b867eb (diff) | |
download | gem5-8100fb5f19b09a93c1f3e3e8533322e1fa73e6d3.tar.xz |
mem-cache: Determine if an MSHR has requests from another cache
To decide whether we allocate upon receiving a response we need to
determine if any of the currently serviced requests (non-deferred
targets) is comming from another cache. This change adds support for
tracking this information in the MSHR.
Change-Id: If1db93c12b6af5813b91b9d6b6e5e196d327f038
Reviewed-on: https://gem5-review.googlesource.com/10422
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/mshr.hh')
-rw-r--r-- | src/mem/cache/mshr.hh | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh index 5fe0fb92d..b4bf33a4f 100644 --- a/src/mem/cache/mshr.hh +++ b/src/mem/cache/mshr.hh @@ -162,6 +162,11 @@ class MSHR : public QueueEntry, public Printable bool hasUpgrade; /** Set when the response should allocate on fill */ bool allocOnFill; + /** + * Determine whether there was at least one non-snooping + * target coming from another cache. + */ + bool hasFromCache; TargetList(); @@ -176,7 +181,12 @@ class MSHR : public QueueEntry, public Printable void updateFlags(PacketPtr pkt, Target::Source source, bool alloc_on_fill); - void resetFlags() { needsWritable = hasUpgrade = allocOnFill = false; } + void resetFlags() { + needsWritable = false; + hasUpgrade = false; + allocOnFill = false; + hasFromCache = false; + } /** * Goes through the list of targets and uses them to populate @@ -191,7 +201,8 @@ class MSHR : public QueueEntry, public Printable * values. */ bool isReset() const { - return !needsWritable && !hasUpgrade && !allocOnFill; + return !needsWritable && !hasUpgrade && !allocOnFill && + !hasFromCache; } /** @@ -257,6 +268,16 @@ class MSHR : public QueueEntry, public Printable bool allocOnFill() const { return targets.allocOnFill; } + + /** + * Determine if there are non-deferred requests from other caches + * + * @return true if any of the targets is from another cache + */ + bool hasFromCache() const { + return targets.hasFromCache; + } + private: /** |