CIRCT
20.0.0git
|
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/HW/CustomDirectiveImpl.h"
#include "circt/Dialect/HW/HWAttributes.h"
#include "circt/Dialect/HW/HWInstanceImplementation.h"
#include "circt/Dialect/HW/HWSymCache.h"
#include "circt/Dialect/HW/HWVisitors.h"
#include "circt/Dialect/HW/ModuleImplementation.h"
#include "circt/Support/CustomDirectiveImpl.h"
#include "circt/Support/Namespace.h"
#include "circt/Support/Naming.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringSet.h"
#include "circt/Dialect/HW/HW.cpp.inc"
Go to the source code of this file.
Macros | |
#define | GET_OP_CLASSES |
Enumerations | |
enum class | Delimiter { None , Paren , OptionalLessGreater } |
Functions | |
static Value | foldStructExtract (Operation *inputOp, uint32_t fieldIndex) |
static ArrayAttr | arrayOrEmpty (mlir::MLIRContext *context, ArrayRef< Attribute > attrs) |
static void | getAsmBlockArgumentNamesImpl (mlir::Region ®ion, OpAsmSetValueNameFn setNameFn) |
Get a special name to use when printing the entry block arguments of the region contained by an operation in this dialect. More... | |
template<class Op > | |
static bool | hasAdditionalAttributes (Op op, ArrayRef< StringRef > ignoredAttrs={}) |
Check whether an operation has any additional attributes set beyond its standard list of attributes returned by getAttributeNames . More... | |
static LogicalResult | checkAttributes (Operation *op, Attribute attr, Type type) |
static ParseResult | parseParamValue (OpAsmParser &p, Attribute &value, Type &resultType) |
static void | printParamValue (OpAsmPrinter &p, Operation *, Attribute value, Type resultType) |
template<typename ModuleTy > | |
static void | buildModule (OpBuilder &builder, OperationState &result, StringAttr name, const ModulePortInfo &ports, ArrayAttr parameters, ArrayRef< NamedAttribute > attributes, StringAttr comment) |
static void | modifyModuleArgs (MLIRContext *context, ArrayRef< std::pair< unsigned, PortInfo >> insertArgs, ArrayRef< unsigned > removeArgs, ArrayRef< Attribute > oldArgNames, ArrayRef< Type > oldArgTypes, ArrayRef< Attribute > oldArgAttrs, ArrayRef< Location > oldArgLocs, SmallVector< Attribute > &newArgNames, SmallVector< Type > &newArgTypes, SmallVector< Attribute > &newArgAttrs, SmallVector< Location > &newArgLocs, Block *body=nullptr) |
Internal implementation of argument/result insertion and removal on modules. More... | |
static void | modifyModulePorts (Operation *op, ArrayRef< std::pair< unsigned, PortInfo >> insertInputs, ArrayRef< std::pair< unsigned, PortInfo >> insertOutputs, ArrayRef< unsigned > removeInputs, ArrayRef< unsigned > removeOutputs, Block *body=nullptr) |
Insert and remove ports of a module. More... | |
static bool | hasAttribute (StringRef name, ArrayRef< NamedAttribute > attrs) |
template<typename ModuleTy > | |
static ParseResult | parseHWModuleOp (OpAsmParser &parser, OperationState &result) |
FunctionType | getHWModuleOpType (Operation *op) |
template<typename ModuleTy > | |
static void | printModuleOp (OpAsmPrinter &p, ModuleTy mod) |
static LogicalResult | verifyModuleCommon (HWModuleLike module) |
template<typename ModTy > | |
static SmallVector< Location > | getAllPortLocs (ModTy module) |
template<typename ModTy > | |
static void | setAllPortNames (ArrayRef< Attribute > names, ModTy module) |
template<typename ModTy > | |
static void | setHWModuleType (ModTy &mod, ModuleType type) |
template<typename ModuleTy > | |
static SmallVector< PortInfo > | getPortList (ModuleTy &mod) |
template<typename ModuleTy > | |
static PortInfo | getPort (ModuleTy &mod, size_t idx) |
static ParseResult | parseSliceTypes (OpAsmParser &p, Type &srcType, Type &idxType) |
static void | printSliceTypes (OpAsmPrinter &p, Operation *, Type srcType, Type idxType) |
static LogicalResult | foldCreateToSlice (ArrayCreateOp op, PatternRewriter &rewriter) |
static std::optional< uint64_t > | getUIntFromValue (Value value) |
static ParseResult | parseArrayConcatTypes (OpAsmParser &p, SmallVectorImpl< Type > &inputTypes, Type &resultType) |
static void | printArrayConcatTypes (OpAsmPrinter &p, Operation *, TypeRange inputTypes, Type resultType) |
static bool | flattenConcatOp (ArrayConcatOp op, PatternRewriter &rewriter) |
static bool | mergeConcatSlices (ArrayConcatOp op, PatternRewriter &rewriter) |
template<typename AggregateOp , typename AggregateType > | |
static LogicalResult | verifyAggregateFieldIndexAndType (AggregateOp &op, AggregateType aggType, Type elementType) |
Ensure an aggregate op's field index is within the bounds of the aggregate type and the accessed field is of 'elementType'. More... | |
template<typename AggregateType > | |
static ParseResult | parseExtractOp (OpAsmParser &parser, OperationState &result) |
Use the same parser for both struct_extract and union_extract since the syntax is identical. More... | |
template<typename AggType > | |
static void | printExtractOp (OpAsmPrinter &printer, AggType op) |
Use the same printer for both struct_extract and union_extract since the syntax is identical. More... | |
|
strong |
|
static |
Definition at line 84 of file HWOps.cpp.
References empty, and circt::calyx::direction::get().
Referenced by buildModule().
|
static |
Definition at line 549 of file HWOps.cpp.
References arrayOrEmpty(), and circt::calyx::direction::get().
|
static |
Definition at line 399 of file HWOps.cpp.
References elementType.
|
static |
|
static |
Definition at line 1858 of file HWOps.cpp.
References circt::calyx::direction::get(), and circt::hw::isOffset().
|
static |
|
static |
Definition at line 1198 of file HWOps.cpp.
References assert(), and circt::calyx::direction::get().
|
static |
|
static |
Definition at line 1440 of file HWOps.cpp.
References circt::calyx::direction::get().
|
static |
Definition at line 1420 of file HWOps.cpp.
References circt::calyx::direction::get().
|
static |
|
static |
|
static |
Definition at line 893 of file HWOps.cpp.
Referenced by parseHWModuleOp().
|
static |
Definition at line 2141 of file HWOps.cpp.
References append(), circt::calyx::direction::get(), and circt::hw::isOffset().
|
static |
Internal implementation of argument/result insertion and removal on modules.
Definition at line 587 of file HWOps.cpp.
References assert(), circt::calyx::direction::get(), and InOut.
Referenced by modifyModulePorts().
|
static |
Insert and remove ports of a module.
The insertion and removal indices must be in ascending order. The indices refer to the port positions before any insertion or removal occurs. Ports inserted at the same index will appear in the module in the same order as they were listed in the insert*
array.
The operation must be any of the module-like operations.
This is marked deprecated as it's only used from HandshakeToHW and PortConverter and is likely broken and not currently tested. Users of this are still written dealing with input and output ports separately, which is an old and broken style.
Definition at line 686 of file HWOps.cpp.
References circt::hw::detail::fnToMod(), circt::calyx::direction::get(), and modifyModuleArgs().
|
static |
Definition at line 2058 of file HWOps.cpp.
References circt::calyx::direction::get().
|
static |
Use the same parser for both struct_extract and union_extract since the syntax is identical.
Definition at line 2482 of file HWOps.cpp.
References circt::calyx::direction::get().
|
static |
Definition at line 901 of file HWOps.cpp.
References hasAttribute(), Output, circt::hw::module_like_impl::parseModuleSignature(), and circt::parseOptionalParameterList().
|
static |
|
static |
Definition at line 1762 of file HWOps.cpp.
References circt::calyx::direction::get().
|
static |
|
static |
|
static |
Definition at line 1023 of file HWOps.cpp.
References circt::hw::module_like_impl::printModuleSignatureNew(), and circt::printOptionalParameterList().
|
static |
|
static |
|
static |
Definition at line 1268 of file HWOps.cpp.
References circt::calyx::direction::get().
|
static |
Definition at line 1341 of file HWOps.cpp.
References circt::calyx::direction::get().
|
static |
Ensure an aggregate op's field index is within the bounds of the aggregate type and the accessed field is of 'elementType'.
Definition at line 2456 of file HWOps.cpp.
References elementType, and circt::hw::getCanonicalType().
|
static |
Definition at line 1078 of file HWOps.cpp.
References assert(), and circt::hw::checkParameterInContext().