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 updateCycleCounters(CPUState state)
base method keeping track of cycle progression
ThreadID numThreads
Number of threads we're actually simulating (<= SMT_MAX_THREADS).
Provide a non-protected base class for Minor's Ports as derived classes are created by Fetch1 and Exe...
MinorCPU & cpu
The enclosing cpu.
MinorCPUPort(const std::string &name_, MinorCPU &cpu_)
MinorCPU is an in-order CPU model with four fixed pipeline stages:
Port & getInstPort() override
Return a reference to the instruction port.
MinorCPU(const BaseMinorCPUParams ¶ms)
void serialize(CheckpointOut &cp) const override
Serialize pipeline data.
void wakeup(ThreadID tid) override
void serializeThread(CheckpointOut &cp, ThreadID tid) const override
Serialize a single thread.
DrainState drain() override
Drain interface.
Counter totalInsts() const override
Simple inst count interface from BaseCPU.
void unserialize(CheckpointIn &cp) override
Reconstruct the state of this object from a checkpoint.
minor::Pipeline * pipeline
pipeline is a container for the clockable pipeline stage objects.
minor::MinorStats stats
Processor-specific statistics.
minor::MinorActivityRecorder * activityRecorder
Activity recording for pipeline.
void signalDrainDone()
Signal from Pipeline that MinorCPU should signal that a drain is complete and set its drainState.
void init() override
Starting, waking and initialisation.
void switchOut() override
Switching 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...
std::vector< ThreadID > randomPriority()
void memWriteback() override
Write back dirty buffers to memory using functional writes.
std::vector< ThreadID > roundRobinPriority(ThreadID priority)
Thread scheduling utility functions.
void tick()
The tick method in the MinorCPU is simply updating the cycle counters as the ticking of the pipeline ...
Counter totalOps() const override
void regStats() override
Stats interface from SimObject (by way of BaseCPU)
void activateContext(ThreadID thread_id) override
Thread activation interface from BaseCPU.
void unserializeThread(CheckpointIn &cp, ThreadID tid) override
Unserialize one thread.
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...
void startup() override
startup() is the final initialization call before simulation.
enums::ThreadPolicy threadPolicy
Thread Scheduling Policy (RoundRobin, Random, etc)
Port & getDataPort() override
Return a reference to the data port.
std::vector< minor::MinorThread * > threads
These are thread state-representing objects for this CPU.
void drainResume() override
Resume execution after a successful drain.
void suspendContext(ThreadID thread_id) override
Notify the CPU that the indicated context is now suspended.
EventFunctionWrapper * fetchEventWrapper
Ports are used to interface objects to each other.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
ActivityRecorder with a Ticked interface.
The constructed pipeline.
The stats for MinorCPU separated from the CPU definition.
DrainState
Object drain/handover states.
const Params & params() const
ActivityRecoder from cpu/activity.h wrapped to provide evaluate and minorTrace.
Bitfield< 3, 0 > priority
SimpleThread MinorThread
Minor will use the SimpleThread state for now.
double Counter
All counters are of 64-bit values.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
int16_t ThreadID
Thread index/ID type.
std::ostream CheckpointOut
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.
Currently unused stats class.