CIRCT  19.0.0git
Functions | Variables
FIRRTL.cpp File Reference
#include "circt-c/Dialect/FIRRTL.h"
#include "circt/Dialect/FIRRTL/FIRRTLAttributes.h"
#include "circt/Dialect/FIRRTL/FIRRTLDialect.h"
#include "circt/Dialect/FIRRTL/FIRRTLOps.h"
#include "circt/Dialect/FIRRTL/FIRRTLTypes.h"
#include "circt/Dialect/FIRRTL/Import/FIRAnnotations.h"
#include "mlir/CAPI/IR.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/CAPI/Support.h"
#include "llvm/Support/JSON.h"
Include dependency graph for FIRRTL.cpp:

Go to the source code of this file.

Functions

 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION (FIRRTL, firrtl, circt::firrtl::FIRRTLDialect) MlirType firrtlTypeGetUInt(MlirContext ctx
 
MlirType firrtlTypeGetSInt (MlirContext ctx, int32_t width)
 
MlirType firrtlTypeGetClock (MlirContext ctx)
 
MlirType firrtlTypeGetReset (MlirContext ctx)
 
MlirType firrtlTypeGetAsyncReset (MlirContext ctx)
 
MlirType firrtlTypeGetAnalog (MlirContext ctx, int32_t width)
 
MlirType firrtlTypeGetVector (MlirContext ctx, MlirType element, size_t count)
 
bool firrtlTypeIsAOpenBundle (MlirType type)
 
MlirType firrtlTypeGetBundle (MlirContext ctx, size_t count, const FIRRTLBundleField *fields)
 
unsigned firrtlTypeGetBundleFieldIndex (MlirType type, MlirStringRef fieldName)
 
MlirType firrtlTypeGetRef (MlirType target, bool forceable)
 
MlirType firrtlTypeGetAnyRef (MlirContext ctx)
 
MlirType firrtlTypeGetInteger (MlirContext ctx)
 
MlirType firrtlTypeGetDouble (MlirContext ctx)
 
MlirType firrtlTypeGetString (MlirContext ctx)
 
MlirType firrtlTypeGetBoolean (MlirContext ctx)
 
MlirType firrtlTypeGetPath (MlirContext ctx)
 
MlirType firrtlTypeGetList (MlirContext ctx, MlirType elementType)
 
MlirType firrtlTypeGetClass (MlirContext ctx, MlirAttribute name, size_t numberOfElements, const FIRRTLClassElement *elements)
 
MlirType firrtlTypeGetMaskType (MlirType type)
 
MlirAttribute firrtlAttrGetConvention (MlirContext ctx, FIRRTLConvention convention)
 
MlirAttribute firrtlAttrGetPortDirs (MlirContext ctx, size_t count, const FIRRTLDirection *dirs)
 
MlirAttribute firrtlAttrGetParamDecl (MlirContext ctx, MlirIdentifier name, MlirType type, MlirAttribute value)
 
MlirAttribute firrtlAttrGetNameKind (MlirContext ctx, FIRRTLNameKind nameKind)
 
MlirAttribute firrtlAttrGetRUW (MlirContext ctx, FIRRTLRUW ruw)
 
MlirAttribute firrtlAttrGetMemInit (MlirContext ctx, MlirIdentifier filename, bool isBinary, bool isInline)
 
MlirAttribute firrtlAttrGetMemDir (MlirContext ctx, FIRRTLMemDir dir)
 
MlirAttribute firrtlAttrGetEventControl (MlirContext ctx, FIRRTLEventControl eventControl)
 
MlirAttribute firrtlAttrGetIntegerFromString (MlirType type, unsigned numBits, MlirStringRef str, uint8_t radix)
 
FIRRTLValueFlow firrtlValueFoldFlow (MlirValue value, FIRRTLValueFlow flow)
 
bool firrtlImportAnnotationsFromJSONRaw (MlirContext ctx, MlirStringRef annotationsStr, MlirAttribute *importedAnnotationsArray)
 

Variables

int32_t width
 

Function Documentation

◆ firrtlAttrGetConvention()

MlirAttribute firrtlAttrGetConvention ( MlirContext  ctx,
FIRRTLConvention  convention 
)

◆ firrtlAttrGetEventControl()

MlirAttribute firrtlAttrGetEventControl ( MlirContext  ctx,
FIRRTLEventControl  eventControl 
)

◆ firrtlAttrGetIntegerFromString()

MlirAttribute firrtlAttrGetIntegerFromString ( MlirType  type,
unsigned  numBits,
MlirStringRef  str,
uint8_t  radix 
)

Definition at line 290 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlAttrGetMemDir()

MlirAttribute firrtlAttrGetMemDir ( MlirContext  ctx,
FIRRTLMemDir  dir 
)

◆ firrtlAttrGetMemInit()

MlirAttribute firrtlAttrGetMemInit ( MlirContext  ctx,
MlirIdentifier  filename,
bool  isBinary,
bool  isInline 
)

Definition at line 244 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlAttrGetNameKind()

MlirAttribute firrtlAttrGetNameKind ( MlirContext  ctx,
FIRRTLNameKind  nameKind 
)

◆ firrtlAttrGetParamDecl()

MlirAttribute firrtlAttrGetParamDecl ( MlirContext  ctx,
MlirIdentifier  name,
MlirType  type,
MlirAttribute  value 
)

Definition at line 205 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlAttrGetPortDirs()

MlirAttribute firrtlAttrGetPortDirs ( MlirContext  ctx,
size_t  count,
const FIRRTLDirection dirs 
)

◆ firrtlAttrGetRUW()

MlirAttribute firrtlAttrGetRUW ( MlirContext  ctx,
FIRRTLRUW  ruw 
)

◆ firrtlImportAnnotationsFromJSONRaw()

bool firrtlImportAnnotationsFromJSONRaw ( MlirContext  ctx,
MlirStringRef  annotationsStr,
MlirAttribute *  importedAnnotationsArray 
)

◆ firrtlTypeGetAnalog()

MlirType firrtlTypeGetAnalog ( MlirContext  ctx,
int32_t  width 
)

Definition at line 56 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), width, and wrap().

