summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
authorBrad Beckmann ext:(%2C%20Nilay%20Vaish%20%3Cnilay%40cs.wisc.edu%3E) <Brad.Beckmann@amd.com>2011-06-30 19:49:26 -0500
committerBrad Beckmann ext:(%2C%20Nilay%20Vaish%20%3Cnilay%40cs.wisc.edu%3E) <Brad.Beckmann@amd.com>2011-06-30 19:49:26 -0500
commitc86f849d5a1da1fc77f2fca43b82cb6760f68bc9 (patch)
treef192cbc73d86ee4e15e752f6ed174e4ce3425c9e /src/mem/packet.hh
parentf4cfd65d2982f0f97304ef05083b40f3346a496f (diff)
downloadgem5-c86f849d5a1da1fc77f2fca43b82cb6760f68bc9.tar.xz
Ruby: Add support for functional accesses
This patch rpovides functional access support in Ruby. Currently only the M5Port of RubyPort supports functional accesses. The support for functional through the PioPort will be added as a separate patch.
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r--src/mem/packet.hh19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 5fcd9286e..be0c20d42 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -103,6 +103,8 @@ class MemCmd
NetworkNackError, // nacked at network layer (not by protocol)
InvalidDestError, // packet dest field invalid
BadAddressError, // memory address invalid
+ FunctionalReadError, // unable to fulfill functional read
+ FunctionalWriteError, // unable to fulfill functional write
// Fake simulator-only commands
PrintReq, // Print state matching address
FlushReq, //request for a cache flush
@@ -240,6 +242,9 @@ class Packet : public FastAlloc, public Printable
/// the data pointer points to an array (thus delete []) needs to
/// be called on it rather than simply delete.
static const FlagsType ARRAY_DATA = 0x00004000;
+ /// suppress the error if this packet encounters a functional
+ /// access failure.
+ static const FlagsType SUPPRESS_FUNC_ERROR = 0x00008000;
Flags flags;
@@ -428,6 +433,8 @@ class Packet : public FastAlloc, public Printable
void setSupplyExclusive() { flags.set(SUPPLY_EXCLUSIVE); }
void clearSupplyExclusive() { flags.clear(SUPPLY_EXCLUSIVE); }
bool isSupplyExclusive() { return flags.isSet(SUPPLY_EXCLUSIVE); }
+ void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); }
+ bool suppressFuncError() { return flags.isSet(SUPPRESS_FUNC_ERROR); }
// Network error conditions... encapsulate them as methods since
// their encoding keeps changing (from result field to command
@@ -617,6 +624,18 @@ class Packet : public FastAlloc, public Printable
makeResponse();
}
+ void
+ setFunctionalResponseStatus(bool success)
+ {
+ if (!success) {
+ if (isWrite()) {
+ cmd = MemCmd::FunctionalWriteError;
+ } else {
+ cmd = MemCmd::FunctionalReadError;
+ }
+ }
+ }
+
/**
* Take a request packet that has been returned as NACKED and
* modify it so that it can be sent out again. Only packets that