CIRCT  20.0.0git
Macros | Functions
FIRRTLAnnotationHelper.cpp File Reference
#include "circt/Dialect/FIRRTL/FIRRTLAnnotationHelper.h"
#include "circt/Dialect/FIRRTL/AnnotationDetails.h"
#include "circt/Dialect/FIRRTL/FIRRTLUtils.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "llvm/Support/Debug.h"
Include dependency graph for FIRRTLAnnotationHelper.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "lower-annos"
 

Functions

static LogicalResult updateExpandedPort (StringRef field, AnnoTarget &ref)
 
static FailureOr< unsigned > findBundleElement (Operation *op, Type type, StringRef field)
 Try to resolve an non-array aggregate name from a target given the type and operation of the resolved target. More...
 
static FailureOr< unsigned > findVectorElement (Operation *op, Type type, StringRef indexStr)
 Try to resolve an array index from a target given the type of the resolved target. More...
 
static FailureOr< unsigned > findFieldID (AnnoTarget &ref, ArrayRef< TargetToken > tokens)
 
static Value lowerInternalPathAnno (AnnoPathValue &srcTarget, const AnnoPathValue &moduleTarget, const AnnoPathValue &target, StringAttr internalPathAttr, FIRRTLBaseType targetType, ApplyState &state)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "lower-annos"

Definition at line 19 of file FIRRTLAnnotationHelper.cpp.

Function Documentation

◆ findBundleElement()

static FailureOr<unsigned> findBundleElement ( Operation *  op,
Type  type,
StringRef  field 
)
static

Try to resolve an non-array aggregate name from a target given the type and operation of the resolved target.

This needs to deal with places where we represent bundle returns as split into constituent parts.

Definition at line 43 of file FIRRTLAnnotationHelper.cpp.

Referenced by findFieldID().

◆ findFieldID()

static FailureOr<unsigned> findFieldID ( AnnoTarget ref,
ArrayRef< TargetToken tokens 
)
static

◆ findVectorElement()

static FailureOr<unsigned> findVectorElement ( Operation *  op,
Type  type,
StringRef  indexStr 
)
static

Try to resolve an array index from a target given the type of the resolved target.

Definition at line 62 of file FIRRTLAnnotationHelper.cpp.

Referenced by findFieldID().

◆ lowerInternalPathAnno()

static Value lowerInternalPathAnno ( AnnoPathValue srcTarget,
const AnnoPathValue moduleTarget,
const AnnoPathValue target,
StringAttr  internalPathAttr,
FIRRTLBaseType  targetType,
ApplyState state 
)
static

◆ updateExpandedPort()

static LogicalResult updateExpandedPort ( StringRef  field,
AnnoTarget ref 
)
static

Definition at line 29 of file FIRRTLAnnotationHelper.cpp.

References circt::firrtl::AnnoTarget::getOp().

Referenced by findFieldID().