Otawa  0.10
otawa::hard::Stage Class Reference

This class represents a stage in a pipeline. More...

#include <otawa/hard/Processor.h>

Inheritance diagram for otawa::hard::Stage:
otawa::hard::PipelineUnit

Public Types

enum  type_t {
  NONE = 0, FETCH, LAZY, EXEC,
  COMMIT, DECOMP
}
 
typedef enum
otawa::hard::Stage::type_t 
type_t
 

Public Member Functions

 Stage (type_t _type=NONE)
 
virtual ~Stage (void)
 
type_t getType (void) const
 
const Table< FunctionalUnit * > & getFUs (void) const
 
const Table< Dispatch * > & getDispatch (void) const
 
bool isOrdered (void) const
 
template<class T >
select (Inst *inst, const T table[]) const
 
template<class T >
select (Inst::kind_t kind, const T table[]) const
 
elm::String getName (void) const
 
int getLatency (void) const
 
int getWidth (void) const
 
bool isBranch (void) const
 
bool isMem (void) const
 

Protected Attributes

string name
 
int latency
 
int width
 
bool branch
 
bool mem
 

Private Member Functions

 SERIALIZABLE (otawa::hard::Stage, BASE(otawa::hard::PipelineUnit)&FIELD(type)&FIELD(fus)&FIELD(dispatch)&FIELD(ordered))
 

Private Attributes

type_t type
 
AllocatedTable< FunctionalUnit * > fus
 
AllocatedTable< Dispatch * > dispatch
 
bool ordered
 

Friends

class StageBuilder
 

Detailed Description

This class represents a stage in a pipeline.

The stages have a type:

  • otawa::hard::Stage::FETCH – a stage loading instruction from memory (usually the initial stage of a pipeline).
  • otawa::hard::Stage::LAZY – a simple stage that is traversed by instructions,
  • otawa::hard::Stage::EXEC – a stage that performs execution of instructions (it contains functionnal units that performs the work of the instructions),
  • otawa::hard::Stage::COMMIT – a stage that writes result of an instruction in the processor state (usually the end of the traversal of the instructions).

The stages are described by the following attributes:

  • the name,
  • the width (number of instructions traversing in parallel the stage),
  • the latency (number of cycles taken to traverse the stage),
  • the order (is the instructions traversal perform in program order or not),
  • for the EXEC stage only, a functionnal unit list (otawa::hard::FunctionalUnit) and dispatch list (otawa::hard::Dispatch).

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
NONE 
FETCH 
LAZY 
EXEC 
COMMIT 
DECOMP 

Constructor & Destructor Documentation

otawa::hard::Stage::Stage ( type_t  _type = NONE)
inline
virtual otawa::hard::Stage::~Stage ( void  )
inlinevirtual

Member Function Documentation

const Table<Dispatch *>& otawa::hard::Stage::getDispatch ( void  ) const
inline
const Table<FunctionalUnit *>& otawa::hard::Stage::getFUs ( void  ) const
inline
int otawa::hard::PipelineUnit::getLatency ( void  ) const
inlineinherited
elm::String otawa::hard::PipelineUnit::getName ( void  ) const
inlineinherited

References name.

Referenced by otawa::ParExeProc::ParExeProc().

type_t otawa::hard::Stage::getType ( void  ) const
inline

References otawa::type().

Referenced by otawa::ParExeProc::ParExeProc().

int otawa::hard::PipelineUnit::getWidth ( void  ) const
inlineinherited

References width().

Referenced by otawa::ParExeProc::ParExeProc().

bool otawa::hard::PipelineUnit::isBranch ( void  ) const
inlineinherited

References otawa::sem::branch().

bool otawa::hard::PipelineUnit::isMem ( void  ) const
inlineinherited
bool otawa::hard::Stage::isOrdered ( void  ) const
inline
template<class T >
T otawa::hard::Stage::select ( Inst inst,
const T  table[] 
) const
inline

References otawa::Inst::kind().

template<class T >
T otawa::hard::Stage::select ( Inst::kind_t  kind,
const T  table[] 
) const
inline
otawa::hard::Stage::SERIALIZABLE ( otawa::hard::Stage  ,
BASE(otawa::hard::PipelineUnit)&FIELD(type)&FIELD(fus)&FIELD(dispatch)&FIELD(ordered  
)
private

Friends And Related Function Documentation

friend class StageBuilder
friend

Member Data Documentation

bool otawa::hard::PipelineUnit::branch
protectedinherited
AllocatedTable<Dispatch *> otawa::hard::Stage::dispatch
private
AllocatedTable<FunctionalUnit *> otawa::hard::Stage::fus
private
int otawa::hard::PipelineUnit::latency
protectedinherited
bool otawa::hard::PipelineUnit::mem
protectedinherited
string otawa::hard::PipelineUnit::name
protectedinherited
bool otawa::hard::Stage::ordered
private
type_t otawa::hard::Stage::type
private
int otawa::hard::PipelineUnit::width
protectedinherited

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