From 6ff6621f20eb6513e12c769f601dba0b47b47697 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Wed, 4 Apr 2007 15:38:59 -0400 Subject: 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 --- src/cpu/o3/lsq_impl.hh | 45 ++++++++++----------------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) (limited to 'src/cpu/o3/lsq_impl.hh') 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::DcachePort::recvRetry() } template -LSQ::LSQ(Params *params) - : dcachePort(this), LQEntries(params->LQEntries), - SQEntries(params->SQEntries), numThreads(params->numberOfThreads), +LSQ::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::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::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::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::setActiveThreads(std::list *at_ptr) assert(activeThreads != 0); } -template -void -LSQ::setCPU(O3CPU *cpu_ptr) -{ - cpu = cpu_ptr; - - dcachePort.setName(name()); - - for (int tid=0; tid < numThreads; tid++) { - thread[tid].setCPU(cpu_ptr); - } -} - -template -void -LSQ::setIEW(IEW *iew_ptr) -{ - iewStage = iew_ptr; - - for (int tid=0; tid < numThreads; tid++) { - thread[tid].setIEW(iew_ptr); - } -} - template void LSQ::switchOut() -- cgit v1.2.3