CIRCT
18.0.0git
|
#include "mlir-c/IR.h"
Go to the source code of this file.
Classes | |
struct | HWStructFieldInfo |
struct | HWModulePort |
Typedefs | |
typedef struct HWStructFieldInfo | HWStructFieldInfo |
typedef enum HWModulePortDirection | HWModulePortDirection |
typedef struct HWModulePort | HWModulePort |
Enumerations | |
enum | HWModulePortDirection { Input , Output , InOut } |
Functions | |
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION (HW, hw) | |
MLIR_CAPI_EXPORTED int64_t | hwGetBitWidth (MlirType) |
Return the hardware bit width of a type. More... | |
MLIR_CAPI_EXPORTED bool | hwTypeIsAValueType (MlirType) |
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... | |
MLIR_CAPI_EXPORTED bool | hwTypeIsAArrayType (MlirType) |
If the type is an HW array. More... | |
MLIR_CAPI_EXPORTED bool | hwTypeIsAInOut (MlirType type) |
If the type is an HW inout. More... | |
MLIR_CAPI_EXPORTED bool | hwTypeIsAModuleType (MlirType type) |
If the type is an HW module type. More... | |
MLIR_CAPI_EXPORTED bool | hwTypeIsAStructType (MlirType) |
If the type is an HW struct. More... | |
MLIR_CAPI_EXPORTED bool | hwTypeIsATypeAliasType (MlirType) |
If the type is an HW type alias. More... | |
MLIR_CAPI_EXPORTED bool | hwTypeIsAIntType (MlirType) |
If the type is an HW int. More... | |
MLIR_CAPI_EXPORTED MlirType | hwArrayTypeGet (MlirType element, size_t size) |
Creates a fixed-size HW array type in the context associated with element. More... | |
MLIR_CAPI_EXPORTED MlirType | hwArrayTypeGetElementType (MlirType) |
returns the element type of an array type More... | |
MLIR_CAPI_EXPORTED intptr_t | hwArrayTypeGetSize (MlirType) |
returns the size of an array type More... | |
MLIR_CAPI_EXPORTED MlirType | hwInOutTypeGet (MlirType element) |
Creates an HW inout type in the context associated with element. More... | |
MLIR_CAPI_EXPORTED MlirType | hwInOutTypeGetElementType (MlirType) |
Returns the element type of an inout type. More... | |
MLIR_CAPI_EXPORTED MlirType | hwModuleTypeGet (MlirContext ctx, intptr_t numPorts, HWModulePort const *ports) |
Creates an HW module type. More... | |
MLIR_CAPI_EXPORTED intptr_t | hwModuleTypeGetNumInputs (MlirType type) |
Get an HW module type's number of inputs. More... | |
MLIR_CAPI_EXPORTED MlirType | hwModuleTypeGetInputType (MlirType type, intptr_t index) |
Get an HW module type's input type at a specific index. More... | |
MLIR_CAPI_EXPORTED MlirStringRef | hwModuleTypeGetInputName (MlirType type, intptr_t index) |
Get an HW module type's input name at a specific index. More... | |
MLIR_CAPI_EXPORTED intptr_t | hwModuleTypeGetNumOutputs (MlirType type) |
Get an HW module type's number of outputs. More... | |
MLIR_CAPI_EXPORTED MlirType | hwModuleTypeGetOutputType (MlirType type, intptr_t index) |
Get an HW module type's output type at a specific index. More... | |
MLIR_CAPI_EXPORTED MlirStringRef | hwModuleTypeGetOutputName (MlirType type, intptr_t index) |
Get an HW module type's output name at a specific index. More... | |
MLIR_CAPI_EXPORTED MlirType | hwStructTypeGet (MlirContext ctx, intptr_t numElements, HWStructFieldInfo const *elements) |
Creates an HW struct type in the context associated with the elements. More... | |
MLIR_CAPI_EXPORTED MlirType | hwStructTypeGetField (MlirType structType, MlirStringRef fieldName) |
MLIR_CAPI_EXPORTED MlirType | hwParamIntTypeGet (MlirAttribute parameter) |
MLIR_CAPI_EXPORTED MlirAttribute | hwParamIntTypeGetWidthAttr (MlirType) |
MLIR_CAPI_EXPORTED MlirAttribute | hwStructTypeGetFieldIndex (MlirType structType, MlirStringRef fieldName) |
MLIR_CAPI_EXPORTED HWStructFieldInfo | hwStructTypeGetFieldNum (MlirType structType, unsigned idx) |
MLIR_CAPI_EXPORTED intptr_t | hwStructTypeGetNumFields (MlirType structType) |
MLIR_CAPI_EXPORTED MlirType | hwTypeAliasTypeGet (MlirStringRef scope, MlirStringRef name, MlirType innerType) |
MLIR_CAPI_EXPORTED MlirType | hwTypeAliasTypeGetCanonicalType (MlirType typeAlias) |
MLIR_CAPI_EXPORTED MlirType | hwTypeAliasTypeGetInnerType (MlirType typeAlias) |
MLIR_CAPI_EXPORTED MlirStringRef | hwTypeAliasTypeGetName (MlirType typeAlias) |
MLIR_CAPI_EXPORTED MlirStringRef | hwTypeAliasTypeGetScope (MlirType typeAlias) |
MLIR_CAPI_EXPORTED bool | hwAttrIsAInnerSymAttr (MlirAttribute) |
MLIR_CAPI_EXPORTED MlirAttribute | hwInnerSymAttrGet (MlirAttribute symName) |
MLIR_CAPI_EXPORTED MlirAttribute | hwInnerSymAttrGetSymName (MlirAttribute) |
MLIR_CAPI_EXPORTED bool | hwAttrIsAInnerRefAttr (MlirAttribute) |
MLIR_CAPI_EXPORTED MlirAttribute | hwInnerRefAttrGet (MlirAttribute moduleName, MlirAttribute innerSym) |
MLIR_CAPI_EXPORTED MlirAttribute | hwInnerRefAttrGetName (MlirAttribute) |
MLIR_CAPI_EXPORTED MlirAttribute | hwInnerRefAttrGetModule (MlirAttribute) |
MLIR_CAPI_EXPORTED bool | hwAttrIsAParamDeclAttr (MlirAttribute) |
MLIR_CAPI_EXPORTED MlirAttribute | hwParamDeclAttrGet (MlirStringRef name, MlirType type, MlirAttribute value) |
MLIR_CAPI_EXPORTED MlirStringRef | hwParamDeclAttrGetName (MlirAttribute decl) |
MLIR_CAPI_EXPORTED MlirType | hwParamDeclAttrGetType (MlirAttribute decl) |
MLIR_CAPI_EXPORTED MlirAttribute | hwParamDeclAttrGetValue (MlirAttribute decl) |
MLIR_CAPI_EXPORTED bool | hwAttrIsAParamDeclRefAttr (MlirAttribute) |
MLIR_CAPI_EXPORTED MlirAttribute | hwParamDeclRefAttrGet (MlirContext ctx, MlirStringRef cName) |
MLIR_CAPI_EXPORTED MlirStringRef | hwParamDeclRefAttrGetName (MlirAttribute decl) |
MLIR_CAPI_EXPORTED MlirType | hwParamDeclRefAttrGetType (MlirAttribute decl) |
MLIR_CAPI_EXPORTED bool | hwAttrIsAParamVerbatimAttr (MlirAttribute) |
MLIR_CAPI_EXPORTED MlirAttribute | hwParamVerbatimAttrGet (MlirAttribute text) |
MLIR_CAPI_EXPORTED bool | hwAttrIsAOutputFileAttr (MlirAttribute) |
MLIR_CAPI_EXPORTED MlirAttribute | hwOutputFileGetFromFileName (MlirAttribute text, bool excludeFromFileList, bool includeReplicatedOp) |
typedef struct HWModulePort HWModulePort |
typedef enum HWModulePortDirection HWModulePortDirection |
typedef struct HWStructFieldInfo HWStructFieldInfo |
MLIR_CAPI_EXPORTED MlirType hwArrayTypeGet | ( | MlirType | element, |
size_t | size | ||
) |
Creates a fixed-size HW array type in the context associated with element.
Definition at line 41 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirType hwArrayTypeGetElementType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED intptr_t hwArrayTypeGetSize | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool hwAttrIsAInnerRefAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool hwAttrIsAInnerSymAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool hwAttrIsAOutputFileAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool hwAttrIsAParamDeclAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool hwAttrIsAParamDeclRefAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool hwAttrIsAParamVerbatimAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED int64_t hwGetBitWidth | ( | MlirType | 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 35 of file HW.cpp.
References circt::hw::getBitWidth(), and unwrap().
MLIR_CAPI_EXPORTED MlirAttribute hwInnerRefAttrGet | ( | MlirAttribute | moduleName, |
MlirAttribute | innerSym | ||
) |
Definition at line 228 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute hwInnerRefAttrGetModule | ( | MlirAttribute | innerRefAttr | ) |
MLIR_CAPI_EXPORTED MlirAttribute hwInnerRefAttrGetName | ( | MlirAttribute | innerRefAttr | ) |
Definition at line 235 of file HW.cpp.
References circt::hw::instance_like_impl::getName(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute hwInnerSymAttrGet | ( | MlirAttribute | symName | ) |
Definition at line 215 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute hwInnerSymAttrGetSymName | ( | MlirAttribute | innerSymAttr | ) |
MLIR_CAPI_EXPORTED MlirType hwInOutTypeGet | ( | MlirType | element | ) |
Creates an HW inout type in the context associated with element.
Definition at line 63 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirType hwInOutTypeGetElementType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED MlirType hwModuleTypeGet | ( | MlirContext | ctx, |
intptr_t | numPorts, | ||
HWModulePort const * | ports | ||
) |
Creates an HW module type.
Definition at line 77 of file HW.cpp.
References HWModulePort::dir, circt::calyx::direction::get(), InOut, Input, HWModulePort::name, Output, HWModulePort::type, unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirStringRef hwModuleTypeGetInputName | ( | MlirType | type, |
intptr_t | index | ||
) |
MLIR_CAPI_EXPORTED MlirType hwModuleTypeGetInputType | ( | MlirType | type, |
intptr_t | index | ||
) |
MLIR_CAPI_EXPORTED intptr_t hwModuleTypeGetNumInputs | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED intptr_t hwModuleTypeGetNumOutputs | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED MlirStringRef hwModuleTypeGetOutputName | ( | MlirType | type, |
intptr_t | index | ||
) |
MLIR_CAPI_EXPORTED MlirType hwModuleTypeGetOutputType | ( | MlirType | type, |
intptr_t | index | ||
) |
MLIR_CAPI_EXPORTED MlirAttribute hwOutputFileGetFromFileName | ( | MlirAttribute | text, |
bool | excludeFromFileList, | ||
bool | includeReplicatedOp | ||
) |
MLIR_CAPI_EXPORTED MlirAttribute hwParamDeclAttrGet | ( | MlirStringRef | name, |
MlirType | type, | ||
MlirAttribute | value | ||
) |
Definition at line 246 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirStringRef hwParamDeclAttrGetName | ( | MlirAttribute | decl | ) |
Definition at line 254 of file HW.cpp.
References circt::hw::instance_like_impl::getName(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirType hwParamDeclAttrGetType | ( | MlirAttribute | decl | ) |
MLIR_CAPI_EXPORTED MlirAttribute hwParamDeclAttrGetValue | ( | MlirAttribute | decl | ) |
MLIR_CAPI_EXPORTED MlirAttribute hwParamDeclRefAttrGet | ( | MlirContext | ctx, |
MlirStringRef | cName | ||
) |
Definition at line 268 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirStringRef hwParamDeclRefAttrGetName | ( | MlirAttribute | decl | ) |
Definition at line 275 of file HW.cpp.
References circt::hw::instance_like_impl::getName(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirType hwParamDeclRefAttrGetType | ( | MlirAttribute | decl | ) |
MLIR_CAPI_EXPORTED MlirType hwParamIntTypeGet | ( | MlirAttribute | parameter | ) |
Definition at line 55 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute hwParamIntTypeGetWidthAttr | ( | MlirType | type | ) |
Definition at line 59 of file HW.cpp.
References circt::esi::detail::getWidth(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute hwParamVerbatimAttrGet | ( | MlirAttribute | text | ) |
Definition at line 285 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirType hwStructTypeGet | ( | MlirContext | ctx, |
intptr_t | numElements, | ||
HWStructFieldInfo const * | elements | ||
) |
Creates an HW struct type in the context associated with the elements.
Definition at line 133 of file HW.cpp.
References circt::calyx::direction::get(), numElements, unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirType hwStructTypeGetField | ( | MlirType | structType, |
MlirStringRef | fieldName | ||
) |
MLIR_CAPI_EXPORTED MlirAttribute hwStructTypeGetFieldIndex | ( | MlirType | structType, |
MlirStringRef | fieldName | ||
) |
Definition at line 149 of file HW.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED HWStructFieldInfo hwStructTypeGetFieldNum | ( | MlirType | structType, |
unsigned | idx | ||
) |
Definition at line 162 of file HW.cpp.
References HWStructFieldInfo::name, HWStructFieldInfo::type, unwrap(), and wrap().
MLIR_CAPI_EXPORTED intptr_t hwStructTypeGetNumFields | ( | MlirType | structType | ) |
MLIR_CAPI_EXPORTED MlirType hwTypeAliasTypeGet | ( | MlirStringRef | scope, |
MlirStringRef | name, | ||
MlirType | innerType | ||
) |
Definition at line 175 of file HW.cpp.
References circt::calyx::direction::get(), circt::esi::innerType(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirType hwTypeAliasTypeGetCanonicalType | ( | MlirType | typeAlias | ) |
MLIR_CAPI_EXPORTED MlirType hwTypeAliasTypeGetInnerType | ( | MlirType | typeAlias | ) |
MLIR_CAPI_EXPORTED MlirStringRef hwTypeAliasTypeGetName | ( | MlirType | typeAlias | ) |
MLIR_CAPI_EXPORTED MlirStringRef hwTypeAliasTypeGetScope | ( | MlirType | typeAlias | ) |
MLIR_CAPI_EXPORTED bool hwTypeIsAArrayType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool hwTypeIsAInOut | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool hwTypeIsAIntType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool hwTypeIsAModuleType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool hwTypeIsAStructType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool hwTypeIsATypeAliasType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool hwTypeIsAValueType | ( | MlirType | 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.
Definition at line 37 of file HW.cpp.
References circt::hw::isHWValueType(), and unwrap().
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION | ( | HW | , |
hw | |||
) |