1/* 2 * Copyright (c) 2011-2012, 2014 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 --- 156 unchanged lines hidden (view full) --- 165 fetch(this, params), 166 decode(this, params), 167 rename(this, params), 168 iew(this, params), 169 commit(this, params), 170 171 regFile(params->numPhysIntRegs, 172 params->numPhysFloatRegs, |
173 params->numPhysCCRegs), |
174 175 freeList(name() + ".freelist", ®File), 176 177 rob(this, params), 178 179 scoreboard(name() + ".scoreboard", 180 regFile.totalNumPhysRegs(), TheISA::NumMiscRegs, 181 TheISA::ZeroReg, TheISA::ZeroReg), --- 82 unchanged lines hidden (view full) --- 264 "or edit your workload size."); 265 } 266 } 267 268 //Make Sure That this a Valid Architeture 269 assert(params->numPhysIntRegs >= numThreads * TheISA::NumIntRegs); 270 assert(params->numPhysFloatRegs >= numThreads * TheISA::NumFloatRegs); 271 assert(params->numPhysCCRegs >= numThreads * TheISA::NumCCRegs); |
272 273 rename.setScoreboard(&scoreboard); 274 iew.setScoreboard(&scoreboard); 275 276 // Setup the rename map for whichever stages need it. 277 for (ThreadID tid = 0; tid < numThreads; tid++) { 278 isa[tid] = params->isa[tid]; 279 --- 28 unchanged lines hidden (view full) --- 308 commitRenameMap[tid].setFloatEntry(ridx, phys_reg); 309 } 310 311 for (RegIndex ridx = 0; ridx < TheISA::NumCCRegs; ++ridx) { 312 PhysRegIndex phys_reg = freeList.getCCReg(); 313 renameMap[tid].setCCEntry(ridx, phys_reg); 314 commitRenameMap[tid].setCCEntry(ridx, phys_reg); 315 } |
316 } 317 318 rename.setRenameMap(renameMap); 319 commit.setRenameMap(commitRenameMap); 320 rename.setFreeList(&freeList); 321 322 // Setup the ROB for whichever stages need it. 323 commit.setROB(&rob); --- 192 unchanged lines hidden (view full) --- 516 .desc("number of cc regfile reads") 517 .prereq(ccRegfileReads); 518 519 ccRegfileWrites 520 .name(name() + ".cc_regfile_writes") 521 .desc("number of cc regfile writes") 522 .prereq(ccRegfileWrites); 523 |
524 miscRegfileReads 525 .name(name() + ".misc_regfile_reads") 526 .desc("number of misc regfile reads") 527 .prereq(miscRegfileReads); 528 529 miscRegfileWrites 530 .name(name() + ".misc_regfile_writes") 531 .desc("number of misc regfile writes") --- 270 unchanged lines hidden (view full) --- 802 for (int creg = TheISA::NumIntRegs + TheISA::NumFloatRegs; 803 creg < max_reg; creg++) { 804 PhysRegIndex phys_reg = freeList.getCCReg(); 805 806 renameMap[tid].setEntry(creg,phys_reg); 807 scoreboard.setReg(phys_reg); 808 } 809 |
810 //Copy Thread Data Into RegFile 811 //this->copyFromTC(tid); 812 813 //Set PC/NPC/NNPC 814 pcState(src_tc->pcState(), tid); 815 816 src_tc->setStatus(ThreadContext::Active); 817 --- 37 unchanged lines hidden (view full) --- 855 // Unbind condition-code Regs from Rename Map 856 max_reg = TheISA::CC_Reg_Base + TheISA::NumCCRegs; 857 for (int creg = TheISA::CC_Reg_Base; creg < max_reg; creg++) { 858 PhysRegIndex phys_reg = renameMap[tid].lookup(creg); 859 scoreboard.unsetReg(phys_reg); 860 freeList.addReg(phys_reg); 861 } 862 |
863 // Squash Throughout Pipeline 864 DynInstPtr inst = commit.rob->readHeadInst(tid); 865 InstSeqNum squash_seq_num = inst->seqNum; 866 fetch.squash(0, squash_seq_num, inst, tid); 867 decode.squash(tid); 868 rename.squash(squash_seq_num, tid); 869 iew.squash(tid); 870 iew.ldstQueue.squash(squash_seq_num, tid); --- 383 unchanged lines hidden (view full) --- 1254CCReg 1255FullO3CPU<Impl>::readCCReg(int reg_idx) 1256{ 1257 ccRegfileReads++; 1258 return regFile.readCCReg(reg_idx); 1259} 1260 1261template <class Impl> |
1262void 1263FullO3CPU<Impl>::setIntReg(int reg_idx, uint64_t val) 1264{ 1265 intRegfileWrites++; 1266 regFile.setIntReg(reg_idx, val); 1267} 1268 1269template <class Impl> --- 16 unchanged lines hidden (view full) --- 1286void 1287FullO3CPU<Impl>::setCCReg(int reg_idx, CCReg val) 1288{ 1289 ccRegfileWrites++; 1290 regFile.setCCReg(reg_idx, val); 1291} 1292 1293template <class Impl> |
1294uint64_t 1295FullO3CPU<Impl>::readArchIntReg(int reg_idx, ThreadID tid) 1296{ 1297 intRegfileReads++; 1298 PhysRegIndex phys_reg = commitRenameMap[tid].lookupInt(reg_idx); 1299 1300 return regFile.readIntReg(phys_reg); 1301} --- 24 unchanged lines hidden (view full) --- 1326{ 1327 ccRegfileReads++; 1328 PhysRegIndex phys_reg = commitRenameMap[tid].lookupCC(reg_idx); 1329 1330 return regFile.readCCReg(phys_reg); 1331} 1332 1333template <class Impl> |
1334void 1335FullO3CPU<Impl>::setArchIntReg(int reg_idx, uint64_t val, ThreadID tid) 1336{ 1337 intRegfileWrites++; 1338 PhysRegIndex phys_reg = commitRenameMap[tid].lookupInt(reg_idx); 1339 1340 regFile.setIntReg(phys_reg, val); 1341} --- 24 unchanged lines hidden (view full) --- 1366{ 1367 ccRegfileWrites++; 1368 PhysRegIndex phys_reg = commitRenameMap[tid].lookupCC(reg_idx); 1369 1370 regFile.setCCReg(phys_reg, val); 1371} 1372 1373template <class Impl> |
1374TheISA::PCState 1375FullO3CPU<Impl>::pcState(ThreadID tid) 1376{ 1377 return commit.pcState(tid); 1378} 1379 1380template <class Impl> 1381void --- 297 unchanged lines hidden --- |