diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2016-08-12 14:11:45 +0100 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2016-08-12 14:11:45 +0100 |
commit | 25095534039245002b7e529eaa9ddef01a84d059 (patch) | |
tree | 2cb83b69ff13946906f4e7122064c72b8eaed9fc /src/mem/packet.hh | |
parent | da07c5c26aff7f453df478d8335d50b53ed777ae (diff) | |
download | gem5-25095534039245002b7e529eaa9ddef01a84d059.tar.xz |
mem: Add a FromCache packet attribute
This patch adds a FromCache attribute to the packet, and updates a
number of the existing request commands to reflect that the request
originates from a cache. The attribute simplifies checking if a
requests came from a cache or not, and this is used by both the cache
and snoop filter in follow-on patches.
Change-Id: Ib0a7a080bbe4d6036ddd84b46fd45bc7eb41cd8f
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Steve Reinhardt <stever@gmail.com>
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r-- | src/mem/packet.hh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 19c7e6397..b6a0e7c7d 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 ARM Limited + * Copyright (c) 2012-2016 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -151,6 +151,7 @@ class MemCmd IsError, //!< Error response IsPrint, //!< Print state matching address (for debugging) IsFlush, //!< Flush the address from caches + FromCache, //!< Request originated from a caching agent NUM_COMMAND_ATTRIBUTES }; @@ -193,6 +194,7 @@ class MemCmd bool needsResponse() const { return testCmdAttrib(NeedsResponse); } bool isInvalidate() const { return testCmdAttrib(IsInvalidate); } bool isEviction() const { return testCmdAttrib(IsEviction); } + bool fromCache() const { return testCmdAttrib(FromCache); } /** * A writeback is an eviction that carries data. @@ -514,6 +516,7 @@ class Packet : public Printable bool needsResponse() const { return cmd.needsResponse(); } bool isInvalidate() const { return cmd.isInvalidate(); } bool isEviction() const { return cmd.isEviction(); } + bool fromCache() const { return cmd.fromCache(); } bool isWriteback() const { return cmd.isWriteback(); } bool hasData() const { return cmd.hasData(); } bool hasRespData() const |