summaryrefslogtreecommitdiff
path: root/src/cpu/o3/lsq_impl.hh
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2007-04-04 15:38:59 -0400
committerKevin Lim <ktlim@umich.edu>2007-04-04 15:38:59 -0400
commit6ff6621f20eb6513e12c769f601dba0b47b47697 (patch)
tree4a0da2fd882ae94d15361577807ede7111cd4626 /src/cpu/o3/lsq_impl.hh
parent9e1f3bc11a0f8cdb3bbb1ce12d4cd77d4c2c96c3 (diff)
downloadgem5-6ff6621f20eb6513e12c769f601dba0b47b47697.tar.xz
Pass ISA-specific O3 CPU as a constructor parameter instead of using setCPU functions.
src/cpu/o3/alpha/cpu_impl.hh: Pass ISA-specific O3 CPU to FullO3CPU as a constructor parameter instead of using setCPU functions. --HG-- extra : convert_revision : 74f4b1f5fb6f95a56081f367cce7ff44acb5688a
Diffstat (limited to 'src/cpu/o3/lsq_impl.hh')
-rw-r--r--src/cpu/o3/lsq_impl.hh45
1 files changed, 10 insertions, 35 deletions
diff --git a/src/cpu/o3/lsq_impl.hh b/src/cpu/o3/lsq_impl.hh
index 02cc5784c..b4a6a02da 100644
--- a/src/cpu/o3/lsq_impl.hh
+++ b/src/cpu/o3/lsq_impl.hh
@@ -107,9 +107,11 @@ LSQ<Impl>::DcachePort::recvRetry()
}
template <class Impl>
-LSQ<Impl>::LSQ(Params *params)
- : dcachePort(this), LQEntries(params->LQEntries),
- SQEntries(params->SQEntries), numThreads(params->numberOfThreads),
+LSQ<Impl>::LSQ(O3CPU *cpu_ptr, IEW *iew_ptr, Params *params)
+ : cpu(cpu_ptr), iewStage(iew_ptr), dcachePort(this),
+ LQEntries(params->LQEntries),
+ SQEntries(params->SQEntries),
+ numThreads(params->numberOfThreads),
retryTid(-1)
{
dcachePort.snoopRangeSent = false;
@@ -129,20 +131,18 @@ LSQ<Impl>::LSQ(Params *params)
maxLQEntries = LQEntries;
maxSQEntries = SQEntries;
-/*
+
DPRINTF(LSQ, "LSQ sharing policy set to Dynamic\n");
-*/
} else if (policy == "partitioned") {
lsqPolicy = Partitioned;
//@todo:make work if part_amt doesnt divide evenly.
maxLQEntries = LQEntries / numThreads;
maxSQEntries = SQEntries / numThreads;
-/*
+
DPRINTF(Fetch, "LSQ sharing policy set to Partitioned: "
"%i entries per LQ | %i entries per SQ",
maxLQEntries,maxSQEntries);
-*/
} else if (policy == "threshold") {
lsqPolicy = Threshold;
@@ -154,12 +154,10 @@ LSQ<Impl>::LSQ(Params *params)
//amount of the LSQ
maxLQEntries = params->smtLSQThreshold;
maxSQEntries = params->smtLSQThreshold;
-/*
+
DPRINTF(LSQ, "LSQ sharing policy set to Threshold: "
"%i entries per LQ | %i entries per SQ",
maxLQEntries,maxSQEntries);
-*/
-
} else {
assert(0 && "Invalid LSQ Sharing Policy.Options Are:{Dynamic,"
"Partitioned, Threshold}");
@@ -167,7 +165,8 @@ LSQ<Impl>::LSQ(Params *params)
//Initialize LSQs
for (int tid=0; tid < numThreads; tid++) {
- thread[tid].init(params, this, maxLQEntries, maxSQEntries, tid);
+ thread[tid].init(cpu, iew_ptr, params, this,
+ maxLQEntries, maxSQEntries, tid);
thread[tid].setDcachePort(&dcachePort);
}
}
@@ -198,30 +197,6 @@ LSQ<Impl>::setActiveThreads(std::list<unsigned> *at_ptr)
assert(activeThreads != 0);
}
-template<class Impl>
-void
-LSQ<Impl>::setCPU(O3CPU *cpu_ptr)
-{
- cpu = cpu_ptr;
-
- dcachePort.setName(name());
-
- for (int tid=0; tid < numThreads; tid++) {
- thread[tid].setCPU(cpu_ptr);
- }
-}
-
-template<class Impl>
-void
-LSQ<Impl>::setIEW(IEW *iew_ptr)
-{
- iewStage = iew_ptr;
-
- for (int tid=0; tid < numThreads; tid++) {
- thread[tid].setIEW(iew_ptr);
- }
-}
-
template <class Impl>
void
LSQ<Impl>::switchOut()