gem5  v21.1.0.2
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
gem5::minor::Pipeline Class Reference

The constructed pipeline. More...

#include <pipeline.hh>

Inheritance diagram for gem5::minor::Pipeline:
gem5::Ticked gem5::Serializable

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 MinorCPUParams &params)
 
void wakeupFetch (ThreadID tid)
 Wake up the Fetch unit. More...
 
bool drain ()
 Try to drain the CPU. More...
 
void drainResume ()
 
bool isDrained ()
 Test to see if the CPU is drained. More...
 
void evaluate () override
 A custom evaluate allows report in the right place (between stages and pipeline advance) More...
 
void minorTrace () const
 
MinorCPU::MinorCPUPortgetInstPort ()
 Functions below here are BaseCPU operations passed on to pipeline stages. More...
 
MinorCPU::MinorCPUPortgetDataPort ()
 Return the DcachePort belonging to Execute for the CPU. More...
 
MinorActivityRecordergetActivityRecorder ()
 To give the activity recorder to the CPU. More...
 
- 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. More...
 
void start ()
 Start ticking. More...
 
Cycles cyclesSinceLastStopped () const
 How long have we been stopped for? More...
 
void resetLastStopped ()
 Reset stopped time to current time. More...
 
void stop ()
 Cancel the next tick event and issue no more. More...
 
void serialize (CheckpointOut &cp) const override
 Checkpoint lastStopped. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
virtual void countCycles (Cycles delta)
 Callback to handle cycle statistics and probes. More...
 
- 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. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 

Public Attributes

bool needToSignalDrained
 True after drain is called but draining isn't complete. More...
 

Protected Attributes

MinorCPUcpu
 
bool allow_idling
 Allow cycles to be skipped when the pipeline is idle. More...
 
Latch< ForwardLineDataf1ToF2
 
Latch< BranchDataf2ToF1
 
Latch< ForwardInstDataf2ToD
 
Latch< ForwardInstDatadToE
 
Latch< BranchDataeToF1
 
Execute execute
 
Decode decode
 
Fetch2 fetch2
 
Fetch1 fetch1
 
MinorActivityRecorder activityRecorder
 Activity recording for the pipeline. More...
 
- Protected Attributes inherited from gem5::Ticked
ClockedObjectobject
 ClockedObject who is responsible for this Ticked's actions/stats. More...
 
EventFunctionWrapper event
 The wrapper for processClockEvent. More...
 
bool running
 Have I been started? and am not stopped. More...
 
Cycles lastStopped
 Time of last stop event to calculate run time. More...
 
statistics::ScalarnumCycles
 Total number of cycles either ticked or spend stopped. More...
 
statistics::Scalar tickCycles
 Number of cycles ticked. More...
 
statistics::Formula idleCycles
 Number of cycles stopped. More...
 

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. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 
- Protected Member Functions inherited from gem5::Ticked
void processClockEvent ()
 Evaluate and reschedule. More...
 

Detailed Description

The constructed pipeline.

Kept out of MinorCPU to keep the interface between the CPU and its grubby implementation details clean.

Definition at line 73 of file pipeline.hh.

Member Enumeration Documentation

◆ StageId

Enumerated ids of the 'stages' for the activity recorder.

Enumerator
CPUStageId 
Fetch1StageId 
Fetch2StageId 
DecodeStageId 
ExecuteStageId 
Num_StageId 

Definition at line 99 of file pipeline.hh.

Constructor & Destructor Documentation

◆ Pipeline()

gem5::minor::Pipeline::Pipeline ( MinorCPU cpu_,
const MinorCPUParams &  params 
)

Definition at line 58 of file pipeline.cc.

References cpu, fatal, and gem5::Named::name().

Member Function Documentation

◆ drain()

bool gem5::minor::Pipeline::drain ( )

Try to drain the CPU.

Definition at line 202 of file pipeline.cc.

References DPRINTF, gem5::minor::Execute::drain(), execute, isDrained(), and needToSignalDrained.

◆ drainResume()

