rename_impl.hh (3773:61c53465193d) | rename_impl.hh (3788:5c804ea5cc48) |
---|---|
1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 29 unchanged lines hidden (view full) --- 38 39template <class Impl> 40DefaultRename<Impl>::DefaultRename(Params *params) 41 : iewToRenameDelay(params->iewToRenameDelay), 42 decodeToRenameDelay(params->decodeToRenameDelay), 43 commitToRenameDelay(params->commitToRenameDelay), 44 renameWidth(params->renameWidth), 45 commitWidth(params->commitWidth), | 1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 29 unchanged lines hidden (view full) --- 38 39template <class Impl> 40DefaultRename<Impl>::DefaultRename(Params *params) 41 : iewToRenameDelay(params->iewToRenameDelay), 42 decodeToRenameDelay(params->decodeToRenameDelay), 43 commitToRenameDelay(params->commitToRenameDelay), 44 renameWidth(params->renameWidth), 45 commitWidth(params->commitWidth), |
46 resumeSerialize(false), |
|
46 numThreads(params->numberOfThreads), 47 maxPhysicalRegs(params->numPhysIntRegs + params->numPhysFloatRegs) 48{ 49 _status = Inactive; 50 51 for (int i=0; i< numThreads; i++) { 52 renameStatus[i] = Idle; 53 --- 275 unchanged lines hidden (view full) --- 329DefaultRename<Impl>::squash(const InstSeqNum &squash_seq_num, unsigned tid) 330{ 331 DPRINTF(Rename, "[tid:%u]: Squashing instructions.\n",tid); 332 333 // Clear the stall signal if rename was blocked or unblocking before. 334 // If it still needs to block, the blocking should happen the next 335 // cycle and there should be space to hold everything due to the squash. 336 if (renameStatus[tid] == Blocked || | 47 numThreads(params->numberOfThreads), 48 maxPhysicalRegs(params->numPhysIntRegs + params->numPhysFloatRegs) 49{ 50 _status = Inactive; 51 52 for (int i=0; i< numThreads; i++) { 53 renameStatus[i] = Idle; 54 --- 275 unchanged lines hidden (view full) --- 330DefaultRename<Impl>::squash(const InstSeqNum &squash_seq_num, unsigned tid) 331{ 332 DPRINTF(Rename, "[tid:%u]: Squashing instructions.\n",tid); 333 334 // Clear the stall signal if rename was blocked or unblocking before. 335 // If it still needs to block, the blocking should happen the next 336 // cycle and there should be space to hold everything due to the squash. 337 if (renameStatus[tid] == Blocked || |
337 renameStatus[tid] == Unblocking || 338 renameStatus[tid] == SerializeStall) { 339 | 338 renameStatus[tid] == Unblocking) { |
340 toDecode->renameUnblock[tid] = 1; 341 | 339 toDecode->renameUnblock[tid] = 1; 340 |
341 resumeSerialize = false; |
|
342 serializeInst[tid] = NULL; | 342 serializeInst[tid] = NULL; |
343 } else if (renameStatus[tid] == SerializeStall) { 344 if (serializeInst[tid]->seqNum <= squash_seq_num) { 345 DPRINTF(Rename, "Rename will resume serializing after squash\n"); 346 resumeSerialize = true; 347 assert(serializeInst[tid]); 348 } else { 349 resumeSerialize = false; 350 toDecode->renameUnblock[tid] = 1; 351 352 serializeInst[tid] = NULL; 353 } |
|
343 } 344 345 // Set the status to Squashing. 346 renameStatus[tid] = Squashing; 347 348 // Squash any instructions from decode. 349 unsigned squashCount = 0; 350 --- 121 unchanged lines hidden (view full) --- 472 // check if stall conditions have passed 473 474 if (renameStatus[tid] == Blocked) { 475 ++renameBlockCycles; 476 } else if (renameStatus[tid] == Squashing) { 477 ++renameSquashCycles; 478 } else if (renameStatus[tid] == SerializeStall) { 479 ++renameSerializeStallCycles; | 354 } 355 356 // Set the status to Squashing. 357 renameStatus[tid] = Squashing; 358 359 // Squash any instructions from decode. 360 unsigned squashCount = 0; 361 --- 121 unchanged lines hidden (view full) --- 483 // check if stall conditions have passed 484 485 if (renameStatus[tid] == Blocked) { 486 ++renameBlockCycles; 487 } else if (renameStatus[tid] == Squashing) { 488 ++renameSquashCycles; 489 } else if (renameStatus[tid] == SerializeStall) { 490 ++renameSerializeStallCycles; |
491 // If we are currently in SerializeStall and resumeSerialize 492 // was set, then that means that we are resuming serializing 493 // this cycle. Tell the previous stages to block. 494 if (resumeSerialize) { 495 resumeSerialize = false; 496 block(tid); 497 toDecode->renameUnblock[tid] = false; 498 } |
|
480 } 481 482 if (renameStatus[tid] == Running || 483 renameStatus[tid] == Idle) { 484 DPRINTF(Rename, "[tid:%u]: Not blocked, so attempting to run " 485 "stage.\n", tid); 486 487 renameInsts(tid); --- 752 unchanged lines hidden (view full) --- 1240 unblock(tid); 1241 1242 return true; 1243 } 1244 1245 if (renameStatus[tid] == Squashing) { 1246 // Switch status to running if rename isn't being told to block or 1247 // squash this cycle. | 499 } 500 501 if (renameStatus[tid] == Running || 502 renameStatus[tid] == Idle) { 503 DPRINTF(Rename, "[tid:%u]: Not blocked, so attempting to run " 504 "stage.\n", tid); 505 506 renameInsts(tid); --- 752 unchanged lines hidden (view full) --- 1259 unblock(tid); 1260 1261 return true; 1262 } 1263 1264 if (renameStatus[tid] == Squashing) { 1265 // Switch status to running if rename isn't being told to block or 1266 // squash this cycle. |
1248 DPRINTF(Rename, "[tid:%u]: Done squashing, switching to running.\n", 1249 tid); | 1267 if (!resumeSerialize) { 1268 DPRINTF(Rename, "[tid:%u]: Done squashing, switching to running.\n", 1269 tid); |
1250 | 1270 |
1251 renameStatus[tid] = Running; | 1271 renameStatus[tid] = Running; 1272 return false; 1273 } else { 1274 DPRINTF(Rename, "[tid:%u]: Done squashing, switching to serialize.\n", 1275 tid); |
1252 | 1276 |
1253 return false; | 1277 renameStatus[tid] = SerializeStall; 1278 return true; 1279 } |
1254 } 1255 1256 if (renameStatus[tid] == SerializeStall) { 1257 // Stall ends once the ROB is free. 1258 DPRINTF(Rename, "[tid:%u]: Done with serialize stall, switching to " 1259 "unblocking.\n", tid); 1260 1261 DynInstPtr serial_inst = serializeInst[tid]; --- 85 unchanged lines hidden --- | 1280 } 1281 1282 if (renameStatus[tid] == SerializeStall) { 1283 // Stall ends once the ROB is free. 1284 DPRINTF(Rename, "[tid:%u]: Done with serialize stall, switching to " 1285 "unblocking.\n", tid); 1286 1287 DynInstPtr serial_inst = serializeInst[tid]; --- 85 unchanged lines hidden --- |