gem5 v24.0.0.0
|
The constructed pipeline. More...
#include <pipeline.hh>
Public Types | |
enum | StageId { CPUStageId = 0 , Fetch1StageId , Fetch2StageId , DecodeStageId , ExecuteStageId , Num_StageId } |
Enumerated ids of the 'stages' for the activity recorder. More... | |
Public Member Functions | |
Pipeline (MinorCPU &cpu_, const BaseMinorCPUParams ¶ms) | |
void | wakeupFetch (ThreadID tid) |
Wake up the Fetch unit. | |
bool | drain () |
Try to drain the CPU. | |
void | drainResume () |
bool | isDrained () |
Test to see if the CPU is drained. | |
void | evaluate () override |
A custom evaluate allows report in the right place (between stages and pipeline advance) | |
void | minorTrace () const |
MinorCPU::MinorCPUPort & | getInstPort () |
Functions below here are BaseCPU operations passed on to pipeline stages. | |
MinorCPU::MinorCPUPort & | getDataPort () |
Return the DcachePort belonging to Execute for the CPU. | |
MinorActivityRecorder * | getActivityRecorder () |
To give the activity recorder to the CPU. | |
Public Member Functions inherited from gem5::Ticked | |
Ticked (ClockedObject &object_, statistics::Scalar *imported_num_cycles=NULL, Event::Priority priority=Event::CPU_Tick_Pri) | |
virtual | ~Ticked () |
void | regStats () |
Register {num,ticks}Cycles if necessary. | |
void | start () |
Start ticking. | |
Cycles | cyclesSinceLastStopped () const |
How long have we been stopped for? | |
void | resetLastStopped () |
Reset stopped time to current time. | |
void | stop () |
Cancel the next tick event and issue no more. | |
void | serialize (CheckpointOut &cp) const override |
Checkpoint lastStopped. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
virtual void | countCycles (Cycles delta) |
Callback to handle cycle statistics and probes. | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Attributes | |
bool | needToSignalDrained |
True after drain is called but draining isn't complete. | |
Protected Attributes | |
MinorCPU & | cpu |
bool | allow_idling |
Allow cycles to be skipped when the pipeline is idle. | |
Latch< ForwardLineData > | f1ToF2 |
Latch< BranchData > | f2ToF1 |
Latch< ForwardInstData > | f2ToD |
Latch< ForwardInstData > | dToE |
Latch< BranchData > | eToF1 |
Execute | execute |
Decode | decode |
Fetch2 | fetch2 |
Fetch1 | fetch1 |
MinorActivityRecorder | activityRecorder |
Activity recording for the pipeline. | |
Protected Attributes inherited from gem5::Ticked | |
ClockedObject & | object |
ClockedObject who is responsible for this Ticked's actions/stats. | |
EventFunctionWrapper | event |
The wrapper for processClockEvent. | |
bool | running |
Have I been started? and am not stopped. | |
Cycles | lastStopped |
Time of last stop event to calculate run time. | |
statistics::Scalar & | numCycles |
Total number of cycles either ticked or spend stopped. | |
statistics::Scalar | tickCycles |
Number of cycles ticked. | |
statistics::Formula | idleCycles |
Number of cycles stopped. | |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Protected Member Functions inherited from gem5::Ticked | |
void | processClockEvent () |
Evaluate and reschedule. | |
The constructed pipeline.
Kept out of MinorCPU to keep the interface between the CPU and its grubby implementation details clean.
Definition at line 72 of file pipeline.hh.
Enumerated ids of the 'stages' for the activity recorder.
Enumerator | |
---|---|
CPUStageId | |
Fetch1StageId | |
Fetch2StageId | |
DecodeStageId | |
ExecuteStageId | |
Num_StageId |
Definition at line 98 of file pipeline.hh.
gem5::minor::Pipeline::Pipeline | ( | MinorCPU & | cpu_, |
const BaseMinorCPUParams & | params ) |
Definition at line 57 of file pipeline.cc.
References cpu, fatal, and gem5::Named::name().
bool gem5::minor::Pipeline::drain | ( | ) |
Try to drain the CPU.
Definition at line 201 of file pipeline.cc.
References DPRINTF, gem5::minor::Execute::drain(), execute, isDrained(), and needToSignalDrained.
void gem5::minor::Pipeline::drainResume | ( | ) |
Definition at line 217 of file pipeline.cc.
References cpu, DPRINTF, gem5::minor::Execute::drainResume(), execute, fetch1, gem5::BaseCPU::numThreads, and gem5::minor::Fetch1::wakeupFetch().
|
overridevirtual |
A custom evaluate allows report in the right place (between stages and pipeline advance)
We tick the CPU to update the BaseCPU cycle counters
Implements gem5::Ticked.
Definition at line 125 of file pipeline.cc.
References gem5::ActivityRecorder::active(), activityRecorder, allow_idling, cpu, CPUStageId, gem5::ActivityRecorder::deactivateStage(), decode, DecodeStageId, DPRINTF, dToE, eToF1, gem5::minor::Decode::evaluate(), gem5::minor::Execute::evaluate(), gem5::minor::Fetch1::evaluate(), gem5::minor::Fetch2::evaluate(), gem5::minor::MinorActivityRecorder::evaluate(), execute, ExecuteStageId, f1ToF2, f2ToD, f2ToF1, fetch1, Fetch1StageId, fetch2, Fetch2StageId, isDrained(), minorTrace(), needToSignalDrained, gem5::MinorCPU::signalDrainDone(), gem5::Ticked::stop(), and gem5::MinorCPU::tick().
|
inline |
To give the activity recorder to the CPU.
Definition at line 141 of file pipeline.hh.
References activityRecorder.
MinorCPU::MinorCPUPort & gem5::minor::Pipeline::getDataPort | ( | ) |
Return the DcachePort belonging to Execute for the CPU.
Definition at line 189 of file pipeline.cc.
References execute, and gem5::minor::Execute::getDcachePort().
MinorCPU::MinorCPUPort & gem5::minor::Pipeline::getInstPort | ( | ) |
Functions below here are BaseCPU operations passed on to pipeline stages.
Return the IcachePort belonging to Fetch1 for the CPU
Definition at line 183 of file pipeline.cc.
References fetch1, and gem5::minor::Fetch1::getIcachePort().
bool gem5::minor::Pipeline::isDrained | ( | ) |
Test to see if the CPU is drained.
Definition at line 229 of file pipeline.cc.
References decode, DPRINTF, dToE, execute, f1ToF2, f2ToD, f2ToF1, fetch1, fetch2, gem5::minor::Decode::isDrained(), gem5::minor::Execute::isDrained(), gem5::minor::Fetch1::isDrained(), and gem5::minor::Fetch2::isDrained().
Referenced by drain(), and evaluate().
void gem5::minor::Pipeline::minorTrace | ( | ) | const |
Definition at line 110 of file pipeline.cc.
References activityRecorder, decode, dToE, eToF1, execute, f1ToF2, f2ToD, f2ToF1, fetch1, fetch2, gem5::minor::Decode::minorTrace(), gem5::minor::Execute::minorTrace(), gem5::minor::Fetch1::minorTrace(), gem5::minor::Fetch2::minorTrace(), and gem5::minor::MinorActivityRecorder::minorTrace().
Referenced by evaluate().
void gem5::minor::Pipeline::wakeupFetch | ( | ThreadID | tid | ) |
Wake up the Fetch unit.
This is needed on thread activation esp. after quiesce wakeup
Definition at line 195 of file pipeline.cc.
References fetch1, and gem5::minor::Fetch1::wakeupFetch().
|
protected |
Activity recording for the pipeline.
This is access through the CPU by the pipeline stages but belongs to the Pipeline as it is the cleanest place to initialise it
Definition at line 94 of file pipeline.hh.
Referenced by evaluate(), getActivityRecorder(), and minorTrace().
|
protected |
Allow cycles to be skipped when the pipeline is idle.
Definition at line 78 of file pipeline.hh.
Referenced by evaluate().
|
protected |
Definition at line 75 of file pipeline.hh.
Referenced by drainResume(), evaluate(), and Pipeline().
|
protected |
Definition at line 87 of file pipeline.hh.
Referenced by evaluate(), isDrained(), and minorTrace().
|
protected |
Definition at line 83 of file pipeline.hh.
Referenced by evaluate(), isDrained(), and minorTrace().
|
protected |
Definition at line 84 of file pipeline.hh.
Referenced by evaluate(), and minorTrace().
|
protected |
Definition at line 86 of file pipeline.hh.
Referenced by drain(), drainResume(), evaluate(), getDataPort(), isDrained(), and minorTrace().
|
protected |
Definition at line 80 of file pipeline.hh.
Referenced by evaluate(), isDrained(), and minorTrace().
|
protected |
Definition at line 82 of file pipeline.hh.
Referenced by evaluate(), isDrained(), and minorTrace().
|
protected |
Definition at line 81 of file pipeline.hh.
Referenced by evaluate(), isDrained(), and minorTrace().
|
protected |
Definition at line 89 of file pipeline.hh.
Referenced by drainResume(), evaluate(), getInstPort(), isDrained(), minorTrace(), and wakeupFetch().
|
protected |
Definition at line 88 of file pipeline.hh.
Referenced by evaluate(), isDrained(), and minorTrace().
bool gem5::minor::Pipeline::needToSignalDrained |
True after drain is called but draining isn't complete.
Definition at line 108 of file pipeline.hh.
Referenced by drain(), and evaluate().