CIRCT  20.0.0git
Public Member Functions | Private Attributes | List of all members
circt::pipelinetocalyx::PipelineScheduler Class Reference

Holds additional information required for scheduling Pipeline pipelines. More...

Inheritance diagram for circt::pipelinetocalyx::PipelineScheduler:
Inheritance graph
[legend]
Collaboration diagram for circt::pipelinetocalyx::PipelineScheduler:
Collaboration graph
[legend]

Public Member Functions

void registerNonPipelineOperations (Operation *op, calyx::GroupInterface group)
 Registers operations that may be used in a pipeline, but does not produce a value to be used in a further stage. More...
 
template<typename TGroupOp = calyx::GroupInterface>
std::optional< TGroupOp > getNonPipelinedGroupFrom (Operation *op)
 Returns the group registered for this non-pipelined value, and None otherwise. More...
 
void addPipelineReg (Operation *stage, calyx::RegisterOp reg, unsigned idx)
 Register reg as being the idx'th pipeline register for the stage. More...
 
const DenseMap< unsigned, calyx::RegisterOp > & getPipelineRegs (Operation *stage)
 Return a mapping of stage result indices to pipeline registers. More...
 
void addPipelinePrologue (Operation *op, SmallVector< StringAttr > groupNames)
 Add a stage's groups to the pipeline prologue. More...
 
void addPipelineEpilogue (Operation *op, SmallVector< StringAttr > groupNames)
 Add a stage's groups to the pipeline epilogue. More...
 
SmallVector< SmallVector< StringAttr > > getPipelinePrologue (Operation *op)
 Get the pipeline prologue. More...
 
void createPipelinePrologue (Operation *op, PatternRewriter &rewriter)
 Create the pipeline prologue. More...
 
void createPipelineEpilogue (Operation *op, PatternRewriter &rewriter)
 Create the pipeline epilogue. More...
 
- Public Member Functions inherited from circt::calyx::SchedulerInterface< Scheduleable >
void addBlockScheduleable (mlir::Block *block, const Scheduleable &scheduleable)
 Register 'scheduleable' as being generated through lowering 'block'. More...
 
SmallVector< ScheduleablegetBlockScheduleables (mlir::Block *block)
 Returns an ordered list of schedulables which registered themselves to be a result of lowering the block in the source program. More...
 

Private Attributes

DenseMap< Operation *, calyx::GroupInterface > operationToGroup
 A mapping between operations and the group to which it was assigned. More...
 
DenseMap< Operation *, DenseMap< unsigned, calyx::RegisterOp > > pipelineRegs
 A mapping from pipeline stages to their registers. More...
 
DenseMap< Operation *, SmallVector< SmallVector< StringAttr > > > pipelinePrologue
 A mapping from pipeline ops to a vector of vectors of group names that constitute the pipeline prologue. More...
 
DenseMap< Operation *, SmallVector< SmallVector< StringAttr > > > pipelineEpilogue
 A mapping from pipeline ops to a vector of vectors of group names that constitute the pipeline epilogue. More...
 

Detailed Description

Holds additional information required for scheduling Pipeline pipelines.

Definition at line 91 of file LoopScheduleToCalyx.cpp.

Member Function Documentation

◆ addPipelineEpilogue()

void circt::pipelinetocalyx::PipelineScheduler::addPipelineEpilogue ( Operation *  op,
SmallVector< StringAttr >  groupNames 
)
inline

Add a stage's groups to the pipeline epilogue.

Definition at line 135 of file LoopScheduleToCalyx.cpp.

◆ addPipelinePrologue()

void circt::pipelinetocalyx::PipelineScheduler::addPipelinePrologue ( Operation *  op,
SmallVector< StringAttr >  groupNames 
)
inline

Add a stage's groups to the pipeline prologue.

Definition at line 130 of file LoopScheduleToCalyx.cpp.

◆ addPipelineReg()

void circt::pipelinetocalyx::PipelineScheduler::addPipelineReg ( Operation *  stage,
calyx::RegisterOp  reg,
unsigned  idx 
)
inline

Register reg as being the idx'th pipeline register for the stage.

Definition at line 117 of file LoopScheduleToCalyx.cpp.

References assert(), and seq::reg().

◆ createPipelineEpilogue()

void circt::pipelinetocalyx::PipelineScheduler::createPipelineEpilogue ( Operation *  op,
PatternRewriter &  rewriter 
)
inline

Create the pipeline epilogue.

Definition at line 158 of file LoopScheduleToCalyx.cpp.

◆ createPipelinePrologue()

void circt::pipelinetocalyx::PipelineScheduler::createPipelinePrologue ( Operation *  op,
PatternRewriter &  rewriter 
)
inline

Create the pipeline prologue.

Definition at line 145 of file LoopScheduleToCalyx.cpp.

◆ getNonPipelinedGroupFrom()

template<typename TGroupOp = calyx::GroupInterface>
std::optional<TGroupOp> circt::pipelinetocalyx::PipelineScheduler::getNonPipelinedGroupFrom ( Operation *  op)
inline

Returns the group registered for this non-pipelined value, and None otherwise.

Definition at line 103 of file LoopScheduleToCalyx.cpp.

References assert().

◆ getPipelinePrologue()

SmallVector<SmallVector<StringAttr> > circt::pipelinetocalyx::PipelineScheduler::getPipelinePrologue ( Operation *  op)
inline

Get the pipeline prologue.

Definition at line 140 of file LoopScheduleToCalyx.cpp.

◆ getPipelineRegs()

const DenseMap<unsigned, calyx::RegisterOp>& circt::pipelinetocalyx::PipelineScheduler::getPipelineRegs ( Operation *  stage)
inline

Return a mapping of stage result indices to pipeline registers.

Definition at line 125 of file LoopScheduleToCalyx.cpp.

◆ registerNonPipelineOperations()

void circt::pipelinetocalyx::PipelineScheduler::registerNonPipelineOperations ( Operation *  op,
calyx::GroupInterface  group 
)
inline

Registers operations that may be used in a pipeline, but does not produce a value to be used in a further stage.

Definition at line 95 of file LoopScheduleToCalyx.cpp.

Member Data Documentation

◆ operationToGroup

DenseMap<Operation *, calyx::GroupInterface> circt::pipelinetocalyx::PipelineScheduler::operationToGroup
private

A mapping between operations and the group to which it was assigned.

This is used for specific corner cases, such as pipeline stages that may not actually pipeline any values.

Definition at line 174 of file LoopScheduleToCalyx.cpp.

◆ pipelineEpilogue

DenseMap<Operation *, SmallVector<SmallVector<StringAttr> > > circt::pipelinetocalyx::PipelineScheduler::pipelineEpilogue
private

A mapping from pipeline ops to a vector of vectors of group names that constitute the pipeline epilogue.

Each inner vector consists of the groups for one stage.

Definition at line 187 of file LoopScheduleToCalyx.cpp.

◆ pipelinePrologue

DenseMap<Operation *, SmallVector<SmallVector<StringAttr> > > circt::pipelinetocalyx::PipelineScheduler::pipelinePrologue
private

A mapping from pipeline ops to a vector of vectors of group names that constitute the pipeline prologue.

Each inner vector consists of the groups for one stage.

Definition at line 182 of file LoopScheduleToCalyx.cpp.

◆ pipelineRegs

DenseMap<Operation *, DenseMap<unsigned, calyx::RegisterOp> > circt::pipelinetocalyx::PipelineScheduler::pipelineRegs
private

A mapping from pipeline stages to their registers.

Definition at line 177 of file LoopScheduleToCalyx.cpp.


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