}
activityRec.advance();
- // Any squashed requests, events, or insts then remove them now
- cleanUpRemovedReqs();
+ // Any squashed events, or insts then remove them now
cleanUpRemovedEvents();
cleanUpRemovedInsts();
removeInstsThisCycle = false;
}
-void
-InOrderCPU::cleanUpRemovedReqs()
-{
- while (!reqRemoveList.empty()) {
- ResourceRequest *res_req = reqRemoveList.front();
-
- DPRINTF(RefCount, "[tid:%i] [sn:%lli]: Removing Request "
- "[stage_num:%i] [res:%s] [slot:%i] [completed:%i].\n",
- res_req->inst->threadNumber,
- res_req->inst->seqNum,
- res_req->getStageNum(),
- res_req->res->name(),
- (res_req->isCompleted()) ?
- res_req->getComplSlot() : res_req->getSlot(),
- res_req->isCompleted());
-
- reqRemoveList.pop();
-
- delete res_req;
- }
-}
-
void
InOrderCPU::cleanUpRemovedEvents()
{
/** Cleans up all instructions on the instruction remove list. */
void cleanUpRemovedInsts();
- /** Cleans up all instructions on the request remove list. */
- void cleanUpRemovedReqs();
-
- /** Cleans up all instructions on the CPU event remove list. */
+ /** Cleans up all events on the CPU event remove list. */
void cleanUpRemovedEvents();
/** Debug function to print all instructions on the list. */
*/
std::queue<ListIt> removeList;
- /** List of all the resource requests that will be removed at the end
- * of this cycle.
- */
- std::queue<ResourceRequest*> reqRemoveList;
-
/** List of all the cpu event requests that will be removed at the end of
* the current cycle.
*/
cpu->activateNextReadyContext();
}
- // Mark request for deletion
- // if it isnt currently being used by a resource
- if (!req->hasSlot()) {
- DPRINTF(InOrderStage, "[sn:%i] Deleting Request, has no "
- "slot in resource.\n", inst->seqNum);
-
- cpu->reqRemoveList.push(req);
- } else {
- DPRINTF(InOrderStage, "[sn:%i] Ignoring Request Deletion, "
- "in resource [slot:%i].\n", inst->seqNum,
- req->getSlot());
- }
-
-
break;
}
if (resourceEvent[req_slot_num].scheduled())
unscheduleEvent(req_slot_num);
- // Mark request for later removal
- cpu->reqRemoveList.push(req_ptr);
-
// Mark slot for removal from resource
slot_remove_list.push_back(req_ptr->getSlot());
}
// Used for debugging purposes
if (completed) {
complSlotNum = slotNum;
-
- // Would like to start a convention such as all requests deleted in
- // resources/pipeline
- // but a little more complex then it seems...
- // For now, all COMPLETED requests deleted in resource..
- // all FAILED requests deleted in pipeline stage
- // *all SQUASHED requests deleted in resource
- res->cpu->reqRemoveList.push(res->reqMap[slotNum]);
}
// Free Slot So Another Instruction Can Use This Resource
}
if (!cache_req->tlbStall && !cache_req->isMemAccPending()) {
- // Mark request for later removal
- cpu->reqRemoveList.push(req_ptr);
-
// Mark slot for removal from resource
slot_remove_list.push_back(req_ptr->getSlot());
} else {
if (resourceEvent[req_slot_num].scheduled())
unscheduleEvent(req_slot_num);
- // Mark request for later removal
- cpu->reqRemoveList.push(req_ptr);
-
// Mark slot for removal from resource
slot_remove_list.push_back(req_ptr->getSlot());
}
unscheduleEvent(req_slot_num);
}
- // Mark request for later removal
- cpu->reqRemoveList.push(req_ptr);
-
// Mark slot for removal from resource
slot_remove_list.push_back(req_ptr->getSlot());
}