InOrderCPU::addToRemoveList(DynInstPtr &inst)
{
removeInstsThisCycle = true;
-
- removeList.push(inst->getInstListIt());
+ if (!inst->isRemoveList()) {
+ DPRINTF(InOrderCPU, "Pushing instruction [tid:%i] PC %#x "
+ "[sn:%lli] to remove list\n",
+ inst->threadNumber, inst->readPC(), inst->seqNum);
+ inst->setRemoveList();
+ removeList.push(inst->getInstListIt());
+ } else {
+ DPRINTF(InOrderCPU, "Ignoring instruction removal for [tid:%i] PC %#x "
+ "[sn:%lli], already remove list\n",
+ inst->threadNumber, inst->readPC(), inst->seqNum);
+ }
+
}
void
removeInstsThisCycle = true;
// Remove the instruction.
+ if (!inst->isRemoveList()) {
+ DPRINTF(InOrderCPU, "Pushing instruction [tid:%i] PC %#x "
+ "[sn:%lli] to remove list\n",
+ inst->threadNumber, inst->readPC(), inst->seqNum);
+ inst->setRemoveList();
+ removeList.push(inst->getInstListIt());
+ } else {
+ DPRINTF(InOrderCPU, "Ignoring instruction removal for [tid:%i] PC %#x "
+ "[sn:%lli], already on remove list\n",
+ inst->threadNumber, inst->readPC(), inst->seqNum);
+ }
- DPRINTF(RefCount, "Pushing instruction [tid:%i] PC %#x "
- "[sn:%lli] to remove list\n",
- inst->threadNumber, inst->readPC(), inst->seqNum);
- removeList.push(inst->getInstListIt());
}
void
(*instIt)->setSquashed();
- DPRINTF(RefCount, "Pushing instruction [tid:%i] PC %#x "
- "[sn:%lli] to remove list\n",
- (*instIt)->threadNumber, (*instIt)->readPC(), (*instIt)->seqNum);
- removeList.push(instIt);
+ if (!(*instIt)->isRemoveList()) {
+ DPRINTF(InOrderCPU, "Pushing instruction [tid:%i] PC %#x "
+ "[sn:%lli] to remove list\n",
+ (*instIt)->threadNumber, (*instIt)->readPC(),
+ (*instIt)->seqNum);
+ (*instIt)->setRemoveList();
+ removeList.push(instIt);
+ } else {
+ DPRINTF(InOrderCPU, "Ignoring instruction removal for [tid:%i] PC %#x "
+ "[sn:%lli], already on remove list\n",
+ (*instIt)->threadNumber, (*instIt)->readPC(),
+ (*instIt)->seqNum);
+ }
+
}
+
}
// For a Split-Load, the instruction would have processed once already
// causing the address to be unset.
if (!inst->validMemAddr() && !inst->splitInst) {
- panic("Mem. Addr. must be set before requesting cache access\n");
+ panic("[tid:%i][sn:%i] Mem. Addr. must be set before requesting cache access\n",
+ inst->readTid(), inst->seqNum);
}
Addr req_addr = inst->getMemAddr();
cache_req->splitAccess = true;
cache_req->split2ndAccess = true;
- DPRINTF(InOrderCachePort, "%i: sn[%i] Split Read Access (2 of 2) for (%#x, %#x).\n", curTick, inst->seqNum,
+ DPRINTF(InOrderCachePort, "[sn:%i] Split Read Access (2 of 2) for (%#x, %#x).\n", inst->seqNum,
inst->getMemAddr(), inst->split2ndAddr);
}
inst->splitMemData = new uint8_t[dataSize];
inst->splitTotalSize = dataSize;
-
- // Schedule Split Read/Complete for Instruction
- // ==============================
- int stage_num = cache_req->getStageNum();
+ if (!inst->splitInstSked) {
+ // Schedule Split Read/Complete for Instruction
+ // ==============================
+ int stage_num = cache_req->getStageNum();
- int stage_pri = ThePipeline::getNextPriority(inst, stage_num);
+ int stage_pri = ThePipeline::getNextPriority(inst, stage_num);
- inst->resSched.push(new ScheduleEntry(stage_num,
- stage_pri,
- cpu->resPool->getResIdx(DCache),
- CacheUnit::InitSecondSplitRead,
- 1)
- );
-
- inst->resSched.push(new ScheduleEntry(stage_num + 1,
- 1/*stage_pri*/,
- cpu->resPool->getResIdx(DCache),
- CacheUnit::CompleteSecondSplitRead,
- 1)
- );
-
+ inst->resSched.push(new ScheduleEntry(stage_num,
+ stage_pri,
+ cpu->resPool->getResIdx(DCache),
+ CacheUnit::InitSecondSplitRead,
+ 1)
+ );
+
+ inst->resSched.push(new ScheduleEntry(stage_num + 1,
+ 1/*stage_pri*/,
+ cpu->resPool->getResIdx(DCache),
+ CacheUnit::CompleteSecondSplitRead,
+ 1)
+ );
+ inst->splitInstSked = true;
+ } else {
+ DPRINTF(InOrderCachePort, "[tid:%i] [sn:%i] Retrying Split Read Access (1 of 2) for (%#x, %#x).\n",
+ inst->readTid(), inst->seqNum, addr, secondAddr);
+ }
// Split Information for First Access
// ==============================
cache_req->splitAccess = true;
cache_req->split2ndAccess = true;
- DPRINTF(InOrderCachePort, "%i: sn[%i] Split Write Access (2 of 2) for (%#x, %#x).\n", curTick, inst->seqNum,
+ DPRINTF(InOrderCachePort, "[sn:%i] Split Write Access (2 of 2) for (%#x, %#x).\n", inst->seqNum,
inst->getMemAddr(), inst->split2ndAddr);
}
Addr secondAddr = roundDown(addr + dataSize - 1, blockSize);
if (secondAddr > addr && !inst->split2ndAccess) {
- DPRINTF(InOrderCachePort, "%i: sn[%i] Split Write Access (1 of 2) for (%#x, %#x).\n", curTick, inst->seqNum,
+
+ DPRINTF(InOrderCachePort, "[sn:%i] Split Write Access (1 of 2) for (%#x, %#x).\n", inst->seqNum,
addr, secondAddr);
// Save All "Total" Split Information
inst->splitInst = true;
inst->splitTotalSize = dataSize;
- // Schedule Split Read/Complete for Instruction
- // ==============================
- int stage_num = cache_req->getStageNum();
+ if (!inst->splitInstSked) {
+ // Schedule Split Read/Complete for Instruction
+ // ==============================
+ int stage_num = cache_req->getStageNum();
+
+ int stage_pri = ThePipeline::getNextPriority(inst, stage_num);
+
+ inst->resSched.push(new ScheduleEntry(stage_num,
+ stage_pri,
+ cpu->resPool->getResIdx(DCache),
+ CacheUnit::InitSecondSplitWrite,
+ 1)
+ );
+
+ inst->resSched.push(new ScheduleEntry(stage_num + 1,
+ 1/*stage_pri*/,
+ cpu->resPool->getResIdx(DCache),
+ CacheUnit::CompleteSecondSplitWrite,
+ 1)
+ );
+ inst->splitInstSked = true;
+ } else {
+ DPRINTF(InOrderCachePort, "[tid:%i] sn:%i] Retrying Split Read Access (1 of 2) for (%#x, %#x).\n",
+ inst->readTid(), inst->seqNum, addr, secondAddr);
+ }
- int stage_pri = ThePipeline::getNextPriority(inst, stage_num);
- inst->resSched.push(new ScheduleEntry(stage_num,
- stage_pri,
- cpu->resPool->getResIdx(DCache),
- CacheUnit::InitSecondSplitWrite,
- 1)
- );
-
- inst->resSched.push(new ScheduleEntry(stage_num + 1,
- 1/*stage_pri*/,
- cpu->resPool->getResIdx(DCache),
- CacheUnit::CompleteSecondSplitWrite,
- 1)
- );
// Split Information for First Access
// ==============================
inst->split2ndStoreDataPtr = &cache_req->inst->storeData;
inst->split2ndStoreDataPtr += dataSize;
inst->split2ndFlags = flags;
+ inst->splitInstSked = true;
}
doTLBAccess(inst, cache_req, dataSize, flags, TheISA::TLB::Write);