diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-05-31 11:45:02 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-05-31 11:45:02 -0400 |
commit | a514bf21508f4398f5cf7322f5f2a1ed212bbcaa (patch) | |
tree | e41f2e45926a5724765f762fe8c4b34e9e4d5c56 /cpu/o3/iew_impl.hh | |
parent | 94eff2f4854ce23900bcc3d694ff4c290111bea7 (diff) | |
download | gem5-a514bf21508f4398f5cf7322f5f2a1ed212bbcaa.tar.xz |
Comments and code cleanup.
cpu/activity.cc:
cpu/activity.hh:
cpu/o3/alpha_cpu.hh:
Updates to include comments.
cpu/base_dyn_inst.cc:
Remove call to thread->misspeculating(), as it's never actually misspeculating.
--HG--
extra : convert_revision : 86574d684770fac9b480475acca048ea418cdac3
Diffstat (limited to 'cpu/o3/iew_impl.hh')
-rw-r--r-- | cpu/o3/iew_impl.hh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cpu/o3/iew_impl.hh b/cpu/o3/iew_impl.hh index b0137d7fc..3ed20cb75 100644 --- a/cpu/o3/iew_impl.hh +++ b/cpu/o3/iew_impl.hh @@ -433,6 +433,7 @@ template <class Impl> void DefaultIEW<Impl>::switchOut() { + // IEW is ready to switch out at any time. cpu->signalSwitched(); } @@ -440,6 +441,7 @@ template <class Impl> void DefaultIEW<Impl>::doSwitchOut() { + // Clear any state. switchedOut = true; instQueue.switchOut(); @@ -458,6 +460,7 @@ template <class Impl> void DefaultIEW<Impl>::takeOverFrom() { + // Reset all state. _status = Active; exeStatus = Running; wbStatus = Idle; @@ -571,6 +574,7 @@ DefaultIEW<Impl>::squashDueToMemBlocked(DynInstPtr &inst, unsigned tid) toCommit->squashedSeqNum[tid] = inst->seqNum; toCommit->nextPC[tid] = inst->readPC(); + // Must include the broadcasted SN in the squash. toCommit->includeSquashInst[tid] = true; ldstQueue.setLoadBlockedHandled(tid); @@ -1104,6 +1108,7 @@ DefaultIEW<Impl>::dispatchInsts(unsigned tid) // Store conditionals need to be set as "canCommit()" // so that commit can process them when they reach the // head of commit. + // @todo: This is somewhat specific to Alpha. inst->setCanCommit(); instQueue.insertNonSpec(inst); add_to_iq = false; @@ -1363,6 +1368,7 @@ DefaultIEW<Impl>::executeInsts() } } + // Update and record activity if we processed any instructions. if (inst_num) { if (exeStatus == Idle) { exeStatus = Running; @@ -1413,8 +1419,10 @@ DefaultIEW<Impl>::writebackInsts() scoreboard->setReg(inst->renamedDestRegIdx(i)); } - producerInst[tid]++; - consumerInst[tid]+= dependents; + if (dependents) { + producerInst[tid]++; + consumerInst[tid]+= dependents; + } writebackCount[tid]++; } } @@ -1485,6 +1493,7 @@ DefaultIEW<Impl>::tick() DPRINTF(IEW,"Processing [tid:%i]\n",tid); + // Update structures based on instructions committed. if (fromCommit->commitInfo[tid].doneSeqNum != 0 && !fromCommit->commitInfo[tid].squash && !fromCommit->commitInfo[tid].robSquashing) { |