summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpu/inorder/cpu.cc4
-rw-r--r--src/cpu/inorder/resources/graduation_unit.cc28
-rw-r--r--src/cpu/inorder/resources/graduation_unit.hh1
3 files changed, 22 insertions, 11 deletions
diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc
index 834e591f8..232bf8279 100644
--- a/src/cpu/inorder/cpu.cc
+++ b/src/cpu/inorder/cpu.cc
@@ -517,7 +517,7 @@ InOrderCPU::createBackEndSked(DynInstPtr inst)
}
}
- W.needs(Grad, GraduationUnit::GraduateInst);
+ W.needs(Grad, GraduationUnit::CheckFault);
for (int idx=0; idx < inst->numDestRegs(); idx++) {
W.needs(RegManager, UseDefUnit::WriteDestReg, idx);
@@ -526,6 +526,8 @@ InOrderCPU::createBackEndSked(DynInstPtr inst)
if (inst->isControl())
W.needs(BPred, BranchPredictor::UpdatePredictor);
+ W.needs(Grad, GraduationUnit::GraduateInst);
+
// Insert Back Schedule into our cache of
// resource schedules
addToSkedCache(inst, res_sked);
diff --git a/src/cpu/inorder/resources/graduation_unit.cc b/src/cpu/inorder/resources/graduation_unit.cc
index 4f796e933..617ef14f6 100644
--- a/src/cpu/inorder/resources/graduation_unit.cc
+++ b/src/cpu/inorder/resources/graduation_unit.cc
@@ -56,25 +56,33 @@ GraduationUnit::execute(int slot_num)
switch (grad_req->cmd)
{
- case GraduateInst:
+ case CheckFault:
{
- if (lastNonSpecTick == curTick()) {
- DPRINTF(InOrderGraduation, "Unable to graduate [sn:%i]. "
- "Only 1 nonspec inst. per cycle can graduate.\n");
- grad_req->done(false);
- return;
- }
-
// Handle Any Faults Before Graduating Instruction
if (inst->fault != NoFault) {
- DPRINTF(Fault, "[sn:%i]: fault %s found for %s\n",
- inst->seqNum, inst->fault->name(),
+ DPRINTF(InOrderGraduation, "[tid:%i]: [sn:%i]: fault %s found for %s\n",
+ tid, inst->seqNum, inst->fault->name(),
inst->instName());
squashThenTrap(stage_num, inst);
grad_req->done(false);
return;
}
+ DPRINTF(InOrderGraduation, "[tid:%i] [sn:%i]: No fault found for %s\n",
+ tid, inst->seqNum, inst->instName());
+ grad_req->done();
+ }
+ break;
+
+ case GraduateInst:
+ {
+ if (lastNonSpecTick == curTick()) {
+ DPRINTF(InOrderGraduation, "Unable to graduate [sn:%i]. "
+ "Only 1 nonspec inst. per cycle can graduate.\n");
+ grad_req->done(false);
+ return;
+ }
+
DPRINTF(InOrderGraduation,
"[tid:%i]:[sn:%i]: Graduating instruction %s.\n",
tid, inst->seqNum, inst->staticInst->disassemble(inst->instAddr()));
diff --git a/src/cpu/inorder/resources/graduation_unit.hh b/src/cpu/inorder/resources/graduation_unit.hh
index 043e375e7..01abae85b 100644
--- a/src/cpu/inorder/resources/graduation_unit.hh
+++ b/src/cpu/inorder/resources/graduation_unit.hh
@@ -46,6 +46,7 @@ class GraduationUnit : public Resource {
typedef ThePipeline::DynInstPtr DynInstPtr;
enum Command {
+ CheckFault,
GraduateInst
};