if ( inst->isLoad() ) {
M.needs(DCache, CacheUnit::InitiateReadData);
+ if (inst->splitInst)
+ M.needs(DCache, CacheUnit::InitSecondSplitRead);
} else if ( inst->isStore() ) {
if ( inst->numSrcRegs() >= 2 ) {
M.needs(RegManager, UseDefUnit::ReadSrcReg, 1);
}
M.needs(AGEN, AGENUnit::GenerateAddr);
M.needs(DCache, CacheUnit::InitiateWriteData);
+ if (inst->splitInst)
+ M.needs(DCache, CacheUnit::InitSecondSplitWrite);
}
}
if (!inst->isNonSpeculative()) {
if ( inst->isLoad() ) {
W.needs(DCache, CacheUnit::CompleteReadData);
+ if (inst->splitInst)
+ W.needs(DCache, CacheUnit::CompleteSecondSplitRead);
} else if ( inst->isStore() ) {
W.needs(DCache, CacheUnit::CompleteWriteData);
+ if (inst->splitInst)
+ W.needs(DCache, CacheUnit::CompleteSecondSplitWrite);
}
} else {
// Finally, Execute Speculative Data
if (inst->isLoad()) {
W.needs(AGEN, AGENUnit::GenerateAddr);
W.needs(DCache, CacheUnit::InitiateReadData);
+ if (inst->splitInst)
+ W.needs(DCache, CacheUnit::InitSecondSplitRead);
W.needs(DCache, CacheUnit::CompleteReadData);
+ if (inst->splitInst)
+ W.needs(DCache, CacheUnit::CompleteSecondSplitRead);
} else if (inst->isStore()) {
if ( inst->numSrcRegs() >= 2 ) {
W.needs(RegManager, UseDefUnit::ReadSrcReg, 1);
}
W.needs(AGEN, AGENUnit::GenerateAddr);
W.needs(DCache, CacheUnit::InitiateWriteData);
+ if (inst->splitInst)
+ W.needs(DCache, CacheUnit::InitSecondSplitWrite);
W.needs(DCache, CacheUnit::CompleteWriteData);
+ if (inst->splitInst)
+ W.needs(DCache, CacheUnit::CompleteSecondSplitWrite);
}
} else {
W.needs(ExecUnit, ExecutionUnit::ExecuteInst);
static const uint8_t INST_NONSPEC = 22;
static const uint8_t INST_DEST_REGS = 18;
static const uint8_t INST_SRC_REGS = 14;
+ static const uint8_t INST_SPLIT_DATA = 13;
inline SkedID genSkedID(DynInstPtr inst)
{
(inst->isControl() << INST_CONTROL) |
(inst->isNonSpeculative() << INST_NONSPEC) |
(inst->numDestRegs() << INST_DEST_REGS) |
- (inst->numSrcRegs() << INST_SRC_REGS);
+ (inst->numSrcRegs() << INST_SRC_REGS) |
+ (inst->splitInst << INST_SPLIT_DATA);
return id;
}
if (secondAddr > addr && !inst->split2ndAccess) {
- DPRINTF(InOrderCachePort, "%i: sn[%i] Split Read Access (1 of 2) for "
- "(%#x, %#x).\n", curTick(), inst->seqNum, addr, secondAddr);
-
- // Save All "Total" Split Information
- // ==============================
- inst->splitInst = true;
- inst->splitMemData = new uint8_t[size];
-
- if (!inst->splitInstSked) {
- assert(0 && "Split Requests Not Supported for Now...");
- // Schedule Split Read/Complete for Instruction
- // ==============================
- int stage_num = cache_req->getStageNum();
- RSkedPtr inst_sked = (stage_num >= ThePipeline::BackEndStartStage) ?
- inst->backSked : inst->frontSked;
+ if (!inst->splitInst) {
+ DPRINTF(InOrderCachePort, "%i: sn[%i] Split Read Access (1 of 2) for "
+ "(%#x, %#x).\n", curTick(), inst->seqNum, addr, secondAddr);
- // this is just an arbitrarily high priority to ensure that this
- // gets pushed to the back of the list
- int stage_pri = 20;
-
- int isplit_cmd = CacheUnit::InitSecondSplitRead;
- inst_sked->push(new
- ScheduleEntry(stage_num,
- stage_pri,
- cpu->resPool->getResIdx(DCache),
- isplit_cmd,
- 1));
+ unsigned stage_num = cache_req->getStageNum();
+ unsigned cmd = inst->curSkedEntry->cmd;
- int csplit_cmd = CacheUnit::CompleteSecondSplitRead;
- inst_sked->push(new
- ScheduleEntry(stage_num + 1,
- 1/*stage_pri*/,
- cpu->resPool->getResIdx(DCache),
- csplit_cmd,
- 1));
- inst->splitInstSked = true;
+ // 1. Make A New Inst. Schedule w/Split Read/Complete Entered on
+ // the schedule
+ // ==============================
+ // 2. Reassign curSkedPtr to current command (InitiateRead) on new
+ // schedule
+ // ==============================
+ inst->splitInst = true;
+ inst->setBackSked(cpu->createBackEndSked(inst));
+ inst->curSkedEntry = inst->backSked->find(stage_num, cmd);
} else {
DPRINTF(InOrderCachePort, "[tid:%i] [sn:%i] Retrying Split Read "
"Access (1 of 2) for (%#x, %#x).\n", inst->readTid(),
inst->seqNum, addr, secondAddr);
}
+ // Save All "Total" Split Information
+ // ==============================
+ inst->splitMemData = new uint8_t[size];
+
// Split Information for First Access
// ==============================
size = secondAddr - addr;
uniqueIntRegMap[flat_idx] = true;
DPRINTF(InOrderUseDef, "[tid:%i]: [sn:%i]: Reading Int Reg %i"
- " (%i) from Register File:%i.\n",
+ " (%i) from Register File:0x%x.\n",
tid, seq_num,
reg_idx, flat_idx,
cpu->readIntReg(flat_idx,inst->readTid()));
{
uniqueMiscRegMap[flat_idx] = true;
DPRINTF(InOrderUseDef, "[tid:%i]: [sn:%i]: Reading Misc Reg %i "
- " (%i) from Register File:%i.\n",
+ " (%i) from Register File:0x%x.\n",
tid, seq_num,
reg_idx - Ctrl_Base_DepTag, flat_idx,
cpu->readMiscReg(flat_idx,
{
DPRINTF(InOrderUseDef, "[tid:%i]: Forwarding dest."
" reg %i (%i), value 0x%x from "
- "[sn:%i] to [sn:%i] source #%i.\n",
+ "[sn:%i] to [sn:%i] source #%x.\n",
tid, reg_idx, flat_idx,
forward_inst->readIntResult(dest_reg_idx),
forward_inst->seqNum,