inorder: handle faults at writeback stage
call trap function when a fault is received
This commit is contained in:
parent
17f5749dbb
commit
ee7062d94d
5 changed files with 10 additions and 10 deletions
|
@ -141,6 +141,7 @@ InOrderCPU::CPUEvent::process()
|
|||
break;
|
||||
|
||||
case Trap:
|
||||
DPRINTF(InOrderCPU, "Trapping CPU\n");
|
||||
cpu->trapCPU(fault, tid, inst);
|
||||
break;
|
||||
|
||||
|
|
|
@ -64,8 +64,8 @@ DecodeUnit::execute(int slot_num)
|
|||
|
||||
if (inst->backSked != NULL) {
|
||||
DPRINTF(InOrderDecode,
|
||||
"[tid:%i]: Setting Destination Register(s) for [sn:%i].\n",
|
||||
tid, inst->seqNum);
|
||||
"[tid:%i]: %s Setting Destination Register(s) for [sn:%i].\n",
|
||||
tid, inst->instName(), inst->seqNum);
|
||||
regDepMap[tid]->insert(inst);
|
||||
|
||||
//inst->printSked();
|
||||
|
|
|
@ -249,8 +249,9 @@ ExecutionUnit::execute(int slot_num)
|
|||
|
||||
exec_req->done();
|
||||
} else {
|
||||
warn("inst [sn:%i] had a %s fault",
|
||||
seq_num, fault->name());
|
||||
warn("inst [sn:%i] had a %s fault", seq_num, fault->name());
|
||||
|
||||
exec_req->done();
|
||||
}
|
||||
} else {
|
||||
// Regular ALU instruction
|
||||
|
|
|
@ -68,13 +68,11 @@ GraduationUnit::execute(int slot_num)
|
|||
// Handle Any Faults Before Graduating Instruction
|
||||
if (inst->fault != NoFault) {
|
||||
cpu->trap(inst->fault, tid, inst);
|
||||
grad_req->setCompleted(false);
|
||||
return;
|
||||
}
|
||||
|
||||
DPRINTF(InOrderGraduation,
|
||||
"[tid:%i] Graduating instruction [sn:%i].\n",
|
||||
tid, inst->seqNum);
|
||||
"[tid:%i] Graduating instruction %s [sn:%i].\n",
|
||||
tid, inst->instName(), inst->seqNum);
|
||||
|
||||
// Release Non-Speculative "Block" on instructions that could not
|
||||
// execute because there was a non-speculative inst. active.
|
||||
|
|
|
@ -148,11 +148,11 @@ UseDefUnit::execute(int slot_idx)
|
|||
|
||||
// If there is a non-speculative instruction
|
||||
// in the pipeline then stall instructions here
|
||||
if (*nonSpecInstActive[tid] == true &&
|
||||
seq_num > *nonSpecSeqNum[tid]) {
|
||||
if (*nonSpecInstActive[tid] == true && seq_num > *nonSpecSeqNum[tid]) {
|
||||
DPRINTF(InOrderUseDef, "[tid:%i]: [sn:%i] cannot execute because"
|
||||
"there is non-speculative instruction [sn:%i] has not "
|
||||
"graduated.\n", tid, seq_num, *nonSpecSeqNum[tid]);
|
||||
ud_req->done(false);
|
||||
return;
|
||||
} else if (inst->isNonSpeculative()) {
|
||||
*nonSpecInstActive[tid] = true;
|
||||
|
|
Loading…
Reference in a new issue