46 #ifndef __CPU_MINOR_CPU_HH__
47 #define __CPU_MINOR_CPU_HH__
53 #include "enums/ThreadPolicy.hh"
54 #include "params/MinorCPU.hh"
129 void init()
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());
A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
void signalDrainDone()
Signal from Pipeline that MinorCPU should signal that a drain is complete and set its drainState...
MinorCPU & cpu
The enclosing cpu.
The stats for MinorCPU separated from the CPU definition.
DrainState
Object drain/handover states.
Counter totalOps() const override
void wakeupOnEvent(unsigned int stage_id)
Interface for stages to signal that they have become active after a callback or eventq event where th...
MasterPort & getInstPort() override
Return a reference to the instruction port.
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_)
void drainResume() override
DrainState drain() override
Drain interface.
Provide a non-protected base class for Minor's Ports as derived classes are created by Fetch1 and Exe...
void unserialize(CheckpointIn &cp) override
Addr dbg_vtophys(Addr addr)
MasterPort & getDataPort() override
Return a reference to the data port.
void init() override
Starting, waking and initialisation.
void unserializeThread(CheckpointIn &cp, ThreadID tid) override
void serialize(CheckpointOut &cp) const override
Serialize pipeline data.
SimpleThread MinorThread
Minor will use the SimpleThread state for now.
std::vector< ThreadID > randomPriority()
void memWriteback() override
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.
void takeOverFrom(BaseCPU *old_cpu) override
std::vector< ThreadID > roundRobinPriority(ThreadID priority)
Thread scheduling utility functions.
int16_t ThreadID
Thread index/ID type.
MinorCPU(MinorCPUParams *params)
Enums::ThreadPolicy threadPolicy
Thread Scheduling Policy (RoundRobin, Random, etc)
std::ostream CheckpointOut
void suspendContext(ThreadID thread_id) override
void wakeup(ThreadID tid) override
std::vector< Minor::MinorThread * > threads
These are thread state-representing objects for this CPU.
MinorCPU is an in-order CPU model with four fixed pipeline stages:
Minor::MinorStats stats
Processor-specific statistics.
void activateContext(ThreadID thread_id) override
Thread activation interface from BaseCPU.
The constructed pipeline.
void serializeThread(CheckpointOut &cp, ThreadID tid) const override
Currently unused stats class.
void switchOut() override
Switching interface from BaseCPU.
void regStats() override
Stats interface from SimObject (by way of BaseCPU)
Counter totalInsts() const override
Simple inst count interface from BaseCPU.