base.cc (8850:ed91b534ed04) base.cc (8876:44f8e7bb7fdf)
1/*
2 * Copyright (c) 2011 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

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

113}
114
115const char *
116CPUProgressEvent::description() const
117{
118 return "CPU Progress";
119}
120
1/*
2 * Copyright (c) 2011 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

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

113}
114
115const char *
116CPUProgressEvent::description() const
117{
118 return "CPU Progress";
119}
120
121BaseCPU::BaseCPU(Params *p)
121BaseCPU::BaseCPU(Params *p, bool is_checker)
122 : MemObject(p), clock(p->clock), instCnt(0), _cpuId(p->cpu_id),
123 _instMasterId(p->system->getMasterId(name() + ".inst")),
124 _dataMasterId(p->system->getMasterId(name() + ".data")),
125 interrupts(p->interrupts),
126 numThreads(p->numThreads), system(p->system),
127 phase(p->phase)
128{
129// currentTick = curTick();

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

214 if (p->function_trace_start == 0) {
215 functionTracingEnabled = true;
216 } else {
217 typedef EventWrapper<BaseCPU, &BaseCPU::enableFunctionTrace> wrap;
218 Event *event = new wrap(this, true);
219 schedule(event, p->function_trace_start);
220 }
221 }
122 : MemObject(p), clock(p->clock), instCnt(0), _cpuId(p->cpu_id),
123 _instMasterId(p->system->getMasterId(name() + ".inst")),
124 _dataMasterId(p->system->getMasterId(name() + ".data")),
125 interrupts(p->interrupts),
126 numThreads(p->numThreads), system(p->system),
127 phase(p->phase)
128{
129// currentTick = curTick();

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

214 if (p->function_trace_start == 0) {
215 functionTracingEnabled = true;
216 } else {
217 typedef EventWrapper<BaseCPU, &BaseCPU::enableFunctionTrace> wrap;
218 Event *event = new wrap(this, true);
219 schedule(event, p->function_trace_start);
220 }
221 }
222 // Check if CPU model has interrupts connected. The CheckerCPU
223 // cannot take interrupts directly for example.
224 if (interrupts)
225 interrupts->setCPU(this);
226
222
223 // The interrupts should always be present unless this CPU is
224 // switched in later or in case it is a checker CPU
225 if (!params()->defer_registration && !is_checker) {
226 if (interrupts) {
227 interrupts->setCPU(this);
228 } else {
229 fatal("CPU %s has no interrupt controller.\n"
230 "Ensure createInterruptController() is called.\n", name());
231 }
232 }
233
227 if (FullSystem) {
228 profileEvent = NULL;
229 if (params()->profile)
230 profileEvent = new ProfileEvent(this, params()->profile);
231 }
232 tracer = params()->tracer;
233}
234

--- 339 unchanged lines hidden ---
234 if (FullSystem) {
235 profileEvent = NULL;
236 if (params()->profile)
237 profileEvent = new ProfileEvent(this, params()->profile);
238 }
239 tracer = params()->tracer;
240}
241

--- 339 unchanged lines hidden ---