iew.hh (10023:91faf6649de0) iew.hh (10327:5b6279635c49)
1/*
2 * Copyright (c) 2010-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

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

214 inline void deactivateStage();
215
216 /** Returns if the LSQ has any stores to writeback. */
217 bool hasStoresToWB() { return ldstQueue.hasStoresToWB(); }
218
219 /** Returns if the LSQ has any stores to writeback. */
220 bool hasStoresToWB(ThreadID tid) { return ldstQueue.hasStoresToWB(tid); }
221
1/*
2 * Copyright (c) 2010-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

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

214 inline void deactivateStage();
215
216 /** Returns if the LSQ has any stores to writeback. */
217 bool hasStoresToWB() { return ldstQueue.hasStoresToWB(); }
218
219 /** Returns if the LSQ has any stores to writeback. */
220 bool hasStoresToWB(ThreadID tid) { return ldstQueue.hasStoresToWB(tid); }
221
222 void incrWb(InstSeqNum &sn)
223 {
224 ++wbOutstanding;
225 if (wbOutstanding == wbMax)
226 ableToIssue = false;
227 DPRINTF(IEW, "wbOutstanding: %i [sn:%lli]\n", wbOutstanding, sn);
228 assert(wbOutstanding <= wbMax);
229#ifdef DEBUG
230 wbList.insert(sn);
231#endif
232 }
233
234 void decrWb(InstSeqNum &sn)
235 {
236 if (wbOutstanding == wbMax)
237 ableToIssue = true;
238 wbOutstanding--;
239 DPRINTF(IEW, "wbOutstanding: %i [sn:%lli]\n", wbOutstanding, sn);
240 assert(wbOutstanding >= 0);
241#ifdef DEBUG
242 assert(wbList.find(sn) != wbList.end());
243 wbList.erase(sn);
244#endif
245 }
246
247#ifdef DEBUG
248 std::set<InstSeqNum> wbList;
249
250 void dumpWb()
251 {
252 std::set<InstSeqNum>::iterator wb_it = wbList.begin();
253 while (wb_it != wbList.end()) {
254 cprintf("[sn:%lli]\n",
255 (*wb_it));
256 wb_it++;
257 }
258 }
259#endif
260
261 bool canIssue() { return ableToIssue; }
262
263 bool ableToIssue;
264
265 /** Check misprediction */
266 void checkMisprediction(DynInstPtr &inst);
267
268 private:
269 /** Sends commit proper information for a squash due to a branch
270 * mispredict.
271 */
272 void squashDueToBranch(DynInstPtr &inst, ThreadID tid);

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

447
448 /** Cycle number within the queue of instructions being written back.
449 * Used in case there are too many instructions writing back at the current
450 * cycle and writesbacks need to be scheduled for the future. See comments
451 * in instToCommit().
452 */
453 unsigned wbCycle;
454
222 /** Check misprediction */
223 void checkMisprediction(DynInstPtr &inst);
224
225 private:
226 /** Sends commit proper information for a squash due to a branch
227 * mispredict.
228 */
229 void squashDueToBranch(DynInstPtr &inst, ThreadID tid);

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

404
405 /** Cycle number within the queue of instructions being written back.
406 * Used in case there are too many instructions writing back at the current
407 * cycle and writesbacks need to be scheduled for the future. See comments
408 * in instToCommit().
409 */
410 unsigned wbCycle;
411
455 /** Number of instructions in flight that will writeback. */
456
457 /** Number of instructions in flight that will writeback. */
458 int wbOutstanding;
459
460 /** Writeback width. */
461 unsigned wbWidth;
462
412 /** Writeback width. */
413 unsigned wbWidth;
414
463 /** Writeback width * writeback depth, where writeback depth is
464 * the number of cycles of writing back instructions that can be
465 * buffered. */
466 unsigned wbMax;
467
468 /** Number of active threads. */
469 ThreadID numThreads;
470
471 /** Pointer to list of active threads. */
472 std::list<ThreadID> *activeThreads;
473
474 /** Maximum size of the skid buffer. */
475 unsigned skidBufferMax;

--- 74 unchanged lines hidden ---
415 /** Number of active threads. */
416 ThreadID numThreads;
417
418 /** Pointer to list of active threads. */
419 std::list<ThreadID> *activeThreads;
420
421 /** Maximum size of the skid buffer. */
422 unsigned skidBufferMax;

--- 74 unchanged lines hidden ---