commit_impl.hh (2831:0a42b294727c) commit_impl.hh (2843:19c4c6c2b5b1)
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;

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

75 : squashCounter(0),
76 iewToCommitDelay(params->iewToCommitDelay),
77 commitToIEWDelay(params->commitToIEWDelay),
78 renameToROBDelay(params->renameToROBDelay),
79 fetchToCommitDelay(params->commitToFetchDelay),
80 renameWidth(params->renameWidth),
81 commitWidth(params->commitWidth),
82 numThreads(params->numberOfThreads),
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;

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

75 : squashCounter(0),
76 iewToCommitDelay(params->iewToCommitDelay),
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 switchPending(false),
83 drainPending(false),
84 switchedOut(false),
85 trapLatency(params->trapLatency),
86 fetchTrapLatency(params->fetchTrapLatency)
87{
88 _status = Active;
89 _nextStatus = Inactive;
90 string policy = params->smtCommitPolicy;
91

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

346 toIEW->commitInfo[i].freeROBEntries = rob->numFreeEntries(i);
347 }
348
349 cpu->activityThisCycle();
350}
351
352template <class Impl>
353void
84 switchedOut(false),
85 trapLatency(params->trapLatency),
86 fetchTrapLatency(params->fetchTrapLatency)
87{
88 _status = Active;
89 _nextStatus = Inactive;
90 string policy = params->smtCommitPolicy;
91

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

346 toIEW->commitInfo[i].freeROBEntries = rob->numFreeEntries(i);
347 }
348
349 cpu->activityThisCycle();
350}
351
352template <class Impl>
353void
354DefaultCommit<Impl>::switchOut()
354DefaultCommit<Impl>::drain()
355{
355{
356 switchPending = true;
356 drainPending = true;
357}
358
359template <class Impl>
360void
357}
358
359template <class Impl>
360void
361DefaultCommit<Impl>::doSwitchOut()
361DefaultCommit<Impl>::switchOut()
362{
363 switchedOut = true;
362{
363 switchedOut = true;
364 switchPending = false;
364 drainPending = false;
365 rob->switchOut();
366}
367
368template <class Impl>
369void
365 rob->switchOut();
366}
367
368template <class Impl>
369void
370DefaultCommit<Impl>::resume()
371{
372}
373
374template <class Impl>
375void
370DefaultCommit<Impl>::takeOverFrom()
371{
372 switchedOut = false;
373 _status = Active;
374 _nextStatus = Inactive;
375 for (int i=0; i < numThreads; i++) {
376 commitStatus[i] = Idle;
377 changedROBNumEntries[i] = false;

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

552
553template <class Impl>
554void
555DefaultCommit<Impl>::tick()
556{
557 wroteToTimeBuffer = false;
558 _nextStatus = Inactive;
559
376DefaultCommit<Impl>::takeOverFrom()
377{
378 switchedOut = false;
379 _status = Active;
380 _nextStatus = Inactive;
381 for (int i=0; i < numThreads; i++) {
382 commitStatus[i] = Idle;
383 changedROBNumEntries[i] = false;

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

558
559template <class Impl>
560void
561DefaultCommit<Impl>::tick()
562{
563 wroteToTimeBuffer = false;
564 _nextStatus = Inactive;
565
560 if (switchPending && rob->isEmpty() && !iewStage->hasStoresToWB()) {
561 cpu->signalSwitched();
566 if (drainPending && rob->isEmpty() && !iewStage->hasStoresToWB()) {
567 cpu->signalDrained();
568 drainPending = false;
562 return;
563 }
564
565 list<unsigned>::iterator threads = (*activeThreads).begin();
566
567 // Check if any of the threads are done squashing. Change the
568 // status if they are done.
569 while (threads != (*activeThreads).end()) {

--- 708 unchanged lines hidden ---
569 return;
570 }
571
572 list<unsigned>::iterator threads = (*activeThreads).begin();
573
574 // Check if any of the threads are done squashing. Change the
575 // status if they are done.
576 while (threads != (*activeThreads).end()) {

--- 708 unchanged lines hidden ---