Deleted Added
sdiff udiff text old ( 2733:e0eac8fc5774 ) new ( 2820:7fde0b0f8f78 )
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;

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

45 : // @todo: Make this into a parameter.
46 issueToExecQueue(5, 5),
47 instQueue(params),
48 ldstQueue(params),
49 fuPool(params->fuPool),
50 commitToIEWDelay(params->commitToIEWDelay),
51 renameToIEWDelay(params->renameToIEWDelay),
52 issueToExecuteDelay(params->issueToExecuteDelay),
53 issueReadWidth(params->issueWidth),
54 issueWidth(params->issueWidth),
55 numThreads(params->numberOfThreads),
56 switchedOut(false)
57{
58 _status = Active;
59 exeStatus = Running;
60 wbStatus = Idle;
61
62 // Setup wire to read instructions coming from issue.

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

69 ldstQueue.setIEW(this);
70
71 for (int i=0; i < numThreads; i++) {
72 dispatchStatus[i] = Running;
73 stalls[i].commit = false;
74 fetchRedirect[i] = false;
75 }
76
77 updateLSQNextCycle = false;
78
79 skidBufferMax = (3 * (renameToIEWDelay * params->renameWidth)) + issueWidth;
80}
81
82template <class Impl>
83std::string
84DefaultIEW<Impl>::name() const
85{
86 return cpu->name() + ".iew";

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

554{
555 // First check the time slot that this instruction will write
556 // to. If there are free write ports at the time, then go ahead
557 // and write the instruction to that time. If there are not,
558 // keep looking back to see where's the first time there's a
559 // free slot.
560 while ((*iewQueue)[wbCycle].insts[wbNumInst]) {
561 ++wbNumInst;
562 if (wbNumInst == issueWidth) {
563 ++wbCycle;
564 wbNumInst = 0;
565 }
566
567 assert(wbCycle < 5);
568 }
569
570 // Add finished instruction to queue to commit.
571 (*iewQueue)[wbCycle].insts[wbNumInst] = inst;
572 (*iewQueue)[wbCycle].size++;
573}
574
575template <class Impl>

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

932
933 DynInstPtr inst;
934 bool add_to_iq = false;
935 int dis_num_inst = 0;
936
937 // Loop through the instructions, putting them in the instruction
938 // queue.
939 for ( ; dis_num_inst < insts_to_add &&
940 dis_num_inst < issueReadWidth;
941 ++dis_num_inst)
942 {
943 inst = insts_to_dispatch.front();
944
945 if (dispatchStatus[tid] == Unblocking) {
946 DPRINTF(IEW, "[tid:%i]: Issue: Examining instruction from skid "
947 "buffer\n", tid);
948 }

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

1184 inst->setExecuted();
1185
1186 // Not sure if I should set this here or just let commit try to
1187 // commit any squashed instructions. I like the latter a bit more.
1188 inst->setCanCommit();
1189
1190 ++iewExecSquashedInsts;
1191
1192 continue;
1193 }
1194
1195 Fault fault = NoFault;
1196
1197 // Execute instruction.
1198 // Note that if the instruction faults, it will be handled
1199 // at the commit stage.

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

1346 }
1347
1348 if (dependents) {
1349 producerInst[tid]++;
1350 consumerInst[tid]+= dependents;
1351 }
1352 writebackCount[tid]++;
1353 }
1354 }
1355}
1356
1357template<class Impl>
1358void
1359DefaultIEW<Impl>::tick()
1360{
1361 wbNumInst = 0;

--- 152 unchanged lines hidden ---