cpu.cc (3221:669a04468c0d) | cpu.cc (3226:de4981baa276) |
---|---|
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) { | 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"); |
|
458 // increment stat 459 lastRunningCycle = curTick; 460 } else if (!activityRec.active() || _status == Idle) { | 459 // increment stat 460 lastRunningCycle = curTick; 461 } else if (!activityRec.active() || _status == Idle) { |
462 DPRINTF(O3CPU, "Idle!\n"); |
|
461 lastRunningCycle = curTick; 462 timesIdled++; 463 } else { 464 tickEvent.schedule(curTick + cycles(1)); | 463 lastRunningCycle = curTick; 464 timesIdled++; 465 } else { 466 tickEvent.schedule(curTick + cycles(1)); |
467 DPRINTF(O3CPU, "Scheduling next tick!\n"); |
|
465 } 466 } 467 468#if !FULL_SYSTEM 469 updateThreadPriority(); 470#endif 471 472} --- 42 unchanged lines hidden (view full) --- 515 516template <class Impl> 517void 518FullO3CPU<Impl>::activateThread(unsigned tid) 519{ 520 list<unsigned>::iterator isActive = find( 521 activeThreads.begin(), activeThreads.end(), tid); 522 | 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 |
|
523 if (isActive == activeThreads.end()) { 524 DPRINTF(O3CPU, "[tid:%i]: Adding to active threads list\n", 525 tid); 526 527 activeThreads.push_back(tid); 528 } 529} 530 531template <class Impl> 532void 533FullO3CPU<Impl>::deactivateThread(unsigned tid) 534{ 535 //Remove From Active List, if Active 536 list<unsigned>::iterator thread_it = 537 find(activeThreads.begin(), activeThreads.end(), tid); 538 | 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 |
|
539 if (thread_it != activeThreads.end()) { 540 DPRINTF(O3CPU,"[tid:%i]: Removing from active threads list\n", 541 tid); 542 activeThreads.erase(thread_it); 543 } 544} 545 546template <class Impl> --- 284 unchanged lines hidden (view full) --- 831 return 0; 832 } 833} 834 835template <class Impl> 836void 837FullO3CPU<Impl>::resume() 838{ | 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 |
|
839 assert(system->getMemoryMode() == System::Timing); | 847 assert(system->getMemoryMode() == System::Timing); |
848#endif |
|
840 fetch.resume(); 841 decode.resume(); 842 rename.resume(); 843 iew.resume(); 844 commit.resume(); 845 846 changeState(SimObject::Running); 847 --- 585 unchanged lines hidden --- | 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 --- |