summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources/fetch_unit.cc
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/fetch_unit.cc
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/fetch_unit.cc')
-rw-r--r--src/cpu/inorder/resources/fetch_unit.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cpu/inorder/resources/fetch_unit.cc b/src/cpu/inorder/resources/fetch_unit.cc
index a0d830ecf..d6038415e 100644
--- a/src/cpu/inorder/resources/fetch_unit.cc
+++ b/src/cpu/inorder/resources/fetch_unit.cc
@@ -170,10 +170,12 @@ FetchUnit::setupMemRequest(DynInstPtr inst, CacheReqPtr cache_req,
ThreadID tid = inst->readTid();
Addr aligned_addr = cacheBlockAlign(inst->getMemAddr());
- inst->fetchMemReq =
+ if (inst->fetchMemReq == NULL)
+ inst->fetchMemReq =
new Request(tid, aligned_addr, acc_size, flags,
inst->instAddr(), cpu->readCpuId(), tid);
+
cache_req->memReq = inst->fetchMemReq;
}