atomic.cc (9342:6fec8f26e56d) atomic.cc (9424:d631aac65246)
1/*
2 * Copyright (c) 2012 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

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

78 return "AtomicSimpleCPU tick";
79}
80
81void
82AtomicSimpleCPU::init()
83{
84 BaseCPU::init();
85
1/*
2 * Copyright (c) 2012 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

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

78 return "AtomicSimpleCPU tick";
79}
80
81void
82AtomicSimpleCPU::init()
83{
84 BaseCPU::init();
85
86 if (!params()->defer_registration &&
87 system->getMemoryMode() != Enums::atomic) {
88 fatal("The atomic CPU requires the memory system to be in "
89 "'atomic' mode.\n");
90 }
91
86 // Initialise the ThreadContext's memory proxies
87 tcBase()->initMemProxies(tcBase());
88
89 if (FullSystem && !params()->defer_registration) {
90 ThreadID size = threadContexts.size();
91 for (ThreadID i = 0; i < size; ++i) {
92 ThreadContext *tc = threadContexts[i];
93 // initialize CPU, including PC

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

150
151void
152AtomicSimpleCPU::drainResume()
153{
154 if (_status == Idle || _status == SwitchedOut)
155 return;
156
157 DPRINTF(SimpleCPU, "Resume\n");
92 // Initialise the ThreadContext's memory proxies
93 tcBase()->initMemProxies(tcBase());
94
95 if (FullSystem && !params()->defer_registration) {
96 ThreadID size = threadContexts.size();
97 for (ThreadID i = 0; i < size; ++i) {
98 ThreadContext *tc = threadContexts[i];
99 // initialize CPU, including PC

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

156
157void
158AtomicSimpleCPU::drainResume()
159{
160 if (_status == Idle || _status == SwitchedOut)
161 return;
162
163 DPRINTF(SimpleCPU, "Resume\n");
158 assert(system->getMemoryMode() == Enums::atomic);
164 if (system->getMemoryMode() != Enums::atomic) {
165 fatal("The atomic CPU requires the memory system to be in "
166 "'atomic' mode.\n");
167 }
159
160 setDrainState(Drainable::Running);
161 if (thread->status() == ThreadContext::Active) {
162 if (!tickEvent.scheduled())
163 schedule(tickEvent, nextCycle());
164 }
165 system->totalNumInsts = 0;
166}

--- 402 unchanged lines hidden ---
168
169 setDrainState(Drainable::Running);
170 if (thread->status() == ThreadContext::Active) {
171 if (!tickEvent.scheduled())
172 schedule(tickEvent, nextCycle());
173 }
174 system->totalNumInsts = 0;
175}

--- 402 unchanged lines hidden ---