summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-10-08 14:04:49 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-10-08 14:04:49 -0400
commit34b697cd04e7d645f8bf95d5c1a2dfeb623181f1 (patch)
treef631fdfebfe27a1f7aad467af88a3914c6f6d898
parent862825f9978408bdb97935691f13d6e08d595cf3 (diff)
downloadgem5-34b697cd04e7d645f8bf95d5c1a2dfeb623181f1.tar.xz
Add in HasData, and move the define of NUM_MEM_CMDS to a more visible location.
--HG-- extra : convert_revision : 4379efe892ca0a39363ee04009e1bbb8c8f77afa
-rw-r--r--src/mem/packet.hh26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index b14343b47..e7047b0cd 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -58,10 +58,6 @@ typedef std::list<PacketPtr> PacketList;
#define NO_ALLOCATE 1 << 5
#define SNOOP_COMMIT 1 << 6
-//For statistics we need max number of commands, hard code it at
-//20 for now. @todo fix later
-#define NUM_MEM_CMDS 1 << 9
-
/**
* A Packet is used to encapsulate a transfer between two objects in
* the memory system (e.g., the L1 and L2 cache). (In contrast, a
@@ -164,6 +160,8 @@ class Packet
private:
/** List of command attributes. */
+ // If you add a new CommandAttribute, make sure to increase NUM_MEM_CMDS
+ // as well.
enum CommandAttribute
{
IsRead = 1 << 0,
@@ -178,30 +176,34 @@ class Packet
HasData = 1 << 9
};
+//For statistics we need max number of commands, hard code it at
+//20 for now. @todo fix later
+#define NUM_MEM_CMDS 1 << 10
+
public:
/** List of all commands associated with a packet. */
enum Command
{
InvalidCmd = 0,
ReadReq = IsRead | IsRequest | NeedsResponse,
- WriteReq = IsWrite | IsRequest | NeedsResponse,// | HasData,
- WriteReqNoAck = IsWrite | IsRequest,// | HasData,
- ReadResp = IsRead | IsResponse | NeedsResponse,// | HasData,
+ WriteReq = IsWrite | IsRequest | NeedsResponse | HasData,
+ WriteReqNoAck = IsWrite | IsRequest | HasData,
+ ReadResp = IsRead | IsResponse | NeedsResponse | HasData,
WriteResp = IsWrite | IsResponse | NeedsResponse,
- Writeback = IsWrite | IsRequest,// | HasData,
+ Writeback = IsWrite | IsRequest | HasData,
SoftPFReq = IsRead | IsRequest | IsSWPrefetch | NeedsResponse,
HardPFReq = IsRead | IsRequest | IsHWPrefetch | NeedsResponse,
SoftPFResp = IsRead | IsResponse | IsSWPrefetch
- | NeedsResponse,// | HasData,
+ | NeedsResponse | HasData,
HardPFResp = IsRead | IsResponse | IsHWPrefetch
- | NeedsResponse,// | HasData,
+ | NeedsResponse | HasData,
InvalidateReq = IsInvalidate | IsRequest,
- WriteInvalidateReq = IsWrite | IsInvalidate | IsRequest,// | HasData,
+ WriteInvalidateReq = IsWrite | IsInvalidate | IsRequest | HasData,
UpgradeReq = IsInvalidate | IsRequest | NeedsResponse,
UpgradeResp = IsInvalidate | IsResponse | NeedsResponse,
ReadExReq = IsRead | IsInvalidate | IsRequest | NeedsResponse,
ReadExResp = IsRead | IsInvalidate | IsResponse
- | NeedsResponse,// | HasData
+ | NeedsResponse | HasData
};
/** Return the string name of the cmd field (for debugging and