CIRCT  19.0.0git
Functions
Moore.cpp File Reference
#include "circt-c/Dialect/Moore.h"
#include "circt/Dialect/Moore/MooreDialect.h"
#include "circt/Dialect/Moore/MooreTypes.h"
#include "mlir/CAPI/IR.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/CAPI/Support.h"
Include dependency graph for Moore.cpp:

Go to the source code of this file.

Functions

static std::optional< SignconvertMooreSign (enum MooreSign sign)
 
static IntType::Kind convertMooreIntKind (enum MooreIntKind kind)
 
static RealType::Kind convertMooreRealKind (enum MooreRealKind kind)
 
MlirType mooreVoidTypeGet (MlirContext ctx)
 Create a void type. More...
 
MlirType mooreStringTypeGet (MlirContext ctx)
 Create a string type. More...
 
MlirType mooreChandleTypeGet (MlirContext ctx)
 Create a chandle type. More...
 
MlirType mooreEventTypeGet (MlirContext ctx)
 Create a event type. More...
 
MlirType mooreIntTypeGet (MlirContext ctx, enum MooreIntKind kind, enum MooreSign sign)
 Create an int type. More...
 
MlirType mooreIntTypeGetLogic (MlirContext ctx)
 Create a logic type. More...
 
MlirType mooreIntTypeGetInt (MlirContext ctx)
 Create an int type. More...
 
MlirType mooreIntTypeGetTime (MlirContext ctx)
 Create a time type. More...
 
MlirType mooreRealTypeGet (MlirContext ctx, enum MooreRealKind kind)
 Create a real type. More...
 
MlirType moorePackedUnsizedDimTypeGet (MlirType inner)
 Create a packed unsized dimension type. More...
 
MlirType moorePackedRangeDimTypeGet (MlirType inner, unsigned size, bool upDir, int offset)
 Create a packed range dimension type. More...
 
MlirType mooreUnpackedUnsizedDimTypeGet (MlirType inner)
 Create a unpacked unsized dimension type. More...
 
MlirType mooreUnpackedArrayDimTypeGet (MlirType inner, unsigned size)
 Create a unpacked array dimension type. More...
 
MlirType mooreUnpackedRangeDimTypeGet (MlirType inner, unsigned size, bool upDir, int offset)
 Create a unpacked range dimension type. More...
 
MlirType mooreUnpackedAssocDimTypeGet (MlirType inner)
 Create a unpacked assoc dimension type without index. More...
 
MlirType mooreUnpackedAssocDimTypeGetWithIndex (MlirType inner, MlirType indexType)
 Create a unpacked assoc dimension type with index. More...
 
MlirType mooreUnpackedQueueDimTypeGet (MlirType inner)
 Create a unpacked queue dimension type without bound. More...
 
MlirType mooreUnpackedQueueDimTypeGetWithBound (MlirType inner, unsigned bound)
 Create a unpacked queue dimension type with bound. More...
 
MlirType mooreEnumTypeGet (MlirAttribute name, MlirLocation loc)
 Create a enum type without base. More...
 
MlirType mooreEnumTypeGetWithBase (MlirAttribute name, MlirLocation loc, MlirType base)
 Create a enum type width base. More...
 
MlirType mooreSimpleBitVectorTypeGet (MlirContext ctx, bool isFourValued, bool isSigned, unsigned size)
 Create a simple bit-vector type. More...
 
bool mooreIsFourValuedType (MlirType type)
 Checks whether the passed UnpackedType is a four-valued type. More...
 
bool mooreIsSimpleBitVectorType (MlirType type)
 Checks whether the passed type is a simple bit-vector. More...
 
unsigned mooreGetSimpleBitVectorSize (MlirType type)
 Returns the size of a simple bit-vector type in bits. More...
 

Function Documentation

◆ convertMooreIntKind()

static IntType::Kind convertMooreIntKind ( enum MooreIntKind  kind)
static

Definition at line 41 of file Moore.cpp.

