CIRCT  19.0.0git
Public Member Functions | Private Attributes | List of all members
circt::calyx::SchedulerInterface< T > Class Template Reference

Holds common utilities used for scheduling when lowering to Calyx. More...

#include <CalyxLoweringUtils.h>

Inheritance diagram for circt::calyx::SchedulerInterface< T >:
Inheritance graph
[legend]
Collaboration diagram for circt::calyx::SchedulerInterface< T >:
Collaboration graph
[legend]

Public Member Functions

void addBlockScheduleable (mlir::Block *block, const T &scheduleable)
 Register 'scheduleable' as being generated through lowering 'block'. More...
 
SmallVector< T > getBlockScheduleables (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< mlir::Block *, SmallVector< T > > blockScheduleables
 BlockScheduleables is a list of scheduleables that should be sequentially executed when executing the associated basic block. More...
 

Detailed Description

template<typename T>
class circt::calyx::SchedulerInterface< T >

Holds common utilities used for scheduling when lowering to Calyx.

Definition at line 195 of file CalyxLoweringUtils.h.

Member Function Documentation

◆ addBlockScheduleable()

template<typename T >
void circt::calyx::SchedulerInterface< T >::addBlockScheduleable ( mlir::Block *  block,
const T &  scheduleable 
)
inline

Register 'scheduleable' as being generated through lowering 'block'.

TODO(mortbopet): Add a post-insertion check to ensure that the use-def ordering invariant holds for the groups. When the control schedule is generated, scheduleables within a block are emitted sequentially based on the order that this function was called during conversion.

Currently, we assume this to always be true. Walking the FuncOp IR implies sequential iteration over operations within basic blocks.

Definition at line 206 of file CalyxLoweringUtils.h.

References circt::calyx::SchedulerInterface< T >::blockScheduleables.

◆ getBlockScheduleables()

template<typename T >
SmallVector<T> circt::calyx::SchedulerInterface< T >::getBlockScheduleables ( mlir::Block *  block)
inline

Returns an ordered list of schedulables which registered themselves to be a result of lowering the block in the source program.

The list order follows def-use chains between the scheduleables in the block.

In cases of a block resulting in purely combinational logic, no scheduleables registered themselves with the block.

Definition at line 213 of file CalyxLoweringUtils.h.

References circt::calyx::SchedulerInterface< T >::blockScheduleables.

Member Data Documentation

◆ blockScheduleables

template<typename T >
DenseMap<mlir::Block *, SmallVector<T> > circt::calyx::SchedulerInterface< T >::blockScheduleables
private

BlockScheduleables is a list of scheduleables that should be sequentially executed when executing the associated basic block.

Definition at line 225 of file CalyxLoweringUtils.h.

Referenced by circt::calyx::SchedulerInterface< T >::addBlockScheduleable(), and circt::calyx::SchedulerInterface< T >::getBlockScheduleables().


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