summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
authorDerek Hower <drh5@cs.wisc.edu>2010-01-19 15:48:12 -0600
committerDerek Hower <drh5@cs.wisc.edu>2010-01-19 15:48:12 -0600
commit279f179babc9e5663156777c533c06edc91bce9a (patch)
treee6718ee514cc81678491b50562ce8c463c0b20fd /src/mem/packet.hh
parent5aa104e072eb20f6aca49b169521b0c2da33c844 (diff)
parent295516a590b6e47c9a881f193027447e500c749c (diff)
downloadgem5-279f179babc9e5663156777c533c06edc91bce9a.tar.xz
merge
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.