Otawa  0.10
otawa::ParExeProc Class Reference

Représentation of a processor (to be used to build a ParExeGraph). More...

#include <otawa/parexegraph/ParExeProc.h>

Classes

class  QueueIterator
 Iterator for the instruction queues. More...
 

Public Types

enum  instruction_category_t {
  IALU = 0, FALU = 1, MEMORY = 2, CONTROL = 3,
  MUL = 4, DIV = 5, INST_CATEGORY_NUMBER
}
 
typedef enum
otawa::ParExeProc::instruction_category_t 
instruction_category_t
 

Public Member Functions

 ParExeProc (const hard::Processor *proc)
 Constructor. More...
 
void addQueue (elm::String name, int size)
 Add an instruction queue to the processor. More...
 
ParExeQueuequeue (int index)
 Returns a pointer to the queue specified by index. More...
 
void setFetchStage (ParExeStage *stage)
 Declares a stage as the fetch stage (it will undergo a special processing when building a ParExeGraph). More...
 
ParExeStagefetchStage (void)
 
void setExecStage (ParExeStage *stage)
 Declares a stage as the execution stage (it will undergo a special processing when building a ParExeGraph). More...
 
ParExeStageexecStage (void)
 
ParExeStagelastStage (void)
 
bool isLastStage (ParExeStage *stage)
 
ParExePipelinepipeline ()
 
elm::genstruct::SLList
< ParExeStage * > * 
listOfInorderStages ()
 

Private Attributes

elm::genstruct::Vector
< ParExeQueue * > 
_queues
 
ParExePipeline _pipeline
 
elm::genstruct::SLList
< ParExeStage * > 
_inorder_stages
 
ParExeStage_fetch_stage
 
ParExeStage_exec_stage
 

Detailed Description

Représentation of a processor (to be used to build a ParExeGraph).

A processor is a pipeline, with a number of stages, among which a fetch stage and an execution stage, and a set of instruction queues.

See also
Parametric Execution Graph

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
IALU 
FALU 
MEMORY 
CONTROL 
MUL 
DIV 
INST_CATEGORY_NUMBER 

Constructor & Destructor Documentation

Member Function Documentation

void otawa::ParExeProc::addQueue ( elm::String  name,
int  size 
)
inline

Add an instruction queue to the processor.

Parameters
nameName of the queue.
sizeSize (capacity) of the queue.

Referenced by ParExeProc().

ParExeStage * otawa::ParExeProc::execStage ( void  )
inline
Returns
Pointer to the execution stage (must have been set beforehand).

Referenced by otawa::ParExeGraph::addEdgesForDataDependencies(), and otawa::ParExeGraph::addEdgesForMemoryOrder().

ParExeStage * otawa::ParExeProc::fetchStage ( void  )
inline
Returns
Pointer to the fetch stage (must have been set beforehand).

Referenced by otawa::ParExeGraph::addEdgesForFetch().

bool otawa::ParExeProc::isLastStage ( ParExeStage stage)
inline
Parameters
stagePointer to a stage.
Returns
True if the stage is the last in the pipeline.
ParExeStage* otawa::ParExeProc::lastStage ( void  )
inline
elm::genstruct::SLList<ParExeStage *>* otawa::ParExeProc::listOfInorderStages ( )
inline
ParExeQueue * otawa::ParExeProc::queue ( int  index)
inline

Returns a pointer to the queue specified by index.

Queues are numbered when they are added to the processor.

Parameters
indexIndex of the queue.
Returns
Pointer to the indexed queue.

Referenced by ParExeProc().

void otawa::ParExeProc::setExecStage ( ParExeStage stage)
inline

Declares a stage as the execution stage (it will undergo a special processing when building a ParExeGraph).

Parameters
stagePointer to the stage.

Referenced by ParExeProc().

void otawa::ParExeProc::setFetchStage ( ParExeStage stage)
inline

Declares a stage as the fetch stage (it will undergo a special processing when building a ParExeGraph).

Parameters
stagePointer to the stage.

Referenced by ParExeProc().

Member Data Documentation

ParExeStage* otawa::ParExeProc::_exec_stage
private
ParExeStage* otawa::ParExeProc::_fetch_stage
private
elm::genstruct::SLList<ParExeStage *> otawa::ParExeProc::_inorder_stages
private

Referenced by ParExeProc().

ParExePipeline otawa::ParExeProc::_pipeline
private

Referenced by ParExeProc().

elm::genstruct::Vector<ParExeQueue *> otawa::ParExeProc::_queues
private

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