Go to the documentation of this file.
44 #ifndef __CPU_MINOR_CPU_HH__
45 #define __CPU_MINOR_CPU_HH__
53 #include "enums/ThreadPolicy.hh"
54 #include "params/BaseMinorCPU.hh"
134 void init()
override;
185 prio_list.push_back(
i);
188 std::shuffle(prio_list.begin(), prio_list.end(),
void takeOverFrom(BaseCPU *old_cpu) override
Load the state of a CPU from the previous CPU object, invoked on all new CPUs that are about to be sw...
std::vector< ThreadID > randomPriority()
minor::Pipeline * pipeline
pipeline is a container for the clockable pipeline stage objects.
MinorCPUPort(const std::string &name_, MinorCPU &cpu_)
void memWriteback() override
Write back dirty buffers to memory using functional writes.
ActivityRecorder with a Ticked interface.
void tick()
The tick method in the MinorCPU is simply updating the cycle counters as the ticking of the pipeline ...
Provide a non-protected base class for Minor's Ports as derived classes are created by Fetch1 and Exe...
void updateCycleCounters(CPUState state)
base method keeping track of cycle progression
MinorCPU & cpu
The enclosing cpu.
MinorCPU is an in-order CPU model with four fixed pipeline stages:
void drainResume() override
Resume execution after a successful drain.
void unserialize(CheckpointIn &cp) override
Reconstruct the state of this object from a checkpoint.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Counter totalInsts() const override
Simple inst count interface from BaseCPU.
void wakeupOnEvent(unsigned int stage_id)
Interface for stages to signal that they have become active after a callback or eventq event where th...
Port & getDataPort() override
Return a reference to the data port.
std::vector< minor::MinorThread * > threads
These are thread state-representing objects for this CPU.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
minor::MinorStats stats
Processor-specific statistics.
ThreadID numThreads
Number of threads we're actually simulating (<= SMT_MAX_THREADS).
Bitfield< 3, 0 > priority
DrainState
Object drain/handover states.
MinorCPU(const BaseMinorCPUParams ¶ms)
void regStats() override
Stats interface from SimObject (by way of BaseCPU)
const Params & params() const
Counter totalOps() const override
void init() override
Starting, waking and initialisation.
void suspendContext(ThreadID thread_id) override
Notify the CPU that the indicated context is now suspended.
void serialize(CheckpointOut &cp) const override
Serialize pipeline data.
The constructed pipeline.
void wakeup(ThreadID tid) override
void unserializeThread(CheckpointIn &cp, ThreadID tid) override
Unserialize one thread.
void signalDrainDone()
Signal from Pipeline that MinorCPU should signal that a drain is complete and set its drainState.
DrainState drain() override
Drain interface.
void activateContext(ThreadID thread_id) override
Thread activation interface from BaseCPU.
void serializeThread(CheckpointOut &cp, ThreadID tid) const override
Serialize a single thread.
Ports are used to interface objects to each other.
SimpleThread MinorThread
Minor will use the SimpleThread state for now.
double Counter
All counters are of 64-bit values.
void switchOut() override
Switching interface from BaseCPU.
std::ostream CheckpointOut
enums::ThreadPolicy threadPolicy
Thread Scheduling Policy (RoundRobin, Random, etc)
minor::MinorActivityRecorder * activityRecorder
Activity recording for pipeline.
Port & getInstPort() override
Return a reference to the instruction port.
Currently unused stats class.
void startup() override
startup() is the final initialization call before simulation.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
EventFunctionWrapper * fetchEventWrapper
std::vector< ThreadID > roundRobinPriority(ThreadID priority)
Thread scheduling utility functions.
int16_t ThreadID
Thread index/ID type.
Generated on Sun Jul 30 2023 01:56:47 for gem5 by doxygen 1.8.17