summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 13:55:58 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 13:55:58 -0800
commit6e1dc2546cfe0c6da08b57cd8478c28820277890 (patch)
tree3c6663b1c5174004a52c3101f0bea144229a671d /src/mem/packet.hh
parent90d6e2652fc8590116d436a1143700e11893cfa4 (diff)
downloadgem5-6e1dc2546cfe0c6da08b57cd8478c28820277890.tar.xz
m5: Added isValidSrc and isValidDest calls to packet.hh
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r--src/mem/packet.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 07c086cd5..c58862270 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -437,6 +437,7 @@ class Packet : public FastAlloc, public Printable
bool hadBadAddress() const { return cmd == MemCmd::BadAddressError; }
void copyError(Packet *pkt) { assert(pkt->isError()); cmd = pkt->cmd; }
+ bool isSrcValid() { return flags.isSet(VALID_SRC); }
/// Accessor function to get the source index of the packet.
NodeID getSrc() const { assert(flags.isSet(VALID_SRC)); return src; }
/// Accessor function to set the source index of the packet.
@@ -444,6 +445,7 @@ class Packet : public FastAlloc, public Printable
/// Reset source field, e.g. to retransmit packet on different bus.
void clearSrc() { flags.clear(VALID_SRC); }
+ bool isDestValid() { return flags.isSet(VALID_DST); }
/// Accessor function for the destination index of the packet.
NodeID getDest() const { assert(flags.isSet(VALID_DST)); return dest; }
/// Accessor function to set the destination index of the packet.