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

Handles the current state of lowering of a Calyx component. More...

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

Public Member Functions

 ComponentLoweringState (calyx::ComponentOp component)
 
- Public Member Functions inherited from circt::calyx::ComponentLoweringStateInterface
 ComponentLoweringStateInterface (calyx::ComponentOp component)
 
 ~ComponentLoweringStateInterface ()
 
calyx::ComponentOp getComponentOp ()
 Returns the calyx::ComponentOp associated with this lowering state. More...
 
void addBlockArgReg (Block *block, calyx::RegisterOp reg, unsigned idx)
 Register reg as being the idx'th argument register for block. More...
 
const DenseMap< unsigned, calyx::RegisterOp > & getBlockArgRegs (Block *block)
 Return a mapping of block argument indices to block argument registers. More...
 
void addBlockArgGroup (Block *from, Block *to, calyx::GroupOp grp)
 Register 'grp' as a group which performs block argument register transfer when transitioning from basic block 'from' to 'to'. More...
 
ArrayRef< calyx::GroupOp > getBlockArgGroups (Block *from, Block *to)
 Returns a list of groups to be evaluated to perform the block argument register assignments when transitioning from basic block 'from' to 'to'. More...
 
std::string getUniqueName (StringRef prefix)
 Returns a unique name within compOp with the provided prefix. More...
 
StringRef getUniqueName (Operation *op)
 Returns a unique name associated with a specific operation. More...
 
void setUniqueName (Operation *op, StringRef prefix)
 Registers a unique name for a given operation using a provided prefix. More...
 
void registerEvaluatingGroup (Value v, calyx::GroupInterface group)
 Register value v as being evaluated when scheduling group. More...
 
void addReturnReg (calyx::RegisterOp reg, unsigned idx)
 Register reg as being the idx'th return value register. More...
 
calyx::RegisterOp getReturnReg (unsigned idx)
 Returns the idx'th return value register. More...
 
void registerMemoryInterface (Value memref, const calyx::MemoryInterface &memoryInterface)
 Registers a memory interface as being associated with a memory identified by 'memref'. More...
 
calyx::MemoryInterface getMemoryInterface (Value memref)
 Returns the memory interface registered for the given memref. More...
 
std::optional< calyx::MemoryInterfaceisInputPortOfMemory (Value v)
 If v is an input to any memory registered within this component, returns the memory. More...
 
void setFuncOpResultMapping (const DenseMap< unsigned, unsigned > &mapping)
 Assign a mapping between the source funcOp result indices and the corresponding output port indices of this componentOp. More...
 
unsigned getFuncOpResultMapping (unsigned funcReturnIdx)
 Get the output port index of this component for which the funcReturnIdx of the original function maps to. More...
 
InstanceOp getInstance (StringRef calleeName)
 The instance is obtained from the name of the callee. More...
 
void addInstance (StringRef calleeName, InstanceOp instanceOp)
 Put the name of the callee and the instance of the call into map. More...
 
template<typename TGroupOp = calyx::GroupInterface>
TGroupOp getEvaluatingGroup (Value v)
 Return the group which evaluates the value v. More...
 
template<typename TLibraryOp >
TLibraryOp getNewLibraryOpInstance (OpBuilder &builder, Location loc, TypeRange resTypes)
 
llvm::json::Value & getExtMemData ()
 
const llvm::json::Value & getExtMemData () const
 
void setDataField (StringRef name, llvm::json::Array data)
 
void setFormat (StringRef name, std::string numType, bool isSigned, unsigned width)
 
- Public Member Functions inherited from circt::calyx::LoopLoweringStateInterface< PipelineWhileOp >
 ~LoopLoweringStateInterface ()=default
 
void addLoopIterReg (PipelineWhileOp op, calyx::RegisterOp reg, unsigned idx)
 Register reg as being the idx'th iter_args register for 'op'. More...
 
calyx::RegisterOp getLoopIterReg (PipelineWhileOp op, unsigned idx)
 Return a mapping of block argument indices to block argument. More...
 
const DenseMap< unsigned, calyx::RegisterOp > & getLoopIterRegs (PipelineWhileOp op)
 Return a mapping of block argument indices to block argument. More...
 
void setLoopLatchGroup (PipelineWhileOp op, calyx::GroupOp group)
 Registers grp to be the loop latch group of op. More...
 
calyx::GroupOp getLoopLatchGroup (PipelineWhileOp op)
 Retrieve the loop latch group registered for op. More...
 
void setLoopInitGroups (PipelineWhileOp op, SmallVector< calyx::GroupOp > groups)
 Registers groups to be the loop init groups of op. More...
 
SmallVector< calyx::GroupOp > getLoopInitGroups (PipelineWhileOp op)
 Retrieve the loop init groups registered for op. More...
 
calyx::GroupOp buildLoopIterArgAssignments (OpBuilder &builder, PipelineWhileOp op, calyx::ComponentOp componentOp, Twine uniqueSuffix, MutableArrayRef< OpOperand > ops)
 Creates a new group that assigns the 'ops' values to the iter arg registers of the loop operation. More...
 
- Public Member Functions inherited from circt::pipelinetocalyx::PipelineScheduler
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...
 

Detailed Description

Handles the current state of lowering of a Calyx component.

It is mainly used as a key/value store for recording information during partial lowering, which is required at later lowering passes.

Definition at line 193 of file LoopScheduleToCalyx.cpp.

Constructor & Destructor Documentation

◆ ComponentLoweringState()

circt::pipelinetocalyx::ComponentLoweringState::ComponentLoweringState ( calyx::ComponentOp  component)
inline

Definition at line 198 of file LoopScheduleToCalyx.cpp.


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