atomic.cc (12276:22c220be30c5) atomic.cc (12284:b91c036913da)
1/*
2 * Copyright 2014 Google, Inc.
3 * Copyright (c) 2012-2013,2015,2017 ARM Limited
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

--- 214 unchanged lines hidden (view full) ---

223 DPRINTF(SimpleCPU, "ActivateContext %d\n", thread_num);
224
225 assert(thread_num < numThreads);
226
227 threadInfo[thread_num]->notIdleFraction = 1;
228 Cycles delta = ticksToCycles(threadInfo[thread_num]->thread->lastActivate -
229 threadInfo[thread_num]->thread->lastSuspend);
230 numCycles += delta;
1/*
2 * Copyright 2014 Google, Inc.
3 * Copyright (c) 2012-2013,2015,2017 ARM Limited
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

--- 214 unchanged lines hidden (view full) ---

223 DPRINTF(SimpleCPU, "ActivateContext %d\n", thread_num);
224
225 assert(thread_num < numThreads);
226
227 threadInfo[thread_num]->notIdleFraction = 1;
228 Cycles delta = ticksToCycles(threadInfo[thread_num]->thread->lastActivate -
229 threadInfo[thread_num]->thread->lastSuspend);
230 numCycles += delta;
231 ppCycles->notify(delta);
232
233 if (!tickEvent.scheduled()) {
234 //Make sure ticks are still on multiples of cycles
235 schedule(tickEvent, clockEdge(Cycles(0)));
236 }
237 _status = BaseSimpleCPU::Running;
238 if (std::find(activeThreads.begin(), activeThreads.end(), thread_num)
239 == activeThreads.end()) {

--- 317 unchanged lines hidden (view full) ---

557
558 SimpleExecContext& t_info = *threadInfo[curThread];
559 SimpleThread* thread = t_info.thread;
560
561 Tick latency = 0;
562
563 for (int i = 0; i < width || locked; ++i) {
564 numCycles++;
231
232 if (!tickEvent.scheduled()) {
233 //Make sure ticks are still on multiples of cycles
234 schedule(tickEvent, clockEdge(Cycles(0)));
235 }
236 _status = BaseSimpleCPU::Running;
237 if (std::find(activeThreads.begin(), activeThreads.end(), thread_num)
238 == activeThreads.end()) {

--- 317 unchanged lines hidden (view full) ---

556
557 SimpleExecContext& t_info = *threadInfo[curThread];
558 SimpleThread* thread = t_info.thread;
559
560 Tick latency = 0;
561
562 for (int i = 0; i < width || locked; ++i) {
563 numCycles++;
565 ppCycles->notify(1);
564 updateCycleCounters(BaseCPU::CPU_STATE_ON);
566
567 if (!curStaticInst || !curStaticInst->isDelayedCommit()) {
568 checkForInterrupts();
569 checkPcEventQueue();
570 }
571
572 // We must have just got suspended by a PC event
573 if (_status == Idle) {

--- 131 unchanged lines hidden ---
565
566 if (!curStaticInst || !curStaticInst->isDelayedCommit()) {
567 checkForInterrupts();
568 checkPcEventQueue();
569 }
570
571 // We must have just got suspended by a PC event
572 if (_status == Idle) {

--- 131 unchanged lines hidden ---