void gem5::minor::Pipeline::drainResume ( )

◆ evaluate()

void gem5::minor::Pipeline::evaluate ( )
overridevirtual

◆ getActivityRecorder()

MinorActivityRecorder* gem5::minor::Pipeline::getActivityRecorder ( )
inline

To give the activity recorder to the CPU.

Definition at line 142 of file pipeline.hh.

References activityRecorder.

◆ getDataPort()

MinorCPU::MinorCPUPort & gem5::minor::Pipeline::getDataPort ( )

Return the DcachePort belonging to Execute for the CPU.

Definition at line 190 of file pipeline.cc.

References execute, and gem5::minor::Execute::getDcachePort().

◆ getInstPort()

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 184 of file pipeline.cc.

References fetch1, and gem5::minor::Fetch1::getIcachePort().

◆ isDrained()

bool gem5::minor::Pipeline::isDrained ( )

◆ minorTrace()

void gem5::minor::Pipeline::minorTrace ( ) const

◆ wakeupFetch()

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 196 of file pipeline.cc.

References fetch1, and gem5::minor::Fetch1::wakeupFetch().

Member Data Documentation

◆ activityRecorder

MinorActivityRecorder gem5::minor::Pipeline::activityRecorder
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 95 of file pipeline.hh.

Referenced by evaluate(), getActivityRecorder(), and minorTrace().

◆ allow_idling

bool gem5::minor::Pipeline::allow_idling
protected

Allow cycles to be skipped when the pipeline is idle.

Definition at line 79 of file pipeline.hh.

Referenced by evaluate().

◆ cpu

MinorCPU& gem5::minor::Pipeline::cpu
protected

Definition at line 76 of file pipeline.hh.

Referenced by drainResume(), evaluate(), and Pipeline().

◆ decode

Decode gem5::minor::Pipeline::decode
protected

Definition at line 88 of file pipeline.hh.

Referenced by evaluate(), isDrained(), and minorTrace().

◆ dToE

Latch<ForwardInstData> gem5::minor::Pipeline::dToE
protected

Definition at line 84 of file pipeline.hh.

Referenced by evaluate(), isDrained(), and minorTrace().

◆ eToF1

Latch<BranchData> gem5::minor::Pipeline::eToF1
protected

Definition at line 85 of file pipeline.hh.

Referenced by evaluate(), and minorTrace().

◆ execute

Execute gem5::minor::Pipeline::execute
protected

Definition at line 87 of file pipeline.hh.

Referenced by drain(), drainResume(), evaluate(), getDataPort(), isDrained(), and minorTrace().

◆ f1ToF2

Latch<ForwardLineData> gem5::minor::Pipeline::f1ToF2
protected

Definition at line 81 of file pipeline.hh.

Referenced by evaluate(), isDrained(), and minorTrace().

◆ f2ToD

Latch<ForwardInstData> gem5::minor::Pipeline::f2ToD
protected

Definition at line 83 of file pipeline.hh.

Referenced by evaluate(), isDrained(), and minorTrace().

◆ f2ToF1

Latch<BranchData> gem5::minor::Pipeline::f2ToF1
protected

Definition at line 82 of file pipeline.hh.

Referenced by evaluate(), isDrained(), and minorTrace().

◆ fetch1

Fetch1 gem5::minor::Pipeline::fetch1
protected

Definition at line 90 of file pipeline.hh.

Referenced by drainResume(), evaluate(), getInstPort(), isDrained(), minorTrace(), and wakeupFetch().

◆ fetch2

Fetch2 gem5::minor::Pipeline::fetch2
protected

Definition at line 89 of file pipeline.hh.

Referenced by evaluate(), isDrained(), and minorTrace().

◆ needToSignalDrained

bool gem5::minor::Pipeline::needToSignalDrained

True after drain is called but draining isn't complete.

Definition at line 109 of file pipeline.hh.

Referenced by drain(), and evaluate().


The documentation for this class was generated from the following files:

Generated on Tue Sep 21 2021 12:31:34 for gem5 by doxygen 1.8.17