Deleted Added
sdiff udiff text old ( 9184:a1a8f137b796 ) new ( 9444:ab47fe7f03f0 )
full compact
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

88 numEntries(params->numIQEntries),
89 totalWidth(params->issueWidth),
90 numPhysIntRegs(params->numPhysIntRegs),
91 numPhysFloatRegs(params->numPhysFloatRegs),
92 commitToIEWDelay(params->commitToIEWDelay)
93{
94 assert(fuPool);
95
96 switchedOut = false;
97
98 numThreads = params->numThreads;
99
100 // Set the number of physical registers as the number of int + float
101 numPhysRegs = numPhysIntRegs + numPhysFloatRegs;
102
103 //Create an entry for each physical register within the
104 //dependency graph.
105 dependGraph.resize(numPhysRegs);

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

434{
435 timeBuffer = tb_ptr;
436
437 fromCommit = timeBuffer->getWire(-commitToIEWDelay);
438}
439
440template <class Impl>
441void
442InstructionQueue<Impl>::switchOut()
443{
444/*
445 if (!instList[0].empty() || (numEntries != freeEntries) ||
446 !readyInsts[0].empty() || !nonSpecInsts.empty() || !listOrder.empty()) {
447 dumpInsts();
448// assert(0);
449 }
450*/
451 resetState();
452 dependGraph.reset();
453 instsToExecute.clear();
454 switchedOut = true;
455 for (ThreadID tid = 0; tid < numThreads; ++tid) {
456 memDepUnit[tid].switchOut();
457 }
458}
459
460template <class Impl>
461void
462InstructionQueue<Impl>::takeOverFrom()
463{
464 switchedOut = false;
465}
466
467template <class Impl>
468int
469InstructionQueue<Impl>::entryAmount(ThreadID num_threads)
470{
471 if (iqPolicy == Partitioned) {
472 return numEntries / num_threads;

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

711 readyIt[op_class] = listOrder.insert(next_it, queue_entry);
712}
713
714template <class Impl>
715void
716InstructionQueue<Impl>::processFUCompletion(DynInstPtr &inst, int fu_idx)
717{
718 DPRINTF(IQ, "Processing FU completion [sn:%lli]\n", inst->seqNum);
719 // The CPU could have been sleeping until this op completed (*extremely*
720 // long latency op). Wake it if it was. This may be overkill.
721 if (isSwitchedOut()) {
722 DPRINTF(IQ, "FU completion not processed, IQ is switched out [sn:%lli]\n",
723 inst->seqNum);
724 return;
725 }
726
727 iewStage->wakeCPU();
728
729 if (fu_idx > -1)
730 fuPool->freeUnitNextCycle(fu_idx);
731
732 // @todo: Ensure that these FU Completions happen at the beginning
733 // of a cycle, otherwise they could add too many instructions to
734 // the queue.

--- 793 unchanged lines hidden ---