◆ firrtlTypeGetAnyRef()

MlirType firrtlTypeGetAnyRef ( MlirContext  ctx)

Definition at line 117 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetAsyncReset()

MlirType firrtlTypeGetAsyncReset ( MlirContext  ctx)

Definition at line 52 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetBoolean()

MlirType firrtlTypeGetBoolean ( MlirContext  ctx)

Definition at line 133 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetBundle()

MlirType firrtlTypeGetBundle ( MlirContext  ctx,
size_t  count,
const FIRRTLBundleField fields 
)

Definition at line 71 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetBundleFieldIndex()

unsigned firrtlTypeGetBundleFieldIndex ( MlirType  type,
MlirStringRef  fieldName 
)

Definition at line 97 of file FIRRTL.cpp.

References assert(), and unwrap().

◆ firrtlTypeGetClass()

MlirType firrtlTypeGetClass ( MlirContext  ctx,
MlirAttribute  name,
size_t  numberOfElements,
const FIRRTLClassElement elements 
)

◆ firrtlTypeGetClock()

MlirType firrtlTypeGetClock ( MlirContext  ctx)

Definition at line 44 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetDouble()

MlirType firrtlTypeGetDouble ( MlirContext  ctx)

Definition at line 125 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetInteger()

MlirType firrtlTypeGetInteger ( MlirContext  ctx)

Definition at line 121 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetList()

MlirType firrtlTypeGetList ( MlirContext  ctx,
MlirType  elementType 
)

Definition at line 141 of file FIRRTL.cpp.

References assert(), elementType, circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetMaskType()

MlirType firrtlTypeGetMaskType ( MlirType  type)

Definition at line 166 of file FIRRTL.cpp.

References assert(), unwrap(), and wrap().

◆ firrtlTypeGetPath()

MlirType firrtlTypeGetPath ( MlirContext  ctx)

Definition at line 137 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetRef()

MlirType firrtlTypeGetRef ( MlirType  target,
bool  forceable 
)

