diff options
author | Kevin Lim <ktlim@umich.edu> | 2007-04-04 15:38:59 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2007-04-04 15:38:59 -0400 |
commit | 6ff6621f20eb6513e12c769f601dba0b47b47697 (patch) | |
tree | 4a0da2fd882ae94d15361577807ede7111cd4626 /src/cpu/o3/rob_impl.hh | |
parent | 9e1f3bc11a0f8cdb3bbb1ce12d4cd77d4c2c96c3 (diff) | |
download | gem5-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/rob_impl.hh')
-rw-r--r-- | src/cpu/o3/rob_impl.hh | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/cpu/o3/rob_impl.hh b/src/cpu/o3/rob_impl.hh index 975aba379..7ff3aa274 100644 --- a/src/cpu/o3/rob_impl.hh +++ b/src/cpu/o3/rob_impl.hh @@ -35,10 +35,11 @@ #include <list> template <class Impl> -ROB<Impl>::ROB(unsigned _numEntries, unsigned _squashWidth, +ROB<Impl>::ROB(O3CPU *_cpu, unsigned _numEntries, unsigned _squashWidth, std::string _smtROBPolicy, unsigned _smtROBThreshold, unsigned _numThreads) - : numEntries(_numEntries), + : cpu(_cpu), + numEntries(_numEntries), squashWidth(_squashWidth), numInstsInROB(0), numThreads(_numThreads) @@ -66,7 +67,7 @@ ROB<Impl>::ROB(unsigned _numEntries, unsigned _squashWidth, } else if (policy == "partitioned") { robPolicy = Partitioned; -// DPRINTF(Fetch, "ROB sharing policy set to Partitioned\n"); + DPRINTF(Fetch, "ROB sharing policy set to Partitioned\n"); //@todo:make work if part_amt doesnt divide evenly. int part_amt = numEntries / numThreads; @@ -78,7 +79,7 @@ ROB<Impl>::ROB(unsigned _numEntries, unsigned _squashWidth, } else if (policy == "threshold") { robPolicy = Threshold; -// DPRINTF(Fetch, "ROB sharing policy set to Threshold\n"); + DPRINTF(Fetch, "ROB sharing policy set to Threshold\n"); int threshold = _smtROBThreshold;; @@ -90,20 +91,6 @@ ROB<Impl>::ROB(unsigned _numEntries, unsigned _squashWidth, assert(0 && "Invalid ROB Sharing Policy.Options Are:{Dynamic," "Partitioned, Threshold}"); } -} - -template <class Impl> -std::string -ROB<Impl>::name() const -{ - return cpu->name() + ".rob"; -} - -template <class Impl> -void -ROB<Impl>::setCPU(O3CPU *cpu_ptr) -{ - cpu = cpu_ptr; // Set the per-thread iterators to the end of the instruction list. for (int i=0; i < numThreads;i++) { @@ -117,6 +104,13 @@ ROB<Impl>::setCPU(O3CPU *cpu_ptr) } template <class Impl> +std::string +ROB<Impl>::name() const +{ + return cpu->name() + ".rob"; +} + +template <class Impl> void ROB<Impl>::setActiveThreads(std::list<unsigned> *at_ptr) { |