summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-06-08 19:43:50 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-06-08 19:43:50 -0400
commit6875e8d8391035edf8fc4a8fdb29f614a527b0bc (patch)
tree3b534726b982b2055d0fb53ca2958ffbc080b98d /src/mem
parent8ee856f1d53f9b181a06183c8c86855898b82ba7 (diff)
downloadgem5-6875e8d8391035edf8fc4a8fdb29f614a527b0bc.tar.xz
add nacked result and a function to swizzle nacked packet into something that can be sent out again
implement ability for i/o devices to handle src/dev/io_device.cc: src/dev/io_device.hh: implement ability for i/o devices to handle src/mem/packet.hh: add nacked result and a function to swizzle nacked packet into something that can be sent out again --HG-- extra : convert_revision : fa42b01f4ab21562d37bd6bf6f4d7f69a94f0e86
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/packet.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index d5a10d29a..403039d96 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -179,6 +179,7 @@ class Packet
{
Success,
BadAddress,
+ Nacked,
Unknown
};
@@ -249,6 +250,16 @@ class Packet
srcValid = false;
}
+ /** Take a request packet that has been returned as NACKED and modify it so
+ * that it can be sent out again. Only packets that need a response can be
+ * NACKED, so verify that that is true. */
+ void reinitNacked() {
+ assert(needsResponse() && result == Nacked);
+ dest = Broadcast;
+ result = Unknown;
+ }
+
+
/** Set the data pointer to the following value that should not be freed. */
template <typename T>
void dataStatic(T *p);