CIRCT
20.0.0git
|
Classes | |
class | HandshakeLowering |
struct | MemLoadInterface |
struct | MemStoreInterface |
class | HandshakeVisitor |
HandshakeVisitor is a visitor for handshake nodes. More... | |
Typedefs | |
using | RegionLoweringFunc = llvm::function_ref< LogicalResult(Region &, ConversionPatternRewriter &)> |
using | InstanceGraph = std::map< std::string, std::set< std::string > > |
Iterates over the handshake::FuncOp's in the program to build an instance graph. More... | |
Functions | |
LogicalResult | partiallyLowerRegion (const RegionLoweringFunc &loweringFunc, MLIRContext *ctx, Region &r) |
template<typename T , typename... TArgs, typename... TArgs2> | |
LogicalResult | runPartialLowering (T &instance, LogicalResult(T::*memberFunc)(ConversionPatternRewriter &, TArgs2...), TArgs &...args) |
void | removeBasicBlocks (Region &r) |
Remove basic blocks inside the given region. More... | |
template<typename TSrcTerm , typename TDstTerm > | |
LogicalResult | lowerRegion (HandshakeLowering &hl, bool sourceConstants, bool disableTaskPipelining, Value entryCtrl) |
LogicalResult | postDataflowConvert (Operation *op) |
Lowers the mlir operations into handshake that are not part of the dataflow conversion. More... | |
Type | toValidType (Type t) |
Converts 't' into a valid HW type. More... | |
bool | isControlOpImpl (Operation *op) |
Default implementation for checking whether an operation is a control operation. More... | |
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > | createHandshakeDotPrintPass () |
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > | createHandshakeOpCountPass () |
std::unique_ptr< mlir::Pass > | createHandshakeMaterializeForksSinksPass () |
std::unique_ptr< mlir::Pass > | createHandshakeDematerializeForksSinksPass () |
std::unique_ptr< mlir::Pass > | createHandshakeRemoveBuffersPass () |
std::unique_ptr< mlir::Pass > | createHandshakeAddIDsPass () |
std::unique_ptr< mlir::Pass > | createHandshakeLowerExtmemToHWPass (std::optional< bool > createESIWrapper={}) |
std::unique_ptr< mlir::Pass > | createHandshakeLegalizeMemrefsPass () |
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > | createHandshakeInsertBuffersPass (const std::string &strategy="all", unsigned bufferSize=2) |
std::unique_ptr< mlir::Pass > | createHandshakeLockFunctionsPass () |
std::unique_ptr< mlir::Pass > | createHandshakeSplitMergesPass () |
LogicalResult | resolveInstanceGraph (ModuleOp moduleOp, InstanceGraph &instanceGraph, std::string &topLevel, SmallVectorImpl< std::string > &sortedFuncs) |
Iterates over the handshake::FuncOp's in the program to build an instance graph. More... | |
LogicalResult | verifyAllValuesHasOneUse (handshake::FuncOp op) |
Checks all block arguments and values within op to ensure that all values have exactly one use. More... | |
esi::ChannelType | esiWrapper (Type t) |
Wraps a type into an ESI ChannelType type. More... | |
hw::ModulePortInfo | getPortInfoForOpTypes (mlir::Operation *op, TypeRange inputs, TypeRange outputs) |
Returns the hw::ModulePortInfo that corresponds to the given handshake operation and its in- and output types. More... | |
void | insertFork (Value result, bool isLazy, OpBuilder &rewriter) |
Adds fork operations to any value with multiple uses in r. More... | |
bool | simulate (llvm::StringRef toplevelFunction, llvm::ArrayRef< std::string > inputArgs, mlir::OwningOpRef< mlir::ModuleOp > &module, mlir::MLIRContext &context) |
template<typename TMemOp > | |
static bool | executeMemoryOperation (TMemOp op, unsigned buffer, int opIndex, llvm::DenseMap< mlir::Value, llvm::Any > &valueMap, llvm::DenseMap< unsigned, unsigned > &memoryMap, llvm::DenseMap< mlir::Value, double > &timeMap, std::vector< std::vector< llvm::Any >> &store, std::vector< mlir::Value > &scheduleList) |
Variables | |
static constexpr const char * | kPredeclarationAttr = "handshake.module_name" |
Attribute name for the name of a predeclaration of the to-be-lowered hw.module from a handshake function. More... | |
using circt::handshake::InstanceGraph = typedef std::map<std::string, std::set<std::string> > |
Iterates over the handshake::FuncOp's in the program to build an instance graph.
In doing so, we detect whether there are any cycles in this graph, as well as infer a top function for the design by performing a topological sort of the instance graph. The result of this sort is placed in sortedFuncs.
Definition at line 25 of file HandshakeUtils.h.
using circt::handshake::RegionLoweringFunc = typedef llvm::function_ref<LogicalResult(Region &, ConversionPatternRewriter &)> |
Definition at line 42 of file CFToHandshake.h.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeAddIDsPass | ( | ) |
Definition at line 631 of file Analysis.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeDematerializeForksSinksPass | ( | ) |
Definition at line 143 of file Materialization.cpp.
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > circt::handshake::createHandshakeDotPrintPass | ( | ) |
Definition at line 622 of file Analysis.cpp.
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > circt::handshake::createHandshakeInsertBuffersPass | ( | const std::string & | strategy = "all" , |
unsigned | bufferSize = 2 |
||
) |
Definition at line 225 of file Buffers.cpp.
References strategy.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeLegalizeMemrefsPass | ( | ) |
Definition at line 101 of file LegalizeMemrefs.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeLockFunctionsPass | ( | ) |
Definition at line 94 of file LockFunctions.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeLowerExtmemToHWPass | ( | std::optional< bool > | createESIWrapper = {} | ) |
Definition at line 489 of file LowerExtmemToHW.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeMaterializeForksSinksPass | ( | ) |
Definition at line 138 of file Materialization.cpp.
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > circt::handshake::createHandshakeOpCountPass | ( | ) |
Definition at line 627 of file Analysis.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeRemoveBuffersPass | ( | ) |
Definition at line 220 of file Buffers.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeSplitMergesPass | ( | ) |
Definition at line 142 of file SplitMerges.cpp.
esi::ChannelType circt::handshake::esiWrapper | ( | Type | t | ) |
Wraps a type into an ESI ChannelType type.
The inner type is converted to ensure comprehensability by the RTL dialects.
Definition at line 271 of file HandshakeUtils.cpp.
References circt::calyx::direction::get(), toValidType(), and tupleToStruct().
|
static |
Definition at line 274 of file HandshakeExecutableOps.cpp.
References assert().
hw::ModulePortInfo circt::handshake::getPortInfoForOpTypes | ( | mlir::Operation * | op, |
TypeRange | inputs, | ||
TypeRange | outputs | ||
) |
Returns the hw::ModulePortInfo that corresponds to the given handshake operation and its in- and output types.
Referenced by getPortInfoForOp().
void circt::handshake::insertFork | ( | Value | result, |
bool | isLazy, | ||
OpBuilder & | rewriter | ||
) |
Adds fork operations to any value with multiple uses in r.
Definition at line 247 of file HandshakeUtils.cpp.
References replaceFirstUse().
Referenced by addForkOps().
bool circt::handshake::isControlOpImpl | ( | Operation * | op | ) |
Default implementation for checking whether an operation is a control operation.
This function cannot be defined within ControlInterface because its implementation attempts to cast the operation to an SOSTInterface, which may not be declared at the point where the default trait's method is defined. Therefore, the default implementation of ControlInterface's isControl method simply calls this function.
Definition at line 43 of file HandshakeOps.cpp.
LogicalResult circt::handshake::lowerRegion | ( | HandshakeLowering & | hl, |
bool | sourceConstants, | ||
bool | disableTaskPipelining, | ||
Value | entryCtrl | ||
) |
Definition at line 193 of file CFToHandshake.h.
References circt::handshake::HandshakeLowering::addBranchOps(), circt::handshake::HandshakeLowering::addMergeOps(), circt::handshake::HandshakeLowering::connectConstantsToControl(), circt::handshake::HandshakeLowering::connectToMemory(), circt::handshake::HandshakeLowering::feedForwardRewriting(), circt::handshake::HandshakeLowering::getRegion(), circt::handshake::HandshakeLowering::loopNetworkRewriting(), removeBasicBlocks(), circt::handshake::HandshakeLowering::replaceCallOps(), circt::handshake::HandshakeLowering::replaceMemoryOps(), and runPartialLowering().
LogicalResult circt::handshake::partiallyLowerRegion | ( | const RegionLoweringFunc & | loweringFunc, |
MLIRContext * | ctx, | ||
Region & | r | ||
) |
Definition at line 196 of file CFToHandshake.cpp.
Referenced by lowerFuncOp(), and runPartialLowering().
LogicalResult circt::handshake::postDataflowConvert | ( | Operation * | op | ) |
Lowers the mlir operations into handshake that are not part of the dataflow conversion.
void circt::handshake::removeBasicBlocks | ( | Region & | r | ) |
Remove basic blocks inside the given region.
This allows the result to be a valid graph region, since multi-basic block regions are not allowed to be graph regions currently.
Definition at line 225 of file CFToHandshake.cpp.
Referenced by lowerRegion().
LogicalResult circt::handshake::resolveInstanceGraph | ( | ModuleOp | moduleOp, |
InstanceGraph & | instanceGraph, | ||
std::string & | topLevel, | ||
SmallVectorImpl< std::string > & | sortedFuncs | ||
) |
Iterates over the handshake::FuncOp's in the program to build an instance graph.
In doing so, we detect whether there are any cycles in this graph, as well as infer a top module for the design by performing a topological sort of the instance graph. The result of this sort is placed in sortedFuncs.
Definition at line 35 of file HandshakeUtils.cpp.
References assert().
LogicalResult circt::handshake::runPartialLowering | ( | T & | instance, |
LogicalResult(T::*)(ConversionPatternRewriter &, TArgs2...) | memberFunc, | ||
TArgs &... | args | ||
) |
Definition at line 171 of file CFToHandshake.h.
References partiallyLowerRegion().
Referenced by lowerRegion().
bool circt::handshake::simulate | ( | llvm::StringRef | toplevelFunction, |
llvm::ArrayRef< std::string > | inputArgs, | ||
mlir::OwningOpRef< mlir::ModuleOp > & | module, | ||
mlir::MLIRContext & | context | ||
) |
Type circt::handshake::toValidType | ( | Type | t | ) |
Converts 't' into a valid HW type.
This is strictly used for converting 'index' types into a fixed-width type.
Definition at line 154 of file HandshakeUtils.cpp.
References circt::calyx::direction::get(), circt::esi::innerType(), and tupleToStruct().
Referenced by esiWrapper().
LogicalResult circt::handshake::verifyAllValuesHasOneUse | ( | handshake::FuncOp | op | ) |
Checks all block arguments and values within op to ensure that all values have exactly one use.
Definition at line 107 of file HandshakeUtils.cpp.
|
staticconstexpr |
Attribute name for the name of a predeclaration of the to-be-lowered hw.module from a handshake function.
Definition at line 37 of file HandshakeUtils.h.