summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources/cache_unit.hh
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-02-23 16:30:45 -0500
committerKorey Sewell <ksewell@umich.edu>2011-02-23 16:30:45 -0500
commite0a021005d4765e22b8c026b6a66fda4a0b17c00 (patch)
tree018bc111bf5886ba7e4f98982541d2ea704e2d7f /src/cpu/inorder/resources/cache_unit.hh
parent73603c2b177b8e5dad264312b354b6787ae555d1 (diff)
downloadgem5-e0a021005d4765e22b8c026b6a66fda4a0b17c00.tar.xz
inorder: cache packet handling
-use a pointer to CacheReqPacket instead of PacketPtr so correct destructors get called on packet deletion - make sure to delete the packet if the cache blocks the sendTiming request or for some reason we dont use the packet - dont overwrite memory requests since in the worst case an instruction will be replaying a request so no need to keep allocating a new request - we dont use retryPkt so delete it - fetch code was split out already, so just assert that this is a memory reference inst. and that the staticInst is available
Diffstat (limited to 'src/cpu/inorder/resources/cache_unit.hh')
-rw-r--r--src/cpu/inorder/resources/cache_unit.hh12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/cpu/inorder/resources/cache_unit.hh b/src/cpu/inorder/resources/cache_unit.hh
index 097b6fa7a..1aab099e9 100644
--- a/src/cpu/inorder/resources/cache_unit.hh
+++ b/src/cpu/inorder/resources/cache_unit.hh
@@ -225,7 +225,7 @@ class CacheRequest : public ResourceRequest
public:
CacheRequest(CacheUnit *cres)
: ResourceRequest(cres), memReq(NULL), reqData(NULL),
- dataPkt(NULL), retryPkt(NULL), memAccComplete(false),
+ dataPkt(NULL), memAccComplete(false),
memAccPending(false), tlbStall(false), splitAccess(false),
splitAccessNum(-1), split2ndAccess(false),
fetchBufferFill(false)
@@ -233,9 +233,8 @@ class CacheRequest : public ResourceRequest
virtual ~CacheRequest()
{
- if (reqData && !splitAccess) {
+ if (reqData && !splitAccess)
delete [] reqData;
- }
}
void setRequest(DynInstPtr _inst, int stage_num, int res_idx, int slot_num,
@@ -249,14 +248,12 @@ class CacheRequest : public ResourceRequest
void clearRequest()
{
- if (reqData && !splitAccess) {
+ if (reqData && !splitAccess)
delete [] reqData;
- }
memReq = NULL;
reqData = NULL;
dataPkt = NULL;
- retryPkt = NULL;
memAccComplete = false;
memAccPending = false;
tlbStall = false;
@@ -292,8 +289,7 @@ class CacheRequest : public ResourceRequest
MemCmd::Command pktCmd;
RequestPtr memReq;
PacketDataPtr reqData;
- PacketPtr dataPkt;
- PacketPtr retryPkt;
+ CacheReqPacket *dataPkt;
bool memAccComplete;
bool memAccPending;