Deleted Added
sdiff udiff text old ( 3788:5c804ea5cc48 ) new ( 3798:ec59feae527b )
full compact
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;

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

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),
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

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

400 while (slist_it != skidBuffer[tid].end()) {
401 if ((*slist_it)->seqNum > squash_seq_num) {
402 (*slist_it)->setSquashed();
403 DPRINTF(Rename, "Squashing skidbuffer instruction, [tid:%i] [sn:%i]"
404 "PC %08p.\n", tid, (*slist_it)->seqNum, (*slist_it)->PC);
405 }
406 slist_it++;
407 }
408#else
409 skidBuffer[tid].clear();
410#endif
411 doSquash(squash_seq_num, tid);
412}
413
414template <class Impl>
415void

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

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 }
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);

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

756 "skidBuffer\n", tid, inst->seqNum, inst->readPC());
757
758 ++renameSkidInsts;
759
760 skidBuffer[tid].push_back(inst);
761 }
762
763 if (skidBuffer[tid].size() > skidBufferMax)
764 panic("Skidbuffer Exceeded Max Size");
765}
766
767template <class Impl>
768void
769DefaultRename<Impl>::sortInsts()
770{
771 int insts_from_decode = fromDecode->size;
772#ifdef DEBUG

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

843
844 // Add the current inputs onto the skid buffer, so they can be
845 // reprocessed when this stage unblocks.
846 skidInsert(tid);
847
848 // Only signal backwards to block if the previous stages do not think
849 // rename is already blocked.
850 if (renameStatus[tid] != Blocked) {
851 if (renameStatus[tid] != Unblocking) {
852 toDecode->renameBlock[tid] = true;
853 toDecode->renameUnblock[tid] = false;
854 wroteToTimeBuffer = true;
855 }
856
857 // Rename can not go from SerializeStall to Blocked, otherwise
858 // it would not know to complete the serialize stall.
859 if (renameStatus[tid] != SerializeStall) {

--- 399 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.
1267 if (!resumeSerialize) {
1268 DPRINTF(Rename, "[tid:%u]: Done squashing, switching to running.\n",
1269 tid);
1270
1271 renameStatus[tid] = Running;
1272 return false;
1273 } else {
1274 DPRINTF(Rename, "[tid:%u]: Done squashing, switching to serialize.\n",
1275 tid);
1276
1277 renameStatus[tid] = SerializeStall;
1278 return true;
1279 }
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

--- 86 unchanged lines hidden ---