cpu.cc (11793:ef606668d247) cpu.cc (12276:22c220be30c5)
1/*
1/*
2 * Copyright (c) 2012-2014 ARM Limited
2 * Copyright (c) 2012-2014, 2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

190 threads[tid]->startup();
191 pipeline->wakeupFetch(tid);
192 }
193}
194
195DrainState
196MinorCPU::drain()
197{
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

190 threads[tid]->startup();
191 pipeline->wakeupFetch(tid);
192 }
193}
194
195DrainState
196MinorCPU::drain()
197{
198 // Deschedule any power gating event (if any)
199 deschedulePowerGatingEvent();
200
198 if (switchedOut()) {
199 DPRINTF(Drain, "Minor CPU switched out, draining not needed.\n");
200 return DrainState::Drained;
201 }
202
203 DPRINTF(Drain, "MinorCPU drain\n");
204
205 /* Need to suspend all threads and wait for Execute to idle.

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

235
236 DPRINTF(Drain, "MinorCPU drainResume\n");
237
238 if (!system->isTimingMode()) {
239 fatal("The Minor CPU requires the memory system to be in "
240 "'timing' mode.\n");
241 }
242
201 if (switchedOut()) {
202 DPRINTF(Drain, "Minor CPU switched out, draining not needed.\n");
203 return DrainState::Drained;
204 }
205
206 DPRINTF(Drain, "MinorCPU drain\n");
207
208 /* Need to suspend all threads and wait for Execute to idle.

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

238
239 DPRINTF(Drain, "MinorCPU drainResume\n");
240
241 if (!system->isTimingMode()) {
242 fatal("The Minor CPU requires the memory system to be in "
243 "'timing' mode.\n");
244 }
245
243 for (ThreadID tid = 0; tid < numThreads; tid++)
246 for (ThreadID tid = 0; tid < numThreads; tid++){
244 wakeup(tid);
247 wakeup(tid);
248 }
245
246 pipeline->drainResume();
249
250 pipeline->drainResume();
251
252 // Reschedule any power gating event (if any)
253 schedulePowerGatingEvent();
247}
248
249void
250MinorCPU::memWriteback()
251{
252 DPRINTF(Drain, "MinorCPU memWriteback\n");
253}
254

--- 96 unchanged lines hidden ---
254}
255
256void
257MinorCPU::memWriteback()
258{
259 DPRINTF(Drain, "MinorCPU memWriteback\n");
260}
261

--- 96 unchanged lines hidden ---