1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 441 unchanged lines hidden (view full) --- 450 451 if (removeInstsThisCycle) { 452 cleanUpRemovedInsts(); 453 } 454 455 if (!tickEvent.scheduled()) { 456 if (_status == SwitchedOut || 457 getState() == SimObject::Drained) { |
458 DPRINTF(O3CPU, "Switched out!\n"); |
459 // increment stat 460 lastRunningCycle = curTick; 461 } else if (!activityRec.active() || _status == Idle) { |
462 DPRINTF(O3CPU, "Idle!\n"); |
463 lastRunningCycle = curTick; 464 timesIdled++; 465 } else { 466 tickEvent.schedule(curTick + cycles(1)); |
467 DPRINTF(O3CPU, "Scheduling next tick!\n"); |
468 } 469 } 470 471#if !FULL_SYSTEM 472 updateThreadPriority(); 473#endif 474 475} --- 42 unchanged lines hidden (view full) --- 518 519template <class Impl> 520void 521FullO3CPU<Impl>::activateThread(unsigned tid) 522{ 523 list<unsigned>::iterator isActive = find( 524 activeThreads.begin(), activeThreads.end(), tid); 525 |
526 DPRINTF(O3CPU, "[tid:%i]: Calling activate thread.\n", tid); 527 |
528 if (isActive == activeThreads.end()) { 529 DPRINTF(O3CPU, "[tid:%i]: Adding to active threads list\n", 530 tid); 531 532 activeThreads.push_back(tid); 533 } 534} 535 536template <class Impl> 537void 538FullO3CPU<Impl>::deactivateThread(unsigned tid) 539{ 540 //Remove From Active List, if Active 541 list<unsigned>::iterator thread_it = 542 find(activeThreads.begin(), activeThreads.end(), tid); 543 |
544 DPRINTF(O3CPU, "[tid:%i]: Calling deactivate thread.\n", tid); 545 |
546 if (thread_it != activeThreads.end()) { 547 DPRINTF(O3CPU,"[tid:%i]: Removing from active threads list\n", 548 tid); 549 activeThreads.erase(thread_it); 550 } 551} 552 553template <class Impl> --- 284 unchanged lines hidden (view full) --- 838 return 0; 839 } 840} 841 842template <class Impl> 843void 844FullO3CPU<Impl>::resume() 845{ |
846#if FULL_SYSTEM |
847 assert(system->getMemoryMode() == System::Timing); |
848#endif |
849 fetch.resume(); 850 decode.resume(); 851 rename.resume(); 852 iew.resume(); 853 commit.resume(); 854 855 changeState(SimObject::Running); 856 --- 585 unchanged lines hidden --- |