CIRCT
19.0.0git
|
Namespaces | |
detail | |
FieldIdImpl | |
instance_like_impl | |
module_like_impl | |
Classes | |
class | InstanceGraph |
HW-specific instance graph with a virtual entry node linking to all publicly visible modules. More... | |
struct | InnerRefNamespaceLike |
Classify operations that are InnerRefNamespace-like, until structure is in place to do this via Traits. More... | |
class | HWModulePortAccessor |
struct | HWReducePatternDialectInterface |
A dialect interface to provide reduction patterns to a reducer tool. More... | |
class | HWSymbolCache |
This stores lookup tables to make manipulating and working with the IR more efficient. More... | |
struct | ModulePort |
class | TypeVariant |
Utility type that wraps a type that may be one of several possible Types. More... | |
class | TypeAliasOr |
class | TypeOpVisitor |
This helps visit TypeOp nodes. More... | |
class | StmtVisitor |
This helps visit TypeOp nodes. More... | |
struct | InnerSymbolNamespace |
struct | InnerSymbolNamespaceCollection |
class | InnerSymTarget |
The target of an inner symbol, the entity the symbol is a handle for. More... | |
class | InnerSymbolTable |
A table of inner symbols and their resolutions. More... | |
class | InnerSymbolTableCollection |
This class represents a collection of InnerSymbolTable's. More... | |
struct | InnerRefNamespace |
This class represents the namespace in which InnerRef's can be resolved. More... | |
class | PortConverterImpl |
class | PortConversion |
Base class for the port conversion of a particular port. More... | |
class | PortConversionBuilder |
class | PortConverter |
struct | PortInfo |
This holds the name, type, direction of a module's ports. More... | |
struct | ModulePortInfo |
This holds a decoded list of input/inout and output ports for a module or instance. More... | |
struct | ModulePortLookupInfo |
Typedefs | |
using | HWModuleBuilder = llvm::function_ref< void(OpBuilder &, HWModulePortAccessor &)> |
Functions | |
enum PEO uint32_t mlir::FailureOr< mlir::Type > | evaluateParametricType (mlir::Location loc, mlir::ArrayAttr parameters, mlir::Type type, bool emitErrors=true) |
Returns a resolved version of 'type' wherein any parameter reference has been evaluated based on the set of provided 'parameters'. More... | |
mlir::FailureOr< mlir::TypedAttr > | evaluateParametricAttr (mlir::Location loc, mlir::ArrayAttr parameters, mlir::Attribute paramAttr, bool emitErrors=true) |
Evaluates a parametric attribute (param.decl.ref/param.expr) based on a set of provided parameter values. More... | |
bool | isParametricType (mlir::Type t) |
Returns true if any part of t is parametric. More... | |
void | populateHWModuleLikeTypeConversionPattern (StringRef moduleLikeOpName, RewritePatternSet &patterns, TypeConverter &converter) |
LogicalResult | verifyInnerSymAttr (InnerSymbolOpInterface op) |
Verification hook for verifying InnerSym Attribute. More... | |
ModulePort::Direction | flip (ModulePort::Direction direction) |
Flip a port direction. More... | |
bool | isAnyModuleOrInstance (Operation *module) |
TODO: Move all these functions to a hw::ModuleLike interface. More... | |
FunctionType | getModuleType (Operation *module) |
Return the signature for the specified module as a function type. More... | |
StringAttr | getVerilogModuleNameAttr (Operation *module) |
Returns the verilog module name attribute or symbol name of any module-like operations. More... | |
StringRef | getVerilogModuleName (Operation *module) |
bool | isValidIndexBitWidth (Value index, Value array) |
bool | isCombinational (Operation *op) |
Return true if the specified operation is a combinational logic op. More... | |
bool | isValidParameterExpression (Attribute attr, Operation *module) |
Return true if the specified attribute tree is made up of nodes that are valid in a parameter expression. More... | |
LogicalResult | checkParameterInContext (Attribute value, Operation *module, Operation *usingOp, bool disallowParamRefs=false) |
Check parameter specified by value to see if it is valid within the scope of the specified module module . More... | |
LogicalResult | checkParameterInContext (Attribute value, ArrayAttr moduleParameters, const std::function< void(std::function< bool(InFlightDiagnostic &)>)> &instanceError, bool disallowParamRefs=false) |
Check parameter specified by value to see if it is valid according to the module's parameters. More... | |
bool | isOffset (Value base, Value index, uint64_t offset) |
std::unique_ptr< mlir::Pass > | createPrintInstanceGraphPass () |
std::unique_ptr< mlir::Pass > | createHWSpecializePass () |
std::unique_ptr< mlir::Pass > | createPrintHWModuleGraphPass () |
std::unique_ptr< mlir::Pass > | createFlattenIOPass (bool recursiveFlag=true, bool flattenExternFlag=false, char joinChar='.') |
std::unique_ptr< mlir::Pass > | createVerifyInnerRefNamespacePass () |
void | registerReducePatternDialectInterface (mlir::DialectRegistry ®istry) |
Register the HW Reduction pattern dialect interface to the given registry. More... | |
static bool | operator== (const ModulePort &a, const ModulePort &b) |
static llvm::hash_code | hash_value (const ModulePort &port) |
mlir::Type | getCanonicalType (mlir::Type type) |
bool | isHWIntegerType (mlir::Type type) |
Return true if the specified type is a value HW Integer type. More... | |
bool | isHWEnumType (mlir::Type type) |
Return true if the specified type is a HW Enum type. More... | |
bool | isHWValueType (mlir::Type type) |
Return true if the specified type can be used as an HW value type, that is the set of types that can be composed together to represent synthesized, hardware but not marker types like InOutType or unknown types from other dialects. More... | |
int64_t | getBitWidth (mlir::Type type) |
Return the hardware bit width of a type. More... | |
bool | hasHWInOutType (mlir::Type type) |
Return true if the specified type contains known marker types like InOutType. More... | |
template<typename... BaseTy> | |
bool | type_isa (Type type) |
template<typename... BaseTy> | |
bool | type_isa_and_nonnull (Type type) |
template<typename BaseTy > | |
BaseTy | type_cast (Type type) |
template<typename BaseTy > | |
BaseTy | type_dyn_cast (Type type) |
template<typename OS > | |
OS & | operator<< (OS &os, const InnerSymTarget &target) |
Printing InnerSymTarget's. More... | |
raw_ostream & | operator<< (raw_ostream &printer, PortInfo port) |
using circt::hw::HWModuleBuilder = typedef llvm::function_ref<void(OpBuilder &, HWModulePortAccessor &)> |
LogicalResult circt::hw::checkParameterInContext | ( | Attribute | value, |
ArrayAttr | moduleParameters, | ||
const std::function< void(std::function< bool(InFlightDiagnostic &)>)> & | instanceError, | ||
bool | disallowParamRefs = false |
||
) |
Check parameter specified by value
to see if it is valid according to the module's parameters.
If not, emit an error to the diagnostic provided as an argument to the lambda 'instanceError' and return failure, otherwise return success.
If disallowParamRefs
is true, then parameter references are not allowed.
Definition at line 128 of file HWOps.cpp.
References checkParameterInContext().
LogicalResult circt::hw::checkParameterInContext | ( | Attribute | value, |
Operation * | module, | ||
Operation * | usingOp, | ||
bool | disallowParamRefs = false |
||
) |
Check parameter specified by value
to see if it is valid within the scope of the specified module module
.
If not, emit an error at the location of usingOp
and return failure, otherwise return success.
If disallowParamRefs
is true, then parameter references are not allowed.
If not, emit an error at the location of usingOp
and return failure, otherwise return success. If usingOp
is null, then no diagnostic is generated.
If disallowParamRefs
is true, then parameter references are not allowed.
Definition at line 202 of file HWOps.cpp.
Referenced by checkParameterInContext(), isValidParameterExpression(), verifyModuleCommon(), and circt::hw::instance_like_impl::verifyParameterStructure().
std::unique_ptr< Pass > circt::hw::createFlattenIOPass | ( | bool | recursiveFlag = true , |
bool | flattenExternFlag = false , |
||
char | joinChar = '.' |
||
) |
Definition at line 521 of file FlattenIO.cpp.
std::unique_ptr< Pass > circt::hw::createHWSpecializePass | ( | ) |
Definition at line 430 of file HWSpecialize.cpp.
std::unique_ptr< mlir::Pass > circt::hw::createPrintHWModuleGraphPass | ( | ) |
Definition at line 40 of file PrintHWModuleGraph.cpp.
std::unique_ptr< mlir::Pass > circt::hw::createPrintInstanceGraphPass | ( | ) |
Definition at line 34 of file HWPrintInstanceGraph.cpp.
std::unique_ptr< mlir::Pass > circt::hw::createVerifyInnerRefNamespacePass | ( | ) |
Definition at line 42 of file VerifyInnerRefNamespace.cpp.
Referenced by circt::ibis::loadIbisLowLevelPassPipeline(), circt::firtool::populateHWToSV(), circt::firtool::populateLowFIRRTLToHW(), and detail::populatePrepareForExportVerilog().
mlir::FailureOr<mlir::TypedAttr> circt::hw::evaluateParametricAttr | ( | mlir::Location | loc, |
mlir::ArrayAttr | parameters, | ||
mlir::Attribute | paramAttr, | ||
bool | emitErrors = true |
||
) |
Evaluates a parametric attribute (param.decl.ref/param.expr) based on a set of provided parameter values.
|
strong |
Returns a resolved version of 'type' wherein any parameter reference has been evaluated based on the set of provided 'parameters'.
Referenced by circt::hw::instance_like_impl::resolveParametricTypes(), and verifyPrimitiveOpType().
ModulePort::Direction circt::hw::flip | ( | ModulePort::Direction | direction | ) |
int64_t circt::hw::getBitWidth | ( | mlir::Type | type | ) |
Return the hardware bit width of a type.
Does not reflect any encoding, padding, or storage scheme, just the bit (and wire width) of a statically-size type. Reflects the number of wires needed to transmit a value of this type. Returns -1 if the type is not known or cannot be statically computed.
Definition at line 102 of file HWTypes.cpp.
Referenced by llvm::DOTGraphTraits< circt::hw::HWModuleOp >::getEdgeAttributes(), circt::esi::detail::getWidth(), hwGetBitWidth(), circt::ExportVerilog::isZeroBitType(), and circt::esi::ESIAPIType::size().
mlir::Type circt::hw::getCanonicalType | ( | mlir::Type | type | ) |
Definition at line 41 of file HWTypes.cpp.
Referenced by getInnerTypes(), getStructType(), isHWEnumType(), isHWIntegerType(), isStructType(), isValidIndexBitWidth(), circt::ExportVerilog::isZeroBitType(), and verifyAggregateFieldIndexAndType().
FunctionType circt::hw::getModuleType | ( | Operation * | module | ) |
Return the signature for the specified module as a function type.
Return the signature for a module as a function type from the module itself or from an hw::InstanceOp.
Definition at line 515 of file HWOps.cpp.
References circt::calyx::direction::get(), and inputs.
Referenced by circt::hw::instance_like_impl::getPortList(), and circt::hw::instance_like_impl::verifyInstanceOfHWModule().
|
inline |
Definition at line 54 of file HWOps.h.
References getVerilogModuleNameAttr().
StringAttr circt::hw::getVerilogModuleNameAttr | ( | Operation * | module | ) |
Returns the verilog module name attribute or symbol name of any module-like operations.
Return the name to use for the Verilog module that we're referencing here.
This is typically the symbol, but can be overridden with the verilogName attribute.
Definition at line 534 of file HWOps.cpp.
Referenced by createModuleForCut(), circt::ExportVerilog::getSymOpName(), getVerilogModuleName(), and circt::ExportVerilog::GlobalNameResolver::GlobalNameResolver().
|
static |
Definition at line 37 of file HWTypes.h.
References circt::hw::ModulePort::dir, circt::hw::ModulePort::name, and circt::hw::ModulePort::type.
bool circt::hw::hasHWInOutType | ( | mlir::Type | type | ) |
Return true if the specified type contains known marker types like InOutType.
Unlike isHWValueType, this is not conservative, it only returns false on known InOut types, rather than any unknown types.
bool circt::hw::isAnyModuleOrInstance | ( | Operation * | module | ) |
TODO: Move all these functions to a hw::ModuleLike interface.
Return true if isAnyModule or instance.
bool circt::hw::isCombinational | ( | Operation * | op | ) |
Return true if the specified operation is a combinational logic op.
Definition at line 59 of file HWOps.cpp.
References circt::hw::TypeOpVisitor< ConcreteType, ResultType, ExtraArgs >::dispatchTypeOpVisitor().
bool circt::hw::isHWEnumType | ( | mlir::Type | type | ) |
Return true if the specified type is a HW Enum type.
Definition at line 65 of file HWTypes.cpp.
References getCanonicalType().
bool circt::hw::isHWIntegerType | ( | mlir::Type | type | ) |
Return true if the specified type is a value HW Integer type.
This checks that it is a signless standard dialect type.
This checks that it is a signless standard dialect type or a hw::IntType.
Definition at line 52 of file HWTypes.cpp.
References getCanonicalType().
Referenced by circt::seq::isClockOrI1Type(), simplifyCLog2(), simplifyDivS(), simplifyDivU(), simplifyModS(), simplifyModU(), simplifyShl(), simplifyShrS(), and simplifyShrU().
bool circt::hw::isHWValueType | ( | mlir::Type | type | ) |
Return true if the specified type can be used as an HW value type, that is the set of types that can be composed together to represent synthesized, hardware but not marker types like InOutType or unknown types from other dialects.
Referenced by hwTypeIsAValueType().
bool circt::hw::isOffset | ( | Value | base, |
Value | index, | ||
uint64_t | offset | ||
) |
Definition at line 1831 of file HWOps.cpp.
References assert().
Referenced by foldCreateToSlice(), mergeConcatSlices(), and mergeNeiboringAssignments().
bool circt::hw::isParametricType | ( | mlir::Type | t | ) |
Returns true if any part of t is parametric.
Definition at line 1067 of file HWAttributes.cpp.
bool circt::hw::isValidIndexBitWidth | ( | Value | index, |
Value | array | ||
) |
Definition at line 48 of file HWOps.cpp.
References assert(), and getCanonicalType().
bool circt::hw::isValidParameterExpression | ( | Attribute | attr, |
Operation * | module | ||
) |
Return true if the specified attribute tree is made up of nodes that are valid in a parameter expression.
Definition at line 221 of file HWOps.cpp.
References checkParameterInContext().
OS& circt::hw::operator<< | ( | OS & | os, |
const InnerSymTarget & | target | ||
) |
Printing InnerSymTarget's.
Definition at line 247 of file InnerSymbolTable.h.
References circt::hw::InnerSymTarget::getField(), circt::hw::InnerSymTarget::getOp(), circt::hw::InnerSymTarget::getPort(), circt::hw::InnerSymTarget::isField(), and circt::hw::InnerSymTarget::isPort().
raw_ostream & circt::hw::operator<< | ( | raw_ostream & | printer, |
PortInfo | port | ||
) |
Definition at line 110 of file HWOpInterfaces.cpp.
References circt::hw::PortInfo::argNum, circt::hw::PortInfo::attrs, circt::hw::ModulePort::dir, circt::hw::PortInfo::getSym(), InOut, Input, circt::hw::PortInfo::loc, circt::hw::ModulePort::name, Output, and circt::hw::ModulePort::type.
|
static |
Definition at line 34 of file HWTypes.h.
References circt::hw::ModulePort::dir, circt::hw::ModulePort::name, and circt::hw::ModulePort::type.
void circt::hw::populateHWModuleLikeTypeConversionPattern | ( | StringRef | moduleLikeOpName, |
RewritePatternSet & | patterns, | ||
TypeConverter & | converter | ||
) |
Definition at line 85 of file HWModuleOpInterface.cpp.
Referenced by addSignatureConversion().
void circt::hw::registerReducePatternDialectInterface | ( | mlir::DialectRegistry & | registry | ) |
Register the HW Reduction pattern dialect interface to the given registry.
Definition at line 156 of file HWReductions.cpp.
BaseTy circt::hw::type_cast | ( | Type | type | ) |
BaseTy circt::hw::type_dyn_cast | ( | Type | type | ) |
bool circt::hw::type_isa | ( | Type | type | ) |
Definition at line 141 of file HWTypes.h.
Referenced by circt::hw::TypeVariant< Types >::classof(), and type_isa_and_nonnull().
bool circt::hw::type_isa_and_nonnull | ( | Type | type | ) |
Definition at line 155 of file HWTypes.h.
References type_isa().
LogicalResult circt::hw::verifyInnerSymAttr | ( | InnerSymbolOpInterface | op | ) |
Verification hook for verifying InnerSym Attribute.
Definition at line 53 of file HWOpInterfaces.cpp.
References circt::hw::FieldIdImpl::getMaxFieldID().