88a89,117
> FullO3CPU<Impl>::ActivateThreadEvent::ActivateThreadEvent()
> : Event(&mainEventQueue, CPU_Tick_Pri)
> {
> }
>
> template <class Impl>
> void
> FullO3CPU<Impl>::ActivateThreadEvent::init(int thread_num,
> FullO3CPU<Impl> *thread_cpu)
> {
> tid = thread_num;
> cpu = thread_cpu;
> }
>
> template <class Impl>
> void
> FullO3CPU<Impl>::ActivateThreadEvent::process()
> {
> cpu->activateThread(tid);
> }
>
> template <class Impl>
> const char *
> FullO3CPU<Impl>::ActivateThreadEvent::description()
> {
> return "FullO3CPU \"Activate Thread\" event";
> }
>
> template <class Impl>
259a289,290
> lastActivatedCycle = -1;
>
577c608
< FullO3CPU<Impl>::activateContext(int tid, int delay)
---
> FullO3CPU<Impl>::activateThread(unsigned int tid)
579d609
< // Needs to set each stage to running as well.
584,586c614
< //May Need to Re-code this if the delay variable is the
< //delay needed for thread to activate
< DPRINTF(O3CPU, "Adding Thread %i to active threads list\n",
---
> DPRINTF(O3CPU, "[tid:%i]: Adding to active threads list\n",
590a619
> }
592d620
< assert(_status == Idle || _status == SwitchedOut);
594c622,633
< scheduleTickEvent(delay);
---
> 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);
> }
596,599c635,636
< // Be sure to signal that there's some activity so the CPU doesn't
< // deschedule itself.
< activityRec.activity();
< fetch.wakeFromQuiesce();
---
> if(lastActivatedCycle < curTick) {
> scheduleTickEvent(delay);
601c638,646
< _status = Running;
---
> // Be sure to signal that there's some activity so the CPU doesn't
> // deschedule itself.
> activityRec.activity();
> fetch.wakeFromQuiesce();
>
> lastActivatedCycle = curTick;
>
> _status = Running;
> }