cpu.cc (12276:22c220be30c5) | cpu.cc (12284:b91c036913da) |
---|---|
1/* 2 * Copyright (c) 2011-2012, 2014, 2016, 2017 ARM Limited 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 554 unchanged lines hidden (view full) --- 563void 564FullO3CPU<Impl>::tick() 565{ 566 DPRINTF(O3CPU, "\n\nFullO3CPU: Ticking main, FullO3CPU.\n"); 567 assert(!switchedOut()); 568 assert(drainState() != DrainState::Drained); 569 570 ++numCycles; | 1/* 2 * Copyright (c) 2011-2012, 2014, 2016, 2017 ARM Limited 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 554 unchanged lines hidden (view full) --- 563void 564FullO3CPU<Impl>::tick() 565{ 566 DPRINTF(O3CPU, "\n\nFullO3CPU: Ticking main, FullO3CPU.\n"); 567 assert(!switchedOut()); 568 assert(drainState() != DrainState::Drained); 569 570 ++numCycles; |
571 ppCycles->notify(1); | 571 updateCycleCounters(BaseCPU::CPU_STATE_ON); |
572 573// activity = false; 574 575 //Tick each of the stages 576 fetch.tick(); 577 578 decode.tick(); 579 --- 211 unchanged lines hidden (view full) --- 791FullO3CPU<Impl>::haltContext(ThreadID tid) 792{ 793 //For now, this is the same as deallocate 794 DPRINTF(O3CPU,"[tid:%i]: Halt Context called. Deallocating", tid); 795 assert(!switchedOut()); 796 797 deactivateThread(tid); 798 removeThread(tid); | 572 573// activity = false; 574 575 //Tick each of the stages 576 fetch.tick(); 577 578 decode.tick(); 579 --- 211 unchanged lines hidden (view full) --- 791FullO3CPU<Impl>::haltContext(ThreadID tid) 792{ 793 //For now, this is the same as deallocate 794 DPRINTF(O3CPU,"[tid:%i]: Halt Context called. Deallocating", tid); 795 assert(!switchedOut()); 796 797 deactivateThread(tid); 798 removeThread(tid); |
799 800 updateCycleCounters(BaseCPU::CPU_STATE_SLEEP); |
|
799} 800 801template <class Impl> 802void 803FullO3CPU<Impl>::insertThread(ThreadID tid) 804{ 805 DPRINTF(O3CPU,"[tid:%i] Initializing thread into CPU"); 806 // Will change now that the PC and thread state is internal to the CPU --- 959 unchanged lines hidden (view full) --- 1766 DPRINTF(Activity, "Waking up CPU\n"); 1767 1768 Cycles cycles(curCycle() - lastRunningCycle); 1769 // @todo: This is an oddity that is only here to match the stats 1770 if (cycles > 1) { 1771 --cycles; 1772 idleCycles += cycles; 1773 numCycles += cycles; | 801} 802 803template <class Impl> 804void 805FullO3CPU<Impl>::insertThread(ThreadID tid) 806{ 807 DPRINTF(O3CPU,"[tid:%i] Initializing thread into CPU"); 808 // Will change now that the PC and thread state is internal to the CPU --- 959 unchanged lines hidden (view full) --- 1768 DPRINTF(Activity, "Waking up CPU\n"); 1769 1770 Cycles cycles(curCycle() - lastRunningCycle); 1771 // @todo: This is an oddity that is only here to match the stats 1772 if (cycles > 1) { 1773 --cycles; 1774 idleCycles += cycles; 1775 numCycles += cycles; |
1774 ppCycles->notify(cycles); | |
1775 } 1776 1777 schedule(tickEvent, clockEdge()); 1778} 1779 1780template <class Impl> 1781void 1782FullO3CPU<Impl>::wakeup(ThreadID tid) --- 43 unchanged lines hidden --- | 1776 } 1777 1778 schedule(tickEvent, clockEdge()); 1779} 1780 1781template <class Impl> 1782void 1783FullO3CPU<Impl>::wakeup(ThreadID tid) --- 43 unchanged lines hidden --- |