void setROB(ROB *rob_ptr);
/** Initializes stage by sending back the number of free entries. */
- void initStage();
+ void startupStage();
/** Initializes the draining of commit. */
bool drain();
/*
- * Copyright (c) 2010-2011 ARM Limited
+ * Copyright (c) 2010-2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
template <class Impl>
void
-DefaultCommit<Impl>::initStage()
+DefaultCommit<Impl>::startupStage()
{
rob->setActiveThreads(activeThreads);
rob->resetEntries();
for (int tid = 0; tid < numThreads; ++tid)
thread[tid]->noSquashFromTC = false;
- // Initialize stages.
- fetch.initStage();
- iew.initStage();
- rename.initStage();
- commit.initStage();
-
commit.setThreads(thread);
}
+template <class Impl>
+void
+FullO3CPU<Impl>::startup()
+{
+ fetch.startupStage();
+ iew.startupStage();
+ rename.startupStage();
+ commit.startupStage();
+}
+
template <class Impl>
void
FullO3CPU<Impl>::activateThread(ThreadID tid)
/** Initialize the CPU */
void init();
+ void startup();
+
/** Returns the Number of Active Threads in the CPU */
int numActiveThreads()
{ return activeThreads.size(); }
void setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr);
/** Initialize stage. */
- void initStage();
+ void startupStage();
/** Tells the fetch stage that the Icache is set. */
void setIcache();
template<class Impl>
void
-DefaultFetch<Impl>::initStage()
+DefaultFetch<Impl>::startupStage()
{
// Setup PC and nextPC with initial state.
for (ThreadID tid = 0; tid < numThreads; tid++) {
void regStats();
/** Initializes stage; sends back the number of free IQ and LSQ entries. */
- void initStage();
+ void startupStage();
/** Sets main time buffer used for backwards communication. */
void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr);
template<class Impl>
void
-DefaultIEW<Impl>::initStage()
+DefaultIEW<Impl>::startupStage()
{
for (ThreadID tid = 0; tid < numThreads; tid++) {
toRename->iewInfo[tid].usedIQ = true;
ldstQueue.takeOverFrom();
fuPool->takeOver();
- initStage();
+ startupStage();
cpu->activityThisCycle();
for (ThreadID tid = 0; tid < numThreads; tid++) {
public:
/** Initializes variables for the stage. */
- void initStage();
+ void startupStage();
/** Sets pointer to list of active threads. */
void setActiveThreads(std::list<ThreadID> *at_ptr);
template <class Impl>
void
-DefaultRename<Impl>::initStage()
+DefaultRename<Impl>::startupStage()
{
// Grab the number of free entries directly from the stages.
for (ThreadID tid = 0; tid < numThreads; tid++) {
DefaultRename<Impl>::takeOverFrom()
{
_status = Inactive;
- initStage();
+ startupStage();
// Reset all state prior to taking over from the other CPU.
for (ThreadID tid = 0; tid < numThreads; tid++) {