commit_impl.hh (2864:eab7ff8f6d72) commit_impl.hh (2874:5389a28b80fb)
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;

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

77 commitToIEWDelay(params->commitToIEWDelay),
78 renameToROBDelay(params->renameToROBDelay),
79 fetchToCommitDelay(params->commitToFetchDelay),
80 renameWidth(params->renameWidth),
81 commitWidth(params->commitWidth),
82 numThreads(params->numberOfThreads),
83 drainPending(false),
84 switchedOut(false),
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;

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

77 commitToIEWDelay(params->commitToIEWDelay),
78 renameToROBDelay(params->renameToROBDelay),
79 fetchToCommitDelay(params->commitToFetchDelay),
80 renameWidth(params->renameWidth),
81 commitWidth(params->commitWidth),
82 numThreads(params->numberOfThreads),
83 drainPending(false),
84 switchedOut(false),
85 trapLatency(params->trapLatency),
86 fetchTrapLatency(params->fetchTrapLatency)
85 trapLatency(params->trapLatency)
87{
88 _status = Active;
89 _nextStatus = Inactive;
90 string policy = params->smtCommitPolicy;
91
92 //Convert string to lowercase
93 std::transform(policy.begin(), policy.end(), policy.begin(),
94 (int(*)(int)) tolower);

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

118
119 for (int i=0; i < numThreads; i++) {
120 commitStatus[i] = Idle;
121 changedROBNumEntries[i] = false;
122 trapSquash[i] = false;
123 tcSquash[i] = false;
124 PC[i] = nextPC[i] = 0;
125 }
86{
87 _status = Active;
88 _nextStatus = Inactive;
89 string policy = params->smtCommitPolicy;
90
91 //Convert string to lowercase
92 std::transform(policy.begin(), policy.end(), policy.begin(),
93 (int(*)(int)) tolower);

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

117
118 for (int i=0; i < numThreads; i++) {
119 commitStatus[i] = Idle;
120 changedROBNumEntries[i] = false;
121 trapSquash[i] = false;
122 tcSquash[i] = false;
123 PC[i] = nextPC[i] = 0;
124 }
126
127 fetchFaultTick = 0;
128 fetchTrapWait = 0;
129}
130
131template <class Impl>
132std::string
133DefaultCommit<Impl>::name() const
134{
135 return cpu->name() + ".commit";
136}

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

230 DPRINTF(Commit, "Commit: Setting CPU pointer.\n");
231 cpu = cpu_ptr;
232
233 // Commit must broadcast the number of free entries it has at the start of
234 // the simulation, so it starts as active.
235 cpu->activateStage(O3CPU::CommitIdx);
236
237 trapLatency = cpu->cycles(trapLatency);
125}
126
127template <class Impl>
128std::string
129DefaultCommit<Impl>::name() const
130{
131 return cpu->name() + ".commit";
132}

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

226 DPRINTF(Commit, "Commit: Setting CPU pointer.\n");
227 cpu = cpu_ptr;
228
229 // Commit must broadcast the number of free entries it has at the start of
230 // the simulation, so it starts as active.
231 cpu->activateStage(O3CPU::CommitIdx);
232
233 trapLatency = cpu->cycles(trapLatency);
238 fetchTrapLatency = cpu->cycles(fetchTrapLatency);
239}
240
241template <class Impl>
242void
243DefaultCommit<Impl>::setThreads(vector<Thread *> &threads)
244{
245 thread = threads;
246}

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

289 iewQueue = iq_ptr;
290
291 // Setup wire to get instructions from IEW.
292 fromIEW = iewQueue->getWire(-iewToCommitDelay);
293}
294
295template <class Impl>
296void
234}
235
236template <class Impl>
237void
238DefaultCommit<Impl>::setThreads(vector<Thread *> &threads)
239{
240 thread = threads;
241}

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

284 iewQueue = iq_ptr;
285
286 // Setup wire to get instructions from IEW.
287 fromIEW = iewQueue->getWire(-iewToCommitDelay);
288}
289
290template <class Impl>
291void
297DefaultCommit<Impl>::setFetchStage(Fetch *fetch_stage)
298{
299 fetchStage = fetch_stage;
300}
301
302template <class Impl>
303void
304DefaultCommit<Impl>::setIEWStage(IEW *iew_stage)
305{
306 iewStage = iew_stage;
307}
308
309template<class Impl>
310void
311DefaultCommit<Impl>::setActiveThreads(list<unsigned> *at_ptr)

--- 982 unchanged lines hidden ---
292DefaultCommit<Impl>::setIEWStage(IEW *iew_stage)
293{
294 iewStage = iew_stage;
295}
296
297template<class Impl>
298void
299DefaultCommit<Impl>::setActiveThreads(list<unsigned> *at_ptr)

--- 982 unchanged lines hidden ---