Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/newmem
authorKorey Sewell <ksewell@umich.edu>
Fri, 7 Jul 2006 08:07:00 +0000 (04:07 -0400)
committerKorey Sewell <ksewell@umich.edu>
Fri, 7 Jul 2006 08:07:00 +0000 (04:07 -0400)
into  zizzer.eecs.umich.edu:/.automount/zooks/y/ksewell/research/m5-sim/newmem-o3

--HG--
extra : convert_revision : 90717b492139428e0c48be35a6bda45960c61086

1  2 
src/cpu/o3/commit_impl.hh
src/cpu/o3/cpu.cc
src/cpu/o3/cpu.hh

Simple merge
index b182d5ca78a2f5976b502731284f238ef36434e6,0a564169ae88f1d1302b5adb62e1fc811f77febd..ec02a39295e00e04ce4e9f699a906de42f6172e3
@@@ -605,119 -750,16 +750,17 @@@ FullO3CPU<Impl>::activateWhenReady(int 
      }
  }
  
- template <class Impl>
- void
- FullO3CPU<Impl>::activateThread(unsigned int tid)
- {
-     list<unsigned>::iterator isActive = find(
-         activeThreads.begin(), activeThreads.end(), tid);
-     if (isActive == activeThreads.end()) {
-         DPRINTF(O3CPU, "[tid:%i]: Adding to active threads list\n",
-                 tid);
-         activeThreads.push_back(tid);
-     }
- }
- template <class Impl>
- void
- FullO3CPU<Impl>::activateContext(int tid, int delay)
- {
-     // Needs to set each stage to running as well.
-     if (delay){
-         DPRINTF(O3CPU, "[tid:%i]: Scheduling thread context to activate "
-                 "on cycle %d\n", tid, curTick + cycles(delay));
-         scheduleActivateThreadEvent(tid, delay);
-     } else {
-         activateThread(tid);
-     }
-     if(lastActivatedCycle < curTick) {
-         scheduleTickEvent(delay);
-         // Be sure to signal that there's some activity so the CPU doesn't
-         // deschedule itself.
-         activityRec.activity();
-         fetch.wakeFromQuiesce();
-         lastActivatedCycle = curTick;
-         _status = Running;
-     }
- }
- template <class Impl>
- void
- FullO3CPU<Impl>::suspendContext(int tid)
- {
-     DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid);
-     unscheduleTickEvent();
-     _status = Idle;
- /*
-     //Remove From Active List, if Active
-     list<unsigned>::iterator isActive = find(
-         activeThreads.begin(), activeThreads.end(), tid);
-     if (isActive != activeThreads.end()) {
-         DPRINTF(O3CPU,"[tid:%i]: Removing from active threads list\n",
-                 tid);
-         activeThreads.erase(isActive);
-     }
- */
- }
- template <class Impl>
- void
- FullO3CPU<Impl>::deallocateContext(int tid)
- {
-     DPRINTF(O3CPU,"[tid:%i]: Deallocating Thread Context", tid);
-     //Remove From Active List, if Active
-     list<unsigned>::iterator thread_it =
-         find(activeThreads.begin(), activeThreads.end(), tid);
-     if (thread_it != activeThreads.end()) {
-         DPRINTF(O3CPU,"[tid:%i]: Removing from active threads list\n",
-                 tid);
-         activeThreads.erase(thread_it);
-         removeThread(tid);
-     }
- }
- template <class Impl>
- void
- FullO3CPU<Impl>::haltContext(int tid)
- {
-     DPRINTF(O3CPU,"[tid:%i]: Halting Thread Context", tid);
- /*
-     //Remove From Active List, if Active
-     list<unsigned>::iterator isActive = find(
-         activeThreads.begin(), activeThreads.end(), tid);
-     if (isActive != activeThreads.end()) {
-         DPRINTF(O3CPU,"[tid:%i]: Removing from active threads list\n",
-                 tid);
-         activeThreads.erase(isActive);
-         removeThread(tid);
-     }
- */
- }
  template <class Impl>
 -void
 -FullO3CPU<Impl>::switchOut()
 +bool
 +FullO3CPU<Impl>::drain(Event *drain_event)
  {
 -    switchCount = 0;
 -    fetch.switchOut();
 -    decode.switchOut();
 -    rename.switchOut();
 -    iew.switchOut();
 -    commit.switchOut();
 +    drainCount = 0;
 +    drainEvent = drain_event;
 +    fetch.drain();
 +    decode.drain();
 +    rename.drain();
 +    iew.drain();
 +    commit.drain();
  
      // Wake the CPU and record activity so everything can drain out if
      // the CPU is currently idle.
Simple merge