gem5 v25.0.0.1
Loading...
Searching...
No Matches
gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits > Class Template Reference

A pipeline simulating class that will stall (not advance when advance() is called) if a non-bubble value lies at the far end of the pipeline. More...

#include <buffers.hh>

Inheritance diagram for gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >:
gem5::minor::MinorBuffer< ElemType, ReportTraits > gem5::Named gem5::TimeBuffer< ElemType >

Public Member Functions

 SelfStallingPipeline (const std::string &name, const std::string &data_name, unsigned depth)
void push (ElemType &elem)
 Write an element to the back of the pipeline.
ElemType & front ()
 Peek at the end element of the pipe.
const ElemType & front () const
bool alreadyPushed ()
 Have we already pushed onto this pipe without advancing.
bool isPopable ()
 There's data (not a bubble) at the end of the pipe.
void advance ()
 Try to advance the pipeline.
Public Member Functions inherited from gem5::minor::MinorBuffer< ElemType, ReportTraits >
 MinorBuffer (const std::string &name, const std::string &data_name, int num_past, int num_future, int report_left=-1, int report_right=-1)
bool empty () const
void minorTrace () const
 Report buffer states from 'slot' 'from' to 'to'.
Public Member Functions inherited from gem5::Named
 Named (std::string_view name_)
virtual ~Named ()=default
virtual std::string name () const
Public Member Functions inherited from gem5::TimeBuffer< ElemType >
 TimeBuffer (int p, int f)
 ~TimeBuffer ()
void id (int id)
void advance ()
ElemType * access (int idx)
ElemType & operator[] (int idx)
wire getWire (int idx)
wire zero ()
unsigned getSize ()
int getPast () const
int getFuture () const

Public Attributes

bool stalled
 If true, advance will not advance the pipeline.
unsigned int occupancy
 The number of slots with non-bubbles in them.

Protected Attributes

TimeBuffer< ElemType >::wire pushWire
 Wire at the input end of the pipeline (for convenience)
TimeBuffer< ElemType >::wire popWire
 Wire at the output end of the pipeline (for convenience)
Protected Attributes inherited from gem5::minor::MinorBuffer< ElemType, ReportTraits >
int reportLeft
 The range of elements that should appear in trace lines.
int reportRight
std::string dataName
 Name to use for the data in a MinorTrace line.
Protected Attributes inherited from gem5::TimeBuffer< ElemType >
int past
int future
unsigned size
int _id
char * data
std::vector< char * > index
unsigned base

Additional Inherited Members

Protected Member Functions inherited from gem5::TimeBuffer< ElemType >
void valid (int idx) const
int calculateVectorIndex (int idx) const

Detailed Description

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
class gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >

A pipeline simulating class that will stall (not advance when advance() is called) if a non-bubble value lies at the far end of the pipeline.

The user can clear the stall before calling advance to unstall the pipeline.

Definition at line 293 of file buffers.hh.

Constructor & Destructor Documentation

◆ SelfStallingPipeline()

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::SelfStallingPipeline ( const std::string & name,
const std::string & data_name,
unsigned depth )
inline

Definition at line 309 of file buffers.hh.

Member Function Documentation

◆ advance()

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
void gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::advance ( )
inline

Try to advance the pipeline.

If we're stalled, don't advance. If we're not stalled, advance then check to see if we become stalled (a non-bubble at the end of the pipe)

Definition at line 355 of file buffers.hh.

◆ alreadyPushed()

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
bool gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::alreadyPushed ( )
inline

Have we already pushed onto this pipe without advancing.

Definition at line 346 of file buffers.hh.

Referenced by gem5::minor::SelfStallingPipeline< QueuedInst, ReportTraitsAdaptor< QueuedInst > >::push().

◆ front() [1/2]

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
ElemType & gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::front ( )
inline

Peek at the end element of the pipe.

Definition at line 341 of file buffers.hh.

Referenced by gem5::minor::SelfStallingPipeline< QueuedInst, ReportTraitsAdaptor< QueuedInst > >::isPopable().

◆ front() [2/2]

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
const ElemType & gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::front ( ) const
inline

Definition at line 343 of file buffers.hh.

◆ isPopable()

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
bool gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::isPopable ( )
inline

There's data (not a bubble) at the end of the pipe.

Definition at line 349 of file buffers.hh.

Referenced by gem5::minor::SelfStallingPipeline< QueuedInst, ReportTraitsAdaptor< QueuedInst > >::advance().

◆ push()

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
void gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::push ( ElemType & elem)
inline

Write an element to the back of the pipeline.

This doesn't cause the pipeline to advance until advance is called. Pushing twice without advance-ing will just cause an overwrite of the last push's data.

Definition at line 332 of file buffers.hh.

Member Data Documentation

◆ occupancy

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
unsigned int gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::occupancy

The number of slots with non-bubbles in them.

Definition at line 306 of file buffers.hh.

◆ popWire

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
TimeBuffer<ElemType>::wire gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::popWire
protected

Wire at the output end of the pipeline (for convenience)

Definition at line 299 of file buffers.hh.

◆ pushWire

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
TimeBuffer<ElemType>::wire gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::pushWire
protected

Wire at the input end of the pipeline (for convenience)

Definition at line 297 of file buffers.hh.

◆ stalled

template<typename ElemType, typename ReportTraits, typename BubbleTraits = BubbleTraitsAdaptor<ElemType>>
bool gem5::minor::SelfStallingPipeline< ElemType, ReportTraits, BubbleTraits >::stalled

If true, advance will not advance the pipeline.

Definition at line 303 of file buffers.hh.


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

Generated on Sat Oct 18 2025 08:06:59 for gem5 by doxygen 1.14.0