base.hh (11148:1bc3d93c7eaa) base.hh (11150:a8a64cca231b)
1/*
2 * Copyright (c) 2011-2013 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

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

202 inline void workItemBegin() { numWorkItemsStarted++; }
203 inline void workItemEnd() { numWorkItemsCompleted++; }
204 // @todo remove me after debugging with legion done
205 Tick instCount() { return instCnt; }
206
207 TheISA::MicrocodeRom microcodeRom;
208
209 protected:
1/*
2 * Copyright (c) 2011-2013 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

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

202 inline void workItemBegin() { numWorkItemsStarted++; }
203 inline void workItemEnd() { numWorkItemsCompleted++; }
204 // @todo remove me after debugging with legion done
205 Tick instCount() { return instCnt; }
206
207 TheISA::MicrocodeRom microcodeRom;
208
209 protected:
210 TheISA::Interrupts *interrupts;
210 std::vector<TheISA::Interrupts*> interrupts;
211
212 public:
213 TheISA::Interrupts *
211
212 public:
213 TheISA::Interrupts *
214 getInterruptController()
214 getInterruptController(ThreadID tid)
215 {
215 {
216 return interrupts;
216 if (interrupts.empty())
217 return NULL;
218
219 assert(interrupts.size() > tid);
220 return interrupts[tid];
217 }
218
219 virtual void wakeup() = 0;
220
221 void
221 }
222
223 virtual void wakeup() = 0;
224
225 void
222 postInterrupt(int int_num, int index)
226 postInterrupt(ThreadID tid, int int_num, int index)
223 {
227 {
224 interrupts->post(int_num, index);
228 interrupts[tid]->post(int_num, index);
225 if (FullSystem)
226 wakeup();
227 }
228
229 void
229 if (FullSystem)
230 wakeup();
231 }
232
233 void
230 clearInterrupt(int int_num, int index)
234 clearInterrupt(ThreadID tid, int int_num, int index)
231 {
235 {
232 interrupts->clear(int_num, index);
236 interrupts[tid]->clear(int_num, index);
233 }
234
235 void
237 }
238
239 void
236 clearInterrupts()
240 clearInterrupts(ThreadID tid)
237 {
241 {
238 interrupts->clearAll();
242 interrupts[tid]->clearAll();
239 }
240
241 bool
242 checkInterrupts(ThreadContext *tc) const
243 {
243 }
244
245 bool
246 checkInterrupts(ThreadContext *tc) const
247 {
244 return FullSystem && interrupts->checkInterrupts(tc);
248 return FullSystem && interrupts[tc->threadId()]->checkInterrupts(tc);
245 }
246
247 class ProfileEvent : public Event
248 {
249 private:
250 BaseCPU *cpu;
251 Tick interval;
252

--- 325 unchanged lines hidden ---
249 }
250
251 class ProfileEvent : public Event
252 {
253 private:
254 BaseCPU *cpu;
255 Tick interval;
256

--- 325 unchanged lines hidden ---