Definition at line 110 of file FIRRTL.cpp.

References assert(), circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetReset()

MlirType firrtlTypeGetReset ( MlirContext  ctx)

Definition at line 48 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetSInt()

MlirType firrtlTypeGetSInt ( MlirContext  ctx,
int32_t  width 
)

Definition at line 40 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), width, and wrap().

◆ firrtlTypeGetString()

MlirType firrtlTypeGetString ( MlirContext  ctx)

Definition at line 129 of file FIRRTL.cpp.

References circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeGetVector()

MlirType firrtlTypeGetVector ( MlirContext  ctx,
MlirType  element,
size_t  count 
)

Definition at line 60 of file FIRRTL.cpp.

References assert(), circt::calyx::direction::get(), unwrap(), and wrap().

◆ firrtlTypeIsAOpenBundle()

bool firrtlTypeIsAOpenBundle ( MlirType  type)

Definition at line 67 of file FIRRTL.cpp.

References unwrap().

◆ firrtlValueFoldFlow()

FIRRTLValueFlow firrtlValueFoldFlow ( MlirValue  value,
FIRRTLValueFlow  flow 
)

◆ MLIR_DEFINE_CAPI_DIALECT_REGISTRATION()

MLIR_DEFINE_CAPI_DIALECT_REGISTRATION ( FIRRTL  ,
firrtl  ,
circt::firrtl::FIRRTLDialect   
)

Variable Documentation

◆ width

int32_t width
Initial value:
{
return wrap(UIntType::get(unwrap(ctx), width))
return wrap(CMemoryType::get(unwrap(ctx), baseType, numElements))
int32_t width
Definition: FIRRTL.cpp:36
static EvaluatorValuePtr unwrap(OMEvaluatorValue c)
Definition: OM.cpp:96
Direction get(bool isOutput)
Returns an output direction if isOutput is true, otherwise returns an input direction.
Definition: CalyxOps.cpp:54

Definition at line 36 of file FIRRTL.cpp.

Referenced by circt::pipelinetocalyx::BuildOpGroups::buildLibraryBinaryPipeOp(), circt::scftocalyx::BuildOpGroups::buildLibraryBinaryPipeOp(), circt::pipelinetocalyx::BuildOpGroups::buildOp(), circt::scftocalyx::BuildOpGroups::buildOp(), canonicalizePrimOp(), computeKnownBits(), circt::calyx::createConstant(), circt::calyx::createRegister(), customTypePrinter(), circt::debugFooter(), circt::debugHeader(), driveSignal(), emitDim(), emitDims(), circt::extOrTruncZeroWidth(), llvm::yaml::MappingContextTraits< DescribedSignal, Context >::Field::Field(), firrtlTypeGetAnalog(), firrtlTypeGetSInt(), circt::systemc::IntType::get(), circt::systemc::BigIntType::get(), circt::systemc::BigUIntType::get(), circt::systemc::BitVectorType::get(), circt::systemc::LogicVectorType::get(), circt::firrtl::getBitWidth(), llvm::DOTGraphTraits< circt::hw::HWModuleOp >::getEdgeAttributes(), getElementTypeOfWidth(), circt::firrtl::getIntOnesAttr(), circt::firrtl::getIntZerosAttr(), getSummary(), getTotalWidth(), circt::firrtl::WidthQualifiedTypeTrait< ConcreteType >::getWidth(), circt::FirRegLowering::initialize(), circt::llhd::sim::Slot::insertChange(), circt::llhd::sim::UpdateQueue::insertOrUpdate(), lowerBoundaryScalar(), circt::FirMemLowering::lowerMemoriesInModule(), circt::firrtl::lowerType(), circt::systemc::detail::IntegerWidthStorage::operator==(), parseIntegerOrBitVector(), circt::pipelinetocalyx::BuildPipelineRegs::partiallyLowerFuncToComp(), circt::calyx::BuildReturnRegs::partiallyLowerFuncToComp(), circt::populateHWToSMTTypeConverter(), printParameterList(), FIRRTLConstantifier::rewrite(), SFCCompatPass::runOnOperation(), and circt::sextZeroWidth().