iew_impl.hh (10240:15f822e9410a) | iew_impl.hh (10327:5b6279635c49) |
---|---|
1/* 2 * Copyright (c) 2010-2013 ARM Limited 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 62 unchanged lines hidden (view full) --- 71 instQueue(_cpu, this, params), 72 ldstQueue(_cpu, this, params), 73 fuPool(params->fuPool), 74 commitToIEWDelay(params->commitToIEWDelay), 75 renameToIEWDelay(params->renameToIEWDelay), 76 issueToExecuteDelay(params->issueToExecuteDelay), 77 dispatchWidth(params->dispatchWidth), 78 issueWidth(params->issueWidth), | 1/* 2 * Copyright (c) 2010-2013 ARM Limited 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 62 unchanged lines hidden (view full) --- 71 instQueue(_cpu, this, params), 72 ldstQueue(_cpu, this, params), 73 fuPool(params->fuPool), 74 commitToIEWDelay(params->commitToIEWDelay), 75 renameToIEWDelay(params->renameToIEWDelay), 76 issueToExecuteDelay(params->issueToExecuteDelay), 77 dispatchWidth(params->dispatchWidth), 78 issueWidth(params->issueWidth), |
79 wbOutstanding(0), | |
80 wbWidth(params->wbWidth), 81 numThreads(params->numThreads) 82{ 83 if (dispatchWidth > Impl::MaxWidth) 84 fatal("dispatchWidth (%d) is larger than compiled limit (%d),\n" 85 "\tincrease MaxWidth in src/cpu/o3/impl.hh\n", 86 dispatchWidth, static_cast<int>(Impl::MaxWidth)); 87 if (issueWidth > Impl::MaxWidth) --- 16 unchanged lines hidden (view full) --- 104 instQueue.setIssueToExecuteQueue(&issueToExecQueue); 105 106 for (ThreadID tid = 0; tid < numThreads; tid++) { 107 dispatchStatus[tid] = Running; 108 stalls[tid].commit = false; 109 fetchRedirect[tid] = false; 110 } 111 | 79 wbWidth(params->wbWidth), 80 numThreads(params->numThreads) 81{ 82 if (dispatchWidth > Impl::MaxWidth) 83 fatal("dispatchWidth (%d) is larger than compiled limit (%d),\n" 84 "\tincrease MaxWidth in src/cpu/o3/impl.hh\n", 85 dispatchWidth, static_cast<int>(Impl::MaxWidth)); 86 if (issueWidth > Impl::MaxWidth) --- 16 unchanged lines hidden (view full) --- 103 instQueue.setIssueToExecuteQueue(&issueToExecQueue); 104 105 for (ThreadID tid = 0; tid < numThreads; tid++) { 106 dispatchStatus[tid] = Running; 107 stalls[tid].commit = false; 108 fetchRedirect[tid] = false; 109 } 110 |
112 wbMax = wbWidth * params->wbDepth; 113 | |
114 updateLSQNextCycle = false; 115 | 111 updateLSQNextCycle = false; 112 |
116 ableToIssue = true; 117 | |
118 skidBufferMax = (3 * (renameToIEWDelay * params->renameWidth)) + issueWidth; 119} 120 121template <class Impl> 122std::string 123DefaultIEW<Impl>::name() const 124{ 125 return cpu->name() + ".iew"; --- 504 unchanged lines hidden (view full) --- 630 // keep looking back to see where's the first time there's a 631 // free slot. 632 while ((*iewQueue)[wbCycle].insts[wbNumInst]) { 633 ++wbNumInst; 634 if (wbNumInst == wbWidth) { 635 ++wbCycle; 636 wbNumInst = 0; 637 } | 113 skidBufferMax = (3 * (renameToIEWDelay * params->renameWidth)) + issueWidth; 114} 115 116template <class Impl> 117std::string 118DefaultIEW<Impl>::name() const 119{ 120 return cpu->name() + ".iew"; --- 504 unchanged lines hidden (view full) --- 625 // keep looking back to see where's the first time there's a 626 // free slot. 627 while ((*iewQueue)[wbCycle].insts[wbNumInst]) { 628 ++wbNumInst; 629 if (wbNumInst == wbWidth) { 630 ++wbCycle; 631 wbNumInst = 0; 632 } |
638 639 assert((wbCycle * wbWidth + wbNumInst) <= wbMax); | |
640 } 641 642 DPRINTF(IEW, "Current wb cycle: %i, width: %i, numInst: %i\nwbActual:%i\n", 643 wbCycle, wbWidth, wbNumInst, wbCycle * wbWidth + wbNumInst); 644 // Add finished instruction to queue to commit. 645 (*iewQueue)[wbCycle].insts[wbNumInst] = inst; 646 (*iewQueue)[wbCycle].size++; 647} --- 610 unchanged lines hidden (view full) --- 1258 inst->setExecuted(); 1259 1260 // Not sure if I should set this here or just let commit try to 1261 // commit any squashed instructions. I like the latter a bit more. 1262 inst->setCanCommit(); 1263 1264 ++iewExecSquashedInsts; 1265 | 633 } 634 635 DPRINTF(IEW, "Current wb cycle: %i, width: %i, numInst: %i\nwbActual:%i\n", 636 wbCycle, wbWidth, wbNumInst, wbCycle * wbWidth + wbNumInst); 637 // Add finished instruction to queue to commit. 638 (*iewQueue)[wbCycle].insts[wbNumInst] = inst; 639 (*iewQueue)[wbCycle].size++; 640} --- 610 unchanged lines hidden (view full) --- 1251 inst->setExecuted(); 1252 1253 // Not sure if I should set this here or just let commit try to 1254 // commit any squashed instructions. I like the latter a bit more. 1255 inst->setCanCommit(); 1256 1257 ++iewExecSquashedInsts; 1258 |
1266 decrWb(inst->seqNum); | |
1267 continue; 1268 } 1269 1270 Fault fault = NoFault; 1271 1272 // Execute instruction. 1273 // Note that if the instruction faults, it will be handled 1274 // at the commit stage. --- 222 unchanged lines hidden (view full) --- 1497 } 1498 1499 if (dependents) { 1500 producerInst[tid]++; 1501 consumerInst[tid]+= dependents; 1502 } 1503 writebackCount[tid]++; 1504 } | 1259 continue; 1260 } 1261 1262 Fault fault = NoFault; 1263 1264 // Execute instruction. 1265 // Note that if the instruction faults, it will be handled 1266 // at the commit stage. --- 222 unchanged lines hidden (view full) --- 1489 } 1490 1491 if (dependents) { 1492 producerInst[tid]++; 1493 consumerInst[tid]+= dependents; 1494 } 1495 writebackCount[tid]++; 1496 } |
1505 1506 decrWb(inst->seqNum); | |
1507 } 1508} 1509 1510template<class Impl> 1511void 1512DefaultIEW<Impl>::tick() 1513{ 1514 wbNumInst = 0; --- 186 unchanged lines hidden --- | 1497 } 1498} 1499 1500template<class Impl> 1501void 1502DefaultIEW<Impl>::tick() 1503{ 1504 wbNumInst = 0; --- 186 unchanged lines hidden --- |