References MooreBit, MooreByte, MooreInt, MooreInteger, MooreLogic, MooreLongInt, MooreReg, MooreShortInt, and MooreTime.

Referenced by mooreIntTypeGet().

◆ convertMooreRealKind()

static RealType::Kind convertMooreRealKind ( enum MooreRealKind  kind)
static

◆ convertMooreSign()

static std::optional<Sign> convertMooreSign ( enum MooreSign  sign)
static

Definition at line 29 of file Moore.cpp.

References MooreNone, MooreSigned, MooreUnsigned, circt::moore::Signed, and circt::moore::Unsigned.

Referenced by mooreIntTypeGet().

◆ mooreChandleTypeGet()

MlirType mooreChandleTypeGet ( MlirContext  ctx)

Create a chandle type.

Definition at line 89 of file Moore.cpp.

References circt::moore::ChandleType::get(), unwrap(), and wrap().

◆ mooreEnumTypeGet()

MlirType mooreEnumTypeGet ( MlirAttribute  name,
MlirLocation  loc 
)

Create a enum type without base.

Definition at line 179 of file Moore.cpp.

References circt::moore::EnumType::get(), unwrap(), and wrap().

◆ mooreEnumTypeGetWithBase()

MlirType mooreEnumTypeGetWithBase ( MlirAttribute  name,
MlirLocation  loc,
MlirType  base 
)

Create a enum type width base.

Create a enum type with base.

Definition at line 184 of file Moore.cpp.

References circt::moore::EnumType::get(), unwrap(), and wrap().

◆ mooreEventTypeGet()

MlirType mooreEventTypeGet ( MlirContext  ctx)

Create a event type.

Create an event type.

Definition at line 94 of file Moore.cpp.

References circt::moore::EventType::get(), unwrap(), and wrap().

◆ mooreGetSimpleBitVectorSize()

unsigned mooreGetSimpleBitVectorSize ( MlirType  type)

Returns the size of a simple bit-vector type in bits.

Definition at line 209 of file Moore.cpp.

References unwrap().

◆ mooreIntTypeGet()

MlirType mooreIntTypeGet ( MlirContext  ctx,
enum MooreIntKind  kind,
enum MooreSign  sign 
)

Create an int type.

Definition at line 99 of file Moore.cpp.

References convertMooreIntKind(), convertMooreSign(), circt::moore::IntType::get(), unwrap(), and wrap().

◆ mooreIntTypeGetInt()

MlirType mooreIntTypeGetInt ( MlirContext  ctx)

Create an int type.

Definition at line 111 of file Moore.cpp.

References circt::moore::IntType::getInt(), unwrap(), and wrap().

◆ mooreIntTypeGetLogic()

MlirType mooreIntTypeGetLogic ( MlirContext  ctx)

Create a logic type.

Definition at line 106 of file Moore.cpp.

References circt::moore::IntType::getLogic(), unwrap(), and wrap().

◆ mooreIntTypeGetTime()

MlirType mooreIntTypeGetTime ( MlirContext  ctx)

Create a time type.

Definition at line 116 of file Moore.cpp.

References circt::moore::IntType::getTime(), unwrap(), and wrap().

◆ mooreIsFourValuedType()

bool mooreIsFourValuedType ( MlirType  type)

Checks whether the passed UnpackedType is a four-valued type.

Definition at line 199 of file Moore.cpp.

References circt::moore::FourValued, and unwrap().

◆ mooreIsSimpleBitVectorType()

bool mooreIsSimpleBitVectorType ( MlirType  type)

Checks whether the passed type is a simple bit-vector.

Definition at line 204 of file Moore.cpp.

References unwrap().

◆ moorePackedRangeDimTypeGet()

MlirType moorePackedRangeDimTypeGet ( MlirType  inner,
unsigned  size,
bool  upDir,
int  offset 
)

Create a packed range dimension type.

Definition at line 131 of file Moore.cpp.

References circt::moore::Down, circt::moore::PackedRangeDim::get(), unwrap(), circt::moore::Up, and wrap().

◆ moorePackedUnsizedDimTypeGet()

MlirType moorePackedUnsizedDimTypeGet ( MlirType  inner)

Create a packed unsized dimension type.

Definition at line 126 of file Moore.cpp.

References circt::moore::PackedUnsizedDim::get(), unwrap(), and wrap().

◆ mooreRealTypeGet()

MlirType mooreRealTypeGet ( MlirContext  ctx,
enum MooreRealKind  kind 
)

Create a real type.

Definition at line 121 of file Moore.cpp.

References convertMooreRealKind(), circt::moore::RealType::get(), unwrap(), and wrap().

◆ mooreSimpleBitVectorTypeGet()

MlirType mooreSimpleBitVectorTypeGet ( MlirContext  ctx,
bool  isFourValued,
bool  isSigned,
unsigned  size 
)

Create a simple bit-vector type.

Definition at line 191 of file Moore.cpp.

References circt::moore::FourValued, circt::moore::Signed, circt::moore::TwoValued, circt::moore::Unsigned, unwrap(), and wrap().

◆ mooreStringTypeGet()

MlirType mooreStringTypeGet ( MlirContext  ctx)

Create a string type.

Definition at line 84 of file Moore.cpp.

References circt::moore::StringType::get(), unwrap(), and wrap().

◆ mooreUnpackedArrayDimTypeGet()

MlirType mooreUnpackedArrayDimTypeGet ( MlirType  inner,
unsigned  size 
)

Create a unpacked array dimension type.

Definition at line 144 of file Moore.cpp.

References circt::moore::UnpackedArrayDim::get(), unwrap(), and wrap().

◆ mooreUnpackedAssocDimTypeGet()

MlirType mooreUnpackedAssocDimTypeGet ( MlirType  inner)

Create a unpacked assoc dimension type without index.

Definition at line 157 of file Moore.cpp.

References circt::moore::UnpackedAssocDim::get(), unwrap(), and wrap().

◆ mooreUnpackedAssocDimTypeGetWithIndex()

MlirType mooreUnpackedAssocDimTypeGetWithIndex ( MlirType  inner,
MlirType  indexType 
)

Create a unpacked assoc dimension type with index.

Create a unpacked assoc dimension type width index.

Definition at line 162 of file Moore.cpp.

References circt::moore::UnpackedAssocDim::get(), unwrap(), and wrap().

◆ mooreUnpackedQueueDimTypeGet()

MlirType mooreUnpackedQueueDimTypeGet ( MlirType  inner)

Create a unpacked queue dimension type without bound.

Definition at line 169 of file Moore.cpp.

References circt::moore::UnpackedQueueDim::get(), unwrap(), and wrap().

◆ mooreUnpackedQueueDimTypeGetWithBound()

MlirType mooreUnpackedQueueDimTypeGetWithBound ( MlirType  inner,
unsigned  bound 
)

Create a unpacked queue dimension type with bound.

Definition at line 174 of file Moore.cpp.

References circt::moore::UnpackedQueueDim::get(), unwrap(), and wrap().

◆ mooreUnpackedRangeDimTypeGet()

MlirType mooreUnpackedRangeDimTypeGet ( MlirType  inner,
unsigned  size,
bool  upDir,
int  offset 
)

Create a unpacked range dimension type.

Definition at line 149 of file Moore.cpp.

References circt::moore::Down, circt::moore::UnpackedRangeDim::get(), unwrap(), circt::moore::Up, and wrap().

◆ mooreUnpackedUnsizedDimTypeGet()

MlirType mooreUnpackedUnsizedDimTypeGet ( MlirType  inner)

Create a unpacked unsized dimension type.

Definition at line 139 of file Moore.cpp.

References circt::moore::UnpackedUnsizedDim::get(), unwrap(), and wrap().

◆ mooreVoidTypeGet()

MlirType mooreVoidTypeGet ( MlirContext  ctx)

Create a void type.

Definition at line 79 of file Moore.cpp.

References circt::moore::VoidType::get(), unwrap(), and wrap().