46 #ifndef __CPU_MINOR_CPU_HH__ 47 #define __CPU_MINOR_CPU_HH__ 53 #include "enums/ThreadPolicy.hh" 54 #include "params/MinorCPU.hh" 117 Port &getDataPort()
override;
120 Port &getInstPort()
override;
129 void init()
override;
130 void startup()
override;
139 void regStats()
override;
142 Counter totalInsts()
const override;
143 Counter totalOps()
const override;
154 void drainResume()
override;
157 void signalDrainDone();
158 void memWriteback()
override;
161 void switchOut()
override;
165 void activateContext(
ThreadID thread_id)
override;
166 void suspendContext(
ThreadID thread_id)
override;
173 prio_list.push_back((priority +
i) % numThreads);
182 prio_list.push_back(
i);
184 std::random_shuffle(prio_list.begin(), prio_list.end());
192 void wakeupOnEvent(
unsigned int stage_id);
A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
Ports are used to interface objects to each other.
MinorCPU & cpu
The enclosing cpu.
The stats for MinorCPU separated from the CPU definition.
DrainState
Object drain/handover states.
void takeOverFrom(ThreadContext &ntc, ThreadContext &otc)
Copy state between thread contexts in preparation for CPU handover.
ActivityRecoder from cpu/activity.h wrapped to provide evaluate and minorTrace.
ActivityRecorder with a Ticked interface.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Minor::Pipeline * pipeline
pipeline is a container for the clockable pipeline stage objects.
MinorCPUPort(const std::string &name_, MinorCPU &cpu_)
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.
Provide a non-protected base class for Minor's Ports as derived classes are created by Fetch1 and Exe...
SimpleThread MinorThread
Minor will use the SimpleThread state for now.
std::vector< ThreadID > randomPriority()
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
Minor::MinorActivityRecorder * activityRecorder
Activity recording for pipeline.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int64_t Counter
Statistics counter type.
std::vector< ThreadID > roundRobinPriority(ThreadID priority)
Thread scheduling utility functions.
int16_t ThreadID
Thread index/ID type.
Enums::ThreadPolicy threadPolicy
Thread Scheduling Policy (RoundRobin, Random, etc)
std::ostream CheckpointOut
std::vector< Minor::MinorThread * > threads
These are thread state-representing objects for this CPU.
void unserialize(ThreadContext &tc, CheckpointIn &cp)
MinorCPU is an in-order CPU model with four fixed pipeline stages:
Minor::MinorStats stats
Processor-specific statistics.
The constructed pipeline.
Currently unused stats class.
const FlagsType init
This Stat is Initialized.