summaryrefslogtreecommitdiff
path: root/src/cpu/o3/commit_impl.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-04-04 20:50:49 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-04-04 20:50:49 +0000
commita664017c2a839279f8b8eea1076bba47d1863b88 (patch)
treeac302402f02133b6fda91ced93da52aaa8a8a3e8 /src/cpu/o3/commit_impl.hh
parent10fe8b05dbf38acff65d95a696cad95a45bf2e16 (diff)
parent3d2a434e42b10ef30bbb590722e72ed104be669a (diff)
downloadgem5-a664017c2a839279f8b8eea1076bba47d1863b88.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-o3-spec --HG-- extra : convert_revision : 81269f094834f43b4e908321bfce2e031b39d2a4
Diffstat (limited to 'src/cpu/o3/commit_impl.hh')
-rw-r--r--src/cpu/o3/commit_impl.hh30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh
index 65e36d99a..65625065d 100644
--- a/src/cpu/o3/commit_impl.hh
+++ b/src/cpu/o3/commit_impl.hh
@@ -71,8 +71,9 @@ DefaultCommit<Impl>::TrapEvent::description()
}
template <class Impl>
-DefaultCommit<Impl>::DefaultCommit(Params *params)
- : squashCounter(0),
+DefaultCommit<Impl>::DefaultCommit(O3CPU *_cpu, Params *params)
+ : cpu(_cpu),
+ squashCounter(0),
iewToCommitDelay(params->iewToCommitDelay),
commitToIEWDelay(params->commitToIEWDelay),
renameToROBDelay(params->renameToROBDelay),
@@ -96,7 +97,7 @@ DefaultCommit<Impl>::DefaultCommit(Params *params)
if (policy == "aggressive"){
commitPolicy = Aggressive;
-// DPRINTF(Commit,"Commit Policy set to Aggressive.");
+ DPRINTF(Commit,"Commit Policy set to Aggressive.");
} else if (policy == "roundrobin"){
commitPolicy = RoundRobin;
@@ -105,11 +106,11 @@ DefaultCommit<Impl>::DefaultCommit(Params *params)
priority_list.push_back(tid);
}
-// DPRINTF(Commit,"Commit Policy set to Round Robin.");
+ DPRINTF(Commit,"Commit Policy set to Round Robin.");
} else if (policy == "oldestready"){
commitPolicy = OldestReady;
-// DPRINTF(Commit,"Commit Policy set to Oldest Ready.");
+ DPRINTF(Commit,"Commit Policy set to Oldest Ready.");
} else {
assert(0 && "Invalid SMT Commit Policy. Options Are: {Aggressive,"
"RoundRobin,OldestReady}");
@@ -227,20 +228,6 @@ DefaultCommit<Impl>::regStats()
template <class Impl>
void
-DefaultCommit<Impl>::setCPU(O3CPU *cpu_ptr)
-{
- cpu = cpu_ptr;
- DPRINTF(Commit, "Commit: Setting CPU pointer.\n");
-
- // Commit must broadcast the number of free entries it has at the start of
- // the simulation, so it starts as active.
- cpu->activateStage(O3CPU::CommitIdx);
-
- trapLatency = cpu->cycles(trapLatency);
-}
-
-template <class Impl>
-void
DefaultCommit<Impl>::setThreads(std::vector<Thread *> &threads)
{
thread = threads;
@@ -333,7 +320,12 @@ DefaultCommit<Impl>::initStage()
toIEW->commitInfo[i].emptyROB = true;
}
+ // Commit must broadcast the number of free entries it has at the
+ // start of the simulation, so it starts as active.
+ cpu->activateStage(O3CPU::CommitIdx);
+
cpu->activityThisCycle();
+ trapLatency = cpu->cycles(trapLatency);
}
template <class Impl>