CIRCT
20.0.0git
|
Namespaces | |
detail | |
direction | |
impl | |
instance_like_impl | |
patterns | |
PreserveAggregate | |
Configure which aggregate values will be preserved by the LowerTypes pass. | |
PreserveValues | |
Configure which values will be explicitly preserved by the DropNames pass. | |
Classes | |
class | InstanceInfo |
class | FieldRefCache |
Caching version of getFieldRefFromValue. More... | |
struct | FIRParserOptions |
struct | FIRVersion |
The FIRRTL specification version. More... | |
struct | TargetToken |
Stores an index into an aggregate. More... | |
struct | TokenAnnoTarget |
The parsed annotation path. More... | |
struct | AnnoPathValue |
struct | AnnoTargetCache |
Cache AnnoTargets for a module's named things. More... | |
struct | CircuitTargetCache |
Cache AnnoTargets for a circuit's modules, walked as needed. More... | |
struct | WiringProblem |
A representation of a deferred Wiring problem consisting of a source that should be connected to a sink. More... | |
struct | LegacyWiringProblem |
A representation of a legacy Wiring problem consisting of a signal source that should be connected to one or many sinks. More... | |
struct | ModuleModifications |
A store of pending modifications to a FIRRTL module associated with solving one or more WiringProblems. More... | |
struct | HierPathCache |
A cache of existing HierPathOps, mostly used to facilitate HierPathOp reuse. More... | |
struct | ApplyState |
State threaded through functions for resolving and applying annotations. More... | |
struct | AnnoRecord |
===-------------------------------------------------------------------—===// LowerAnnotations ===-------------------------------------------------------------------—===// More... | |
class | Annotation |
This class provides a read-only projection of an annotation. More... | |
class | AnnotationSet |
This class provides a read-only projection over the MLIR attributes that represent a set of annotations. More... | |
class | AnnotationSetIterator |
struct | AnnoTarget |
An annotation target is used to keep track of something that is targeted by an Annotation. More... | |
struct | OpAnnoTarget |
This represents an annotation targeting a specific operation. More... | |
struct | PortAnnoTarget |
This represents an annotation targeting a specific port of a module, memory, or instance. More... | |
class | FieldSource |
To use this class, retrieve a cached copy from the analysis manager: auto &fieldsource = getAnalysis<FieldSource>(getOperation());. More... | |
class | InstanceGraph |
This graph tracks modules and where they are instantiated. More... | |
struct | GenericIntrinsic |
Helper class for checking and extracting information from the generic instrinsic op. More... | |
class | IntrinsicConverter |
Base class for Intrinsic Converters. More... | |
class | IntrinsicOpConverter |
class | IntrinsicLowerings |
Lowering helper which collects all intrinsic converters. More... | |
struct | IntrinsicLoweringDialectInterface |
A dialect interface to provide lowering conversions. More... | |
struct | IntrinsicLoweringInterfaceCollection |
struct | FIRRTLIntrinsicLoweringDialectInterface |
struct | PortInfo |
This holds the name and type that describes the module's ports. More... | |
class | SameOperandsIntTypeKind |
A binary operation where the operands have the same integer kind. More... | |
struct | FirMemory |
struct | FIRRTLReducePatternDialectInterface |
A dialect interface to provide reduction patterns to a reducer tool. More... | |
struct | RecursiveTypeProperties |
A collection of bits indicating the recursive properties of a type. More... | |
class | FIRRTLType |
class | FIRRTLBaseType |
class | WidthQualifiedTypeTrait |
Trait for types which have a width. More... | |
class | IntType |
This is the common base class between SIntType and UIntType. More... | |
class | PropertyType |
struct | ClassElement |
class | ContainAliasableTypes |
A struct to check if there is a type derived from FIRRTLBaseType. More... | |
class | ContainAliasableTypes< BaseTy > |
class | FIRRTLTypeSwitch |
This class implements the same functionality as TypeSwitch except that it uses firrtl::type_dyn_cast for dynamic cast. More... | |
class | FIRRTLTypeSwitch< T, void > |
Specialization of FIRRTLTypeSwitch for void returning callables. More... | |
class | BaseTypeAliasOr |
class | ExprVisitor |
ExprVisitor is a visitor for FIRRTL expression nodes. More... | |
class | StmtVisitor |
ExprVisitor is a visitor for FIRRTL statement nodes. More... | |
class | DeclVisitor |
ExprVisitor is a visitor for FIRRTL declaration nodes. More... | |
class | StmtExprVisitor |
StmtExprVisitor is a visitor for FIRRTL operation that has an optional result. More... | |
class | FIRRTLVisitor |
FIRRTLVisitor allows you to visit all of the expr/stmt/decls with one class declaration. More... | |
struct | CircuitNamespace |
The namespace of a CircuitOp , generally inhabited by modules. More... | |
class | NLATable |
This table tracks nlas and what modules participate in them. More... | |
struct | OwningModuleCache |
This implements an analysis to determine which module owns a given path operation. More... | |
class | FIRToken |
This represents a specific token for .fir files. More... | |
class | FIRLexer |
This implements a lexer for .fir files. More... | |
class | FIRLexerCursor |
This is the state captured for a lexer cursor. More... | |
Typedefs | |
using | InstanceRecord = igraph::InstanceRecord |
using | InstanceGraphNode = igraph::InstanceGraphNode |
using | InstancePathCache = igraph::InstancePathCache |
using | FIRRTLValue = mlir::TypedValue< FIRRTLType > |
using | FIRRTLBaseValue = mlir::TypedValue< FIRRTLBaseType > |
using | FIRRTLPropertyValue = mlir::TypedValue< PropertyType > |
using | WalkDriverCallback = llvm::function_ref< bool(const FieldRef &dst, const FieldRef &src)> |
Walk all the drivers of a value, passing in the connect operations drive the value. More... | |
using | GetNamespaceCallback = llvm::function_ref< hw::InnerSymbolNamespace &(FModuleLike mod)> |
Enumerations | |
enum class | VerificationFlavor { None , IfElseFatal , Immediate , SVA } |
enum class | Direction { In , Out } |
This represents the direction of a single port. More... | |
enum class | ConnectBehaviorKind { LastConnect , StaticSingleConnect } |
enum class | Flow : uint8_t { None , Source , Sink , Duplex } |
enum class | DeclKind { Port , Instance , Other } |
enum class | ReadPortSubfield { addr , en , clk , data } |
enum class | WritePortSubfield { addr , en , clk , data , mask } |
enum class | ReadWritePortSubfield { addr , en , clk , rdata , wmode , wdata , wmask } |
enum class | CompanionMode { Bind , Instantiate , Drop } |
Functions | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &os, const InstanceInfo::LatticeValue &value) |
mlir::LogicalResult | exportFIRFile (mlir::ModuleOp module, llvm::raw_ostream &os, std::optional< size_t > targetLineLength, FIRVersion version) |
void | registerToFIRFileTranslation () |
mlir::OwningOpRef< mlir::ModuleOp > | importFIRFile (llvm::SourceMgr &sourceMgr, mlir::MLIRContext *context, mlir::TimingScope &ts, FIRParserOptions options={}) |
std::pair< bool, std::optional< mlir::LocationAttr > > | maybeStringToLocation (llvm::StringRef spelling, bool skipParsing, mlir::StringAttr &locatorFilenameCache, FileLineColLoc &fileLineColLocCache, MLIRContext *context) |
void | registerFromFIRFileTranslation () |
constexpr FIRVersion | minimumFIRVersion (2, 0, 0) |
The current minimum version of FIRRTL that the parser supports. More... | |
constexpr FIRVersion | nextFIRVersion (4, 1, 0) |
The next version of FIRRTL that is not yet released. More... | |
template<typename T > | |
T & | operator<< (T &os, FIRVersion version) |
template<typename T > | |
static T & | operator<< (T &os, const AnnoPathValue &path) |
template<typename T > | |
static T & | operator<< (T &os, const OpAnnoTarget &target) |
template<typename T > | |
static T & | operator<< (T &os, const PortAnnoTarget &target) |
template<typename T > | |
static T & | operator<< (T &os, const AnnoTarget &target) |
std::string | canonicalizeTarget (StringRef target) |
Return an input target string in canonical form. More... | |
std::optional< TokenAnnoTarget > | tokenizePath (StringRef origTarget) |
Parse a FIRRTL annotation path into its constituent parts. More... | |
std::optional< AnnoPathValue > | resolveEntities (TokenAnnoTarget path, CircuitOp circuit, SymbolTable &symTbl, CircuitTargetCache &cache) |
Convert a parsed target string to a resolved target structure. More... | |
std::optional< AnnoPathValue > | resolvePath (StringRef rawPath, CircuitOp circuit, SymbolTable &symTbl, CircuitTargetCache &cache) |
Resolve a string path to a named item inside a circuit. More... | |
LogicalResult | applyGCTView (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state) |
LogicalResult | applyGCTDataTaps (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state) |
LogicalResult | applyGCTMemTaps (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state) |
LogicalResult | applyTraceName (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state) |
Expand a TraceNameAnnotation (which has don't touch semantics) into a TraceAnnotation (which does NOT have don't touch semantics) and separate DontTouchAnnotations for targets that are not modules, external modules, or instances (as these targets are not valid for a don't touch). More... | |
LogicalResult | applyWiring (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state) |
Consume SourceAnnotation and SinkAnnotation, storing into state. More... | |
template<typename A > | |
A | tryGetAs (DictionaryAttr &dict, const Attribute &root, StringRef key, Location loc, Twine className, Twine path=Twine()) |
Implements the same behavior as DictionaryAttr::getAs<A> to return the value of a specific type associated with a key in a dictionary. More... | |
InstanceOp | addPortsToModule (FModuleLike mod, InstanceOp instOnPath, FIRRTLType portType, Direction dir, StringRef newName, InstancePathCache &instancePathcache, CircuitTargetCache *targetCaches=nullptr) |
Add ports to the module and all its instances and return the clone for instOnPath . More... | |
LogicalResult | registerAnnotationRecord (StringRef annoClass, AnnoRecord annoRecord, const std::function< void(llvm::Twine)> &errorHandler={}) |
Register external annotation records. More... | |
std::optional< AnnoPathValue > | stdResolve (DictionaryAttr anno, ApplyState &state) |
===-------------------------------------------------------------------—===// Standard Utility Resolvers ===-------------------------------------------------------------------—===// More... | |
std::optional< AnnoPathValue > | tryResolve (DictionaryAttr anno, ApplyState &state) |
Resolves with target, if it exists. If not, resolves to the circuit. More... | |
LogicalResult | applyWithoutTargetImpl (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state, bool allowNonLocal) |
===-------------------------------------------------------------------—===// Standard Utility Appliers ===-------------------------------------------------------------------—===// More... | |
template<bool allowNonLocal, bool allowPortAnnoTarget, typename T , typename... Tr> | |
static LogicalResult | applyWithoutTarget (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state) |
An applier which puts the annotation on the target and drops the 'target' field from the annotation. More... | |
template<bool allowNonLocal, typename T , typename... Tr> | |
static LogicalResult | applyWithoutTarget (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state) |
template<bool allowNonLocal = false> | |
static LogicalResult | applyWithoutTarget (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state) |
An applier which puts the annotation on the target and drops the 'target' field from the annotaiton. More... | |
StringRef | getAnnotationAttrName () |
Return the name of the attribute used for annotations on FIRRTL ops. More... | |
StringRef | getPortAnnotationAttrName () |
Return the name of the attribute used for port annotations on FIRRTL ops. More... | |
ArrayAttr | getAnnotationsIfPresent (Operation *op) |
LogicalResult | extractDUT (FModuleLike mod, FModuleLike &dut) |
Utility that searches for a MarkDUTAnnotation on a specific module, mod , and tries to update a design-under-test (DUT), dut , with this module if the module is the DUT. More... | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &os, const Direction &dir) |
Prints the Direction to the stream as either "in" or "out". More... | |
LogicalResult | verifyModuleLikeOpInterface (FModuleLike module) |
Verification hook for verifying module like operations. More... | |
bool | hasDroppableName (Operation *op) |
Return true if the name is droppable. More... | |
bool | isExpression (Operation *op) |
Return true if the specified operation is a firrtl expression. More... | |
size_t | getNumPorts (Operation *op) |
Return the number of ports in a module-like thing (modules, memories, etc) More... | |
bool | isConstant (Operation *op) |
Return true if the specified operation has a constant value. More... | |
bool | isConstant (Value value) |
Return true if the specified value is a constant. More... | |
bool | isDuplexValue (Value val) |
Returns true if the value results from an expression with duplex flow. More... | |
Flow | swapFlow (Flow flow) |
Get a flow's reverse. More... | |
constexpr bool | isValidSrc (Flow flow) |
constexpr bool | isValidDst (Flow flow) |
Flow | foldFlow (Value val, Flow accumulatedFlow=Flow::Source) |
Compute the flow for a Value, val , as determined by the FIRRTL specification. More... | |
DeclKind | getDeclarationKind (Value val) |
MemDirAttr | operator| (MemDirAttr lhs, MemDirAttr rhs) |
Allow 'or'ing MemDirAttr. More... | |
MemDirAttr & | operator|= (MemDirAttr &lhs, MemDirAttr rhs) |
StringAttr | getInnerSymName (Operation *op) |
Return the StringAttr for the inner_sym name, if it exists. More... | |
bool | hasDontTouch (Value value) |
Check whether a block argument ("port") or the operation defining a value has a DontTouch annotation, or a symbol that should prevent certain types of canonicalizations. More... | |
bool | hasDontTouch (Operation *op) |
Check whether an operation has a DontTouch annotation, or a symbol that should prevent certain types of canonicalizations. More... | |
MatchingConnectOp | getSingleConnectUserOf (Value value) |
Scan all the uses of the specified value, checking to see if there is exactly one connect that has the value as its destination. More... | |
void | registerReducePatternDialectInterface (mlir::DialectRegistry ®istry) |
Register the FIRRTL Reduction pattern dialect interface to the given registry. More... | |
bool | isConst (Type type) |
Returns true if this is a 'const' type whose value is guaranteed to be unchanging at circuit execution time. More... | |
bool | containsConst (Type type) |
Returns true if the type is or contains a 'const' type whose value is guaranteed to be unchanging at circuit execution time. More... | |
bool | hasZeroBitWidth (FIRRTLType type) |
Return true if the type has zero bit width. More... | |
bool | areTypesEquivalent (FIRRTLType destType, FIRRTLType srcType, bool destOuterTypeIsConst=false, bool srcOuterTypeIsConst=false, bool requireSameWidths=false) |
Returns whether the two types are equivalent. More... | |
bool | areTypesWeaklyEquivalent (FIRRTLType destType, FIRRTLType srcType, bool destFlip=false, bool srcFlip=false, bool destOuterTypeIsConst=false, bool srcOuterTypeIsConst=false) |
Returns true if two types are weakly equivalent. More... | |
bool | areTypesConstCastable (FIRRTLType destType, FIRRTLType srcType, bool srcOuterTypeIsConst=false) |
Returns whether the srcType can be const-casted to the destType. More... | |
bool | areTypesRefCastable (Type dstType, Type srcType) |
Return true if destination ref type can be cast from source ref type, per FIRRTL spec rules they must be identical or destination has more general versions of the corresponding type in the source. More... | |
bool | isTypeLarger (FIRRTLBaseType dstType, FIRRTLBaseType srcType) |
Returns true if the destination is at least as wide as a source. More... | |
bool | areAnonymousTypesEquivalent (FIRRTLBaseType lhs, FIRRTLBaseType rhs) |
Return true if anonymous types of given arguments are equivalent by pointer comparison. More... | |
bool | areAnonymousTypesEquivalent (mlir::Type lhs, mlir::Type rhs) |
mlir::Type | getPassiveType (mlir::Type anyBaseFIRRTLType) |
bool | isTypeInOut (mlir::Type type) |
Returns true if the given type has some flipped (aka unaligned) dataflow. More... | |
llvm::hash_code | hash_value (const ClassElement &element) |
std::optional< int64_t > | getBitWidth (FIRRTLBaseType type, bool ignoreFlip=false) |
ParseResult | parseNestedType (FIRRTLType &result, AsmParser &parser) |
Parse a FIRRTLType . More... | |
ParseResult | parseNestedBaseType (FIRRTLBaseType &result, AsmParser &parser) |
ParseResult | parseNestedPropertyType (PropertyType &result, AsmParser &parser) |
void | printNestedType (Type type, AsmPrinter &os) |
Print a type defined by this dialect. 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 BaseTy > | |
BaseTy | type_dyn_cast_or_null (Type type) |
void | emitConnect (OpBuilder &builder, Location loc, Value lhs, Value rhs) |
Emit a connect between two values. More... | |
void | emitConnect (ImplicitLocOpBuilder &builder, Value lhs, Value rhs) |
Emit a connect between two values. More... | |
IntegerAttr | getIntAttr (Type type, const APInt &value) |
Utiility for generating a constant attribute. More... | |
IntegerAttr | getIntZerosAttr (Type type) |
Utility for generating a constant zero attribute. More... | |
IntegerAttr | getIntOnesAttr (Type type) |
Utility for generating a constant all ones attribute. More... | |
PropAssignOp | getPropertyAssignment (FIRRTLPropertyValue value) |
Return the single assignment to a Property value. More... | |
Value | getDriverFromConnect (Value val) |
Return the module-scoped driver of a value only looking through one connect. More... | |
Value | getValueSource (Value val, bool lookThroughWires, bool lookThroughNodes, bool lookThroughCasts) |
Return the value that drives another FIRRTL value within module scope. More... | |
Value | getModuleScopedDriver (Value val, bool lookThroughWires, bool lookThroughNodes, bool lookThroughCasts) |
Return the value that drives another FIRRTL value within module scope. More... | |
template<typename A , typename... B> | |
static bool | isModuleScopedDrivenBy (Value val, bool lookThroughWires, bool lookThroughNodes, bool lookThroughCasts) |
Return true if a value is module-scoped driven by a value of a specific type. More... | |
bool | walkDrivers (FIRRTLBaseValue value, bool lookThroughWires, bool lookThroughNodes, bool lookThroughCasts, WalkDriverCallback callback) |
FieldRef | getFieldRefFromValue (Value value, bool lookThroughCasts=false) |
Get the FieldRef from a value. More... | |
FieldRef | getDeltaRef (Value value, bool lookThroughCasts=false) |
Get the delta indexing from a value, as a FieldRef. More... | |
std::pair< std::string, bool > | getFieldName (const FieldRef &fieldRef, bool nameSafe=false) |
Get a string identifier representing the FieldRef. More... | |
Value | getValueByFieldID (ImplicitLocOpBuilder builder, Value value, unsigned fieldID) |
This gets the value targeted by a field id. More... | |
void | walkGroundTypes (FIRRTLType firrtlType, llvm::function_ref< void(uint64_t, FIRRTLBaseType, bool)> fn) |
Walk leaf ground types in the firrtlType and apply the function fn . More... | |
hw::InnerSymTarget | getTargetFor (FieldRef ref) |
Return the inner sym target for the specified value and fieldID. More... | |
FieldRef | getFieldRefForTarget (const hw::InnerSymTarget &ist) |
Get FieldRef pointing to the specified inner symbol target, which must be valid. More... | |
std::pair< hw::InnerSymAttr, StringAttr > | getOrAddInnerSym (MLIRContext *context, hw::InnerSymAttr attr, uint64_t fieldID, llvm::function_ref< hw::InnerSymbolNamespace &()> getNamespace) |
Ensure that the the InnerSymAttr has a symbol on the field specified. More... | |
StringAttr | getOrAddInnerSym (const hw::InnerSymTarget &target, llvm::function_ref< hw::InnerSymbolNamespace &()> getNamespace) |
Returns an inner symbol identifier for the specified target (op or port), adding one if necessary. More... | |
StringAttr | getOrAddInnerSym (const hw::InnerSymTarget &target, GetNamespaceCallback getNamespace) |
Returns an inner symbol identifier for the specified target (op or port), adding one if necessary. More... | |
hw::InnerRefAttr | getInnerRefTo (const hw::InnerSymTarget &target, GetNamespaceCallback getNamespace) |
Obtain an inner reference to the target (operation or port), adding an inner symbol as necessary. More... | |
static StringAttr | getOrAddInnerSym (Operation *op, GetNamespaceCallback getNamespace) |
Returns an inner symbol identifier for the specified operation, adding one if necessary. More... | |
static StringAttr | getOrAddInnerSym (Operation *op, uint64_t fieldID, GetNamespaceCallback getNamespace) |
Returns an inner symbol identifier for the specified operation's field adding one if necessary. More... | |
static hw::InnerRefAttr | getInnerRefTo (Operation *op, GetNamespaceCallback getNamespace) |
Obtain an inner reference to an operation, possibly adding an inner symbol. More... | |
static hw::InnerRefAttr | getInnerRefTo (Operation *op, uint64_t fieldID, GetNamespaceCallback getNamespace) |
Obtain an inner reference to an operation's field, possibly adding an inner symbol. More... | |
static StringAttr | getOrAddInnerSym (FModuleLike mod, size_t portIdx, GetNamespaceCallback getNamespace) |
Returns an inner symbol identifier for the specified port, adding one if necessary. More... | |
static StringAttr | getOrAddInnerSym (FModuleLike mod, size_t portIdx, uint64_t fieldID, GetNamespaceCallback getNamespace) |
Returns an inner symbol identifier for the specified port's field, adding one if necessary. More... | |
static hw::InnerRefAttr | getInnerRefTo (FModuleLike mod, size_t portIdx, GetNamespaceCallback getNamespace) |
Obtain an inner reference to a port, possibly adding an inner symbol. More... | |
static hw::InnerRefAttr | getInnerRefTo (FModuleLike mod, size_t portIdx, uint64_t fieldID, GetNamespaceCallback getNamespace) |
Obtain an inner reference to a port's field, possibly adding an inner symbol. More... | |
FIRRTLBaseType | getBaseType (Type type) |
If it is a base type, return it as is. More... | |
template<typename T > | |
T | getBaseOfType (Type type) |
Get base type if isa<> the requested type, else null. More... | |
FIRRTLType | mapBaseType (FIRRTLType type, function_ref< FIRRTLBaseType(FIRRTLBaseType)> fn) |
Return a FIRRTLType with its base type component mutated by the given function. More... | |
FIRRTLType | mapBaseTypeNullable (FIRRTLType type, function_ref< FIRRTLBaseType(FIRRTLBaseType)> fn) |
Return a FIRRTLType with its base type component mutated by the given function. More... | |
Type | lowerType (Type type, std::optional< Location > loc={}, llvm::function_ref< hw::TypeAliasType(Type, BaseTypeAliasType, Location)> getTypeDeclFn={}) |
Given a type, return the corresponding lowered type for the HW dialect. More... | |
std::pair< bool, std::optional< mlir::LocationAttr > > | maybeStringToLocation (StringRef spelling, bool skipParsing, StringAttr &locatorFilenameCache, FileLineColLoc &fileLineColLocCache, MLIRContext *context) |
Parse a string that may encode a FIRRTL location into a LocationAttr. More... | |
template<class IterTy , class ResultTy , class ReduceFuncTy , class TransformFuncTy > | |
static ResultTy | transformReduce (MLIRContext *context, IterTy begin, IterTy end, ResultTy init, ReduceFuncTy reduce, TransformFuncTy transform) |
Wrapper for llvm::parallelTransformReduce that performs the transform_reduce serially when MLIR multi-threading is disabled. More... | |
template<class RangeTy , class ResultTy , class ReduceFuncTy , class TransformFuncTy > | |
static ResultTy | transformReduce (MLIRContext *context, RangeTy &&r, ResultTy init, ReduceFuncTy reduce, TransformFuncTy transform) |
Range wrapper. More... | |
void | makeCommonPrefix (SmallString< 64 > &a, StringRef b) |
Truncate a to the common prefix of a and b . More... | |
PathOp | createPathRef (Operation *op, hw::HierPathOp nla, mlir::ImplicitLocOpBuilder &builderOM) |
Add the tracker annotation to the op and get a PathOp to the op. More... | |
bool | importAnnotationsFromJSONRaw (llvm::json::Value &value, SmallVectorImpl< Attribute > &annotations, llvm::json::Path path, MLIRContext *context) |
Deserialize a JSON value into FIRRTL Annotations. More... | |
std::unique_ptr< mlir::Pass > | createResolvePathsPass () |
std::unique_ptr< mlir::Pass > | createLowerFIRRTLAnnotationsPass (bool ignoreUnhandledAnnotations=false, bool ignoreClasslessAnnotations=false, bool noRefTypePorts=false, bool allowAddingPortsOnPublic=false) |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createLowerOpenAggsPass () |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createLowerFIRRTLTypesPass (PreserveAggregate::PreserveMode mode=PreserveAggregate::None, PreserveAggregate::PreserveMode memoryMode=PreserveAggregate::None) |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createLowerBundleVectorTypesPass () |
std::unique_ptr< mlir::Pass > | createLowerCHIRRTLPass () |
std::unique_ptr< mlir::Pass > | createLowerIntmodulesPass (bool fixupEICGWrapper=false) |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createLowerIntrinsicsPass () |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createIMConstPropPass () |
std::unique_ptr< mlir::Pass > | createRemoveUnusedPortsPass (bool ignoreDontTouch=false) |
std::unique_ptr< mlir::Pass > | createInlinerPass () |
std::unique_ptr< mlir::Pass > | createInferReadWritePass () |
std::unique_ptr< mlir::Pass > | createCreateSiFiveMetadataPass (bool replSeqMem=false, mlir::StringRef replSeqMemFile="") |
std::unique_ptr< mlir::Pass > | createVBToBVPass () |
std::unique_ptr< mlir::Pass > | createAddSeqMemPortsPass () |
std::unique_ptr< mlir::Pass > | createDedupPass () |
std::unique_ptr< mlir::Pass > | createEliminateWiresPass () |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createLowerMatchesPass () |
std::unique_ptr< mlir::Pass > | createLowerSignaturesPass () |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createPassiveWiresPass () |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createExpandWhensPass () |
std::unique_ptr< mlir::Pass > | createFlattenMemoryPass () |
std::unique_ptr< mlir::Pass > | createInferWidthsPass () |
std::unique_ptr< mlir::Pass > | createInferResetsPass () |
std::unique_ptr< mlir::Pass > | createLowerMemoryPass () |
std::unique_ptr< mlir::Pass > | createMemToRegOfVecPass (bool replSeqMem=false, bool ignoreReadEnable=false) |
std::unique_ptr< mlir::Pass > | createFIRRTLFieldSourcePass () |
std::unique_ptr< mlir::Pass > | createPrintInstanceGraphPass () |
std::unique_ptr< mlir::Pass > | createPrintNLATablePass () |
std::unique_ptr< mlir::Pass > | createBlackBoxReaderPass (std::optional< mlir::StringRef > inputPrefix={}) |
std::unique_ptr< mlir::Pass > | createGrandCentralPass (CompanionMode companionMode=CompanionMode::Bind) |
std::unique_ptr< mlir::Pass > | createCheckCombLoopsPass () |
std::unique_ptr< mlir::Pass > | createSFCCompatPass () |
std::unique_ptr< mlir::Pass > | createMergeConnectionsPass (bool enableAggressiveMerging=false) |
std::unique_ptr< mlir::Pass > | createVectorizationPass () |
std::unique_ptr< mlir::Pass > | createInjectDUTHierarchyPass () |
std::unique_ptr< mlir::Pass > | createDropConstPass () |
std::unique_ptr< mlir::Pass > | createDropNamesPass (PreserveValues::PreserveMode mode=PreserveValues::None) |
std::unique_ptr< mlir::Pass > | createExtractInstancesPass () |
std::unique_ptr< mlir::Pass > | createIMDeadCodeElimPass () |
std::unique_ptr< mlir::Pass > | createRandomizeRegisterInitPass () |
std::unique_ptr< mlir::Pass > | createRegisterOptimizerPass () |
std::unique_ptr< mlir::Pass > | createLowerXMRPass () |
std::unique_ptr< mlir::Pass > | createResolveTracesPass (mlir::StringRef outputAnnotationFilename="") |
std::unique_ptr< mlir::Pass > | createInnerSymbolDCEPass () |
std::unique_ptr< mlir::Pass > | createFinalizeIRPass () |
std::unique_ptr< mlir::Pass > | createLowerClassesPass () |
std::unique_ptr< mlir::Pass > | createLowerLayersPass () |
std::unique_ptr< mlir::Pass > | createLayerMergePass () |
std::unique_ptr< mlir::Pass > | createLayerSinkPass () |
std::unique_ptr< mlir::Pass > | createAdvancedLayerSinkPass () |
std::unique_ptr< mlir::Pass > | createMaterializeDebugInfoPass () |
std::unique_ptr< mlir::Pass > | createLintingPass () |
std::unique_ptr< mlir::Pass > | createProbesToSignalsPass () |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createSpecializeLayersPass () |
std::unique_ptr< mlir::Pass > | createSpecializeOptionPass (bool selectDefaultInstanceChoice=false) |
std::unique_ptr< mlir::Pass > | createCreateCompanionAssume () |
std::unique_ptr< mlir::Pass > | createModuleSummaryPass () |
std::unique_ptr< mlir::Pass > | createLowerDPIPass () |
std::unique_ptr< mlir::Pass > | createAssignOutputDirsPass (mlir::StringRef outputDir="") |
std::unique_ptr< mlir::Pass > | createCheckLayers () |
std::unique_ptr< mlir::Pass > | createCheckRecursiveInstantiation () |
bool | isRecognizedPrintfEncodedVerif (PrintFOp printOp) |
Classifier for legacy verif intent captured in printf + when's. More... | |
Variables | |
constexpr const char * | rawAnnotations = "rawAnnotations" |
constexpr const char * | conventionAnnoClass = "circt.ConventionAnnotation" |
constexpr const char * | typeLoweringAnnoClass |
constexpr const char * | dontTouchAnnoClass |
constexpr const char * | enumComponentAnnoClass |
constexpr const char * | enumDefAnnoClass |
constexpr const char * | enumVecAnnoClass |
constexpr const char * | forceNameAnnoClass |
constexpr const char * | decodeTableAnnotation |
constexpr const char * | flattenAnnoClass = "firrtl.transforms.FlattenAnnotation" |
constexpr const char * | inlineAnnoClass = "firrtl.passes.InlineAnnotation" |
constexpr const char * | traceNameAnnoClass |
constexpr const char * | traceAnnoClass |
constexpr const char * | blackBoxInlineAnnoClass |
constexpr const char * | blackBoxPathAnnoClass |
constexpr const char * | blackBoxTargetDirAnnoClass |
constexpr const char * | blackBoxResourceFileNameAnnoClass |
constexpr const char * | blackBoxAnnoClass |
constexpr const char * | mustDedupAnnoClass |
constexpr const char * | runFIRRTLTransformAnnoClass |
constexpr const char * | extractAssertAnnoClass |
constexpr const char * | extractAssumeAnnoClass |
constexpr const char * | extractCoverageAnnoClass |
constexpr const char * | testBenchDirAnnoClass |
constexpr const char * | moduleHierAnnoClass |
constexpr const char * | outputDirAnnoClass = "circt.OutputDirAnnotation" |
constexpr const char * | testHarnessHierAnnoClass |
constexpr const char * | retimeModulesFileAnnoClass |
constexpr const char * | retimeModuleAnnoClass |
constexpr const char * | verifBlackBoxAnnoClass |
constexpr const char * | metadataDirectoryAttrName |
constexpr const char * | noDedupAnnoClass = "firrtl.transforms.NoDedupAnnotation" |
constexpr const char * | dedupGroupAnnoClass |
constexpr const char * | serializedViewAnnoClass |
constexpr const char * | viewAnnoClass |
constexpr const char * | companionAnnoClass |
constexpr const char * | augmentedGroundTypeClass |
constexpr const char * | augmentedBundleTypeClass |
constexpr const char * | dataTapsClass |
constexpr const char * | dataTapsBlackboxClass |
constexpr const char * | memTapClass |
constexpr const char * | memTapBlackboxClass |
constexpr const char * | memTapPortClass |
constexpr const char * | memTapSourceClass |
constexpr const char * | deletedKeyClass |
constexpr const char * | literalKeyClass |
constexpr const char * | referenceKeyClass |
constexpr const char * | referenceKeyPortClass |
constexpr const char * | referenceKeySourceClass |
constexpr const char * | internalKeyClass |
constexpr const char * | internalKeyPortClass |
constexpr const char * | internalKeySourceClass |
constexpr const char * | extractGrandCentralClass |
constexpr const char * | grandCentralHierarchyFileAnnoClass |
constexpr const char * | dutAnnoClass |
constexpr const char * | injectDUTHierarchyAnnoClass |
constexpr const char * | sitestBlackBoxAnnoClass |
constexpr const char * | sitestTestHarnessBlackBoxAnnoClass |
constexpr const char * | dontObfuscateModuleAnnoClass |
constexpr const char * | elaborationArtefactsDirectoryAnnoClass |
constexpr const char * | testHarnessPathAnnoClass |
constexpr const char * | fullResetAnnoClass = "circt.FullResetAnnotation" |
Annotation that marks a reset (port or wire) and domain. More... | |
constexpr const char * | excludeFromFullResetAnnoClass |
Annotation that marks a module as not belonging to any reset domain. More... | |
constexpr const char * | fullAsyncResetAnnoClass |
Annotation that marks a reset (port or wire) and domain. More... | |
constexpr const char * | ignoreFullAsyncResetAnnoClass |
Annotation that marks a module as not belonging to any reset domain. More... | |
constexpr const char * | convertMemToRegOfVecAnnoClass |
constexpr const char * | excludeMemToRegAnnoClass |
constexpr const char * | extractBlackBoxAnnoClass |
constexpr const char * | extractClockGatesAnnoClass |
constexpr const char * | extractSeqMemsAnnoClass |
constexpr const char * | addSeqMemPortAnnoClass |
constexpr const char * | addSeqMemPortsFileAnnoClass |
constexpr const char * | loadMemoryFromFileAnnoClass |
constexpr const char * | loadMemoryFromFileInlineAnnoClass |
constexpr const char * | wiringSinkAnnoClass |
constexpr const char * | wiringSourceAnnoClass |
constexpr const char * | attributeAnnoClass = "firrtl.AttributeAnnotation" |
constexpr const char * | modulePrefixAnnoClass = "chisel3.ModulePrefixAnnotation" |
constexpr FIRVersion | missingSpecFIRVersion = nextFIRVersion |
A marker for parser features that are currently missing from the spec. More... | |
constexpr FIRVersion | exportFIRVersion = nextFIRVersion |
The version of FIRRTL that the exporter produces. More... | |
static AnnoRecord | NoTargetAnnotation |
Resolution and application of a "firrtl.annotations.NoTargetAnnotation". More... | |
static llvm::StringMap< AnnoRecord > | annotationRecords |
using circt::firrtl::FIRRTLBaseValue = typedef mlir::TypedValue<FIRRTLBaseType> |
Definition at line 394 of file FIRRTLTypes.h.
using circt::firrtl::FIRRTLPropertyValue = typedef mlir::TypedValue<PropertyType> |
Definition at line 395 of file FIRRTLTypes.h.
using circt::firrtl::FIRRTLValue = typedef mlir::TypedValue<FIRRTLType> |
Definition at line 393 of file FIRRTLTypes.h.
using circt::firrtl::GetNamespaceCallback = typedef llvm::function_ref<hw::InnerSymbolNamespace &(FModuleLike mod)> |
Definition at line 145 of file FIRRTLUtils.h.
using circt::firrtl::InstanceGraphNode = typedef igraph::InstanceGraphNode |
Definition at line 26 of file FIRRTLInstanceGraph.h.
using circt::firrtl::InstancePathCache = typedef igraph::InstancePathCache |
Definition at line 27 of file FIRRTLInstanceGraph.h.
using circt::firrtl::InstanceRecord = typedef igraph::InstanceRecord |
Definition at line 25 of file FIRRTLInstanceGraph.h.
using circt::firrtl::WalkDriverCallback = typedef llvm::function_ref<bool(const FieldRef &dst, const FieldRef &src)> |
Walk all the drivers of a value, passing in the connect operations drive the value.
If the value is an aggregate it will find connects to subfields. If the callback returns false, this function will stop walking. Returns false if walking was broken, and true otherwise.
Definition at line 79 of file FIRRTLUtils.h.
|
strong |
|
strong |
Enumerator | |
---|---|
LastConnect | Classic FIRRTL connections: last connect 'wins' across paths; conditionally applied under 'when'. |
StaticSingleConnect | Exclusive connection to the destination, unconditional. |
Definition at line 82 of file FIRRTLOpInterfaces.h.
|
strong |
Enumerator | |
---|---|
Port | |
Instance | |
Other |
Definition at line 86 of file FIRRTLOps.h.
|
strong |
This represents the direction of a single port.
Enumerator | |
---|---|
In | |
Out |
Definition at line 27 of file FIRRTLAttributes.h.
|
strong |
Enumerator | |
---|---|
None | |
Source | |
Sink | |
Duplex |
Definition at line 60 of file FIRRTLOps.h.
|
strong |
Enumerator | |
---|---|
addr | |
en | |
clk | |
data |
Definition at line 90 of file FIRRTLOps.h.
|
strong |
Enumerator | |
---|---|
addr | |
en | |
clk | |
rdata | |
wmode | |
wdata | |
wmask |
Definition at line 92 of file FIRRTLOps.h.
|
strong |
Enumerator | |
---|---|
None | |
IfElseFatal | |
Immediate | |
SVA |
Definition at line 26 of file FIRRTLToHW.h.
|
strong |
Enumerator | |
---|---|
addr | |
en | |
clk | |
data | |
mask |
Definition at line 91 of file FIRRTLOps.h.
InstanceOp circt::firrtl::addPortsToModule | ( | FModuleLike | mod, |
InstanceOp | instOnPath, | ||
FIRRTLType | portType, | ||
Direction | dir, | ||
StringRef | newName, | ||
InstancePathCache & | instancePathcache, | ||
CircuitTargetCache * | targetCaches = nullptr |
||
) |
Add ports to the module and all its instances and return the clone for instOnPath
.
This does not connect the new ports to anything. Replace the old instances with the new cloned instance in all the caches.
Definition at line 348 of file FIRRTLAnnotationHelper.cpp.
References circt::calyx::direction::get(), getNumPorts(), circt::igraph::InstancePathCache::instanceGraph, circt::igraph::InstanceGraph::lookup(), circt::igraph::InstancePathCache::replaceInstance(), circt::firrtl::CircuitTargetCache::replaceOp(), and circt::igraph::InstanceGraphNode::uses().
Referenced by lowerInternalPathAnno().
LogicalResult circt::firrtl::applyGCTDataTaps | ( | const AnnoPathValue & | target, |
DictionaryAttr | anno, | ||
ApplyState & | state | ||
) |
Definition at line 533 of file FIRRTLAnnotationHelper.cpp.
References circt::firrtl::AnnotationSet::addDontTouch(), canonicalizeTarget(), circt::firrtl::ApplyState::circuit, dataTapsClass, emitConnect(), circt::calyx::direction::get(), getBaseType(), circt::hw::FieldIdImpl::getFinalTypeByFieldID(), getValueByFieldID(), internalKeyClass, lowerInternalPathAnno(), circt::firrtl::WiringProblem::Prefer, referenceKeyClass, resolvePath(), circt::firrtl::ApplyState::symTbl, circt::firrtl::ApplyState::targetCaches, tokenizePath(), and circt::firrtl::ApplyState::wiringProblems.
LogicalResult circt::firrtl::applyGCTMemTaps | ( | const AnnoPathValue & | target, |
DictionaryAttr | anno, | ||
ApplyState & | state | ||
) |
Definition at line 715 of file FIRRTLAnnotationHelper.cpp.
References canonicalizeTarget(), circt::firrtl::ApplyState::circuit, data, circt::calyx::direction::get(), circt::igraph::InstancePathCache::getAbsolutePaths(), circt::firrtl::ApplyState::getNamespace(), circt::firrtl::ApplyState::instancePathCache, memTapClass, circt::firrtl::WiringProblem::Never, circt::Namespace::newName(), circt::firrtl::ApplyState::noRefTypePorts, circt::firrtl::WiringProblem::Prefer, resolvePath(), circt::firrtl::ApplyState::symTbl, circt::firrtl::ApplyState::targetCaches, tokenizePath(), and circt::firrtl::ApplyState::wiringProblems.
LogicalResult circt::firrtl::applyGCTView | ( | const AnnoPathValue & | target, |
DictionaryAttr | anno, | ||
ApplyState & | state | ||
) |
Definition at line 1144 of file GrandCentral.cpp.
References circt::firrtl::AnnotationSet::addAnnotations(), circt::firrtl::ApplyState::addToWorklistFn, circt::firrtl::AnnotationSet::applyToOperation(), circt::firrtl::ApplyState::circuit, companionAnnoClass, circt::calyx::direction::get(), circt::firrtl::ApplyState::newID(), parseAugmentedType(), and viewAnnoClass.
LogicalResult circt::firrtl::applyTraceName | ( | const AnnoPathValue & | target, |
DictionaryAttr | anno, | ||
ApplyState & | state | ||
) |
Expand a TraceNameAnnotation (which has don't touch semantics) into a TraceAnnotation (which does NOT have don't touch semantics) and separate DontTouchAnnotations for targets that are not modules, external modules, or instances (as these targets are not valid for a don't touch).
Definition at line 45 of file ResolveTraces.cpp.
References circt::firrtl::ApplyState::addToWorklistFn, dontTouchAnnoClass, circt::calyx::direction::get(), circt::firrtl::AnnoPathValue::isOpOfType(), and traceAnnoClass.
LogicalResult circt::firrtl::applyWiring | ( | const AnnoPathValue & | target, |
DictionaryAttr | anno, | ||
ApplyState & | state | ||
) |
Consume SourceAnnotation and SinkAnnotation, storing into state.
Definition at line 22 of file LegacyWiring.cpp.
References circt::firrtl::ApplyState::circuit, circt::firrtl::AnnoPathValue::fieldIdx, circt::igraph::InstancePathCache::getAbsolutePaths(), circt::firrtl::AnnoTarget::getOp(), getValueByFieldID(), circt::firrtl::ApplyState::instancePathCache, circt::firrtl::AnnoPathValue::instances, circt::firrtl::AnnoPathValue::isOpOfType(), circt::firrtl::ApplyState::legacyWiringProblems, circt::firrtl::AnnoPathValue::ref, circt::firrtl::ApplyState::wiringProblemInstRefs, wiringSinkAnnoClass, and wiringSourceAnnoClass.
|
static |
An applier which puts the annotation on the target and drops the 'target' field from the annotation.
Optionally handles non-local annotations. Ensures the target resolves to an expected type of operation.
Definition at line 480 of file FIRRTLAnnotationHelper.h.
References applyWithoutTargetImpl(), circt::firrtl::AnnoPathValue::isOpOfType(), and circt::firrtl::AnnoPathValue::ref.
|
static |
Definition at line 493 of file FIRRTLAnnotationHelper.h.
References applyWithoutTarget().
|
static |
An applier which puts the annotation on the target and drops the 'target' field from the annotaiton.
Optionally handles non-local annotations.
Definition at line 503 of file FIRRTLAnnotationHelper.h.
References applyWithoutTargetImpl().
Referenced by applyWithoutTarget().
LogicalResult circt::firrtl::applyWithoutTargetImpl | ( | const AnnoPathValue & | target, |
DictionaryAttr | anno, | ||
ApplyState & | state, | ||
bool | allowNonLocal | ||
) |
===-------------------------------------------------------------------—===// Standard Utility Appliers ===-------------------------------------------------------------------—===//
An applier which puts the annotation on the target and drops the 'target' field from the annotation.
An applier which puts the annotation on the target and drops the 'target' field from the annotation. Optionally handles non-local annotations.
Optionally handles non-local annotations.
Definition at line 202 of file LowerAnnotations.cpp.
References addAnnotation(), circt::firrtl::AnnoPathValue::fieldIdx, circt::calyx::direction::get(), circt::firrtl::Annotation::getClass(), circt::firrtl::Annotation::getMember(), circt::firrtl::AnnoTarget::getOp(), circt::firrtl::AnnoPathValue::isLocal(), circt::firrtl::AnnoPathValue::ref, and scatterNonLocalPath().
Referenced by applyWithoutTarget().
bool circt::firrtl::areAnonymousTypesEquivalent | ( | FIRRTLBaseType | lhs, |
FIRRTLBaseType | rhs | ||
) |
Return true if anonymous types of given arguments are equivalent by pointer comparison.
Definition at line 1182 of file FIRRTLTypes.cpp.
References circt::firrtl::FIRRTLBaseType::getAnonymousType().
Referenced by areAnonymousTypesEquivalent().
bool circt::firrtl::areAnonymousTypesEquivalent | ( | mlir::Type | lhs, |
mlir::Type | rhs | ||
) |
Definition at line 1187 of file FIRRTLTypes.cpp.
References areAnonymousTypesEquivalent().
bool circt::firrtl::areTypesConstCastable | ( | FIRRTLType | destType, |
FIRRTLType | srcType, | ||
bool | srcOuterTypeIsConst = false |
||
) |
Returns whether the srcType can be const-casted to the destType.
Definition at line 993 of file FIRRTLTypes.cpp.
Referenced by emitConnect().
bool circt::firrtl::areTypesEquivalent | ( | FIRRTLType | destFType, |
FIRRTLType | srcFType, | ||
bool | destOuterTypeIsConst = false , |
||
bool | srcOuterTypeIsConst = false , |
||
bool | requireSameWidths = false |
||
) |
Returns whether the two types are equivalent.
This implements the exact definition of type equivalence in the FIRRTL spec. If the types being compared have any outer flips that encode FIRRTL module directions (input or output), these should be stripped before using this method.
Definition at line 903 of file FIRRTLTypes.cpp.
References areBundleElementsEquivalent(), and circt::firrtl::FIRRTLType::isConst().
Referenced by areBundleElementsEquivalent(), and circt::firrtl::IntrinsicLowerings::lower().
bool circt::firrtl::areTypesRefCastable | ( | Type | dstType, |
Type | srcType | ||
) |
Return true if destination ref type can be cast from source ref type, per FIRRTL spec rules they must be identical or destination has more general versions of the corresponding type in the source.
Definition at line 1054 of file FIRRTLTypes.cpp.
References assert().
bool circt::firrtl::areTypesWeaklyEquivalent | ( | FIRRTLType | destType, |
FIRRTLType | srcType, | ||
bool | destFlip = false , |
||
bool | srcFlip = false , |
||
bool | destOuterTypeIsConst = false , |
||
bool | srcOuterTypeIsConst = false |
||
) |
Returns true if two types are weakly equivalent.
See the FIRRTL spec, Section 4.6, for a full definition of this. Roughly, the oriented types (the types with any flips pushed to the leaves) must match. This allows for types with flips in different positions to be equivalent.
std::string circt::firrtl::canonicalizeTarget | ( | StringRef | target | ) |
Return an input target
string in canonical form.
This converts a Legacy Annotation (e.g., A.B.C) into a modern annotation (e.g., ~A|B>C). Trailing subfield/subindex references are preserved.
Definition at line 140 of file FIRRTLAnnotationHelper.cpp.
Referenced by applyGCTDataTaps(), applyGCTMemTaps(), resolvePath(), and stdResolveImpl().
bool circt::firrtl::containsConst | ( | Type | type | ) |
Returns true if the type is or contains a 'const' type whose value is guaranteed to be unchanging at circuit execution time.
Definition at line 843 of file FIRRTLTypes.cpp.
Referenced by circt::firrtl::FIRRTLBaseType::isRegisterType().
std::unique_ptr< mlir::Pass > circt::firrtl::createAddSeqMemPortsPass | ( | ) |
Definition at line 528 of file AddSeqMemPorts.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createAdvancedLayerSinkPass | ( | ) |
Definition at line 464 of file AdvancedLayerSink.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr<mlir::Pass> circt::firrtl::createAssignOutputDirsPass | ( | mlir::StringRef | outputDir = "" | ) |
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr<mlir::Pass> circt::firrtl::createBlackBoxReaderPass | ( | std::optional< mlir::StringRef > | inputPrefix = {} | ) |
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createCheckCombLoopsPass | ( | ) |
Definition at line 728 of file CheckCombLoops.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< Pass > circt::firrtl::createCheckLayers | ( | ) |
Definition at line 149 of file CheckLayers.cpp.
Referenced by circt::firtool::populatePreprocessTransforms().
std::unique_ptr< mlir::Pass > circt::firrtl::createCheckRecursiveInstantiation | ( | ) |
Definition at line 63 of file CheckRecursiveInstantiation.cpp.
Referenced by circt::firtool::populatePreprocessTransforms().
std::unique_ptr< mlir::Pass > circt::firrtl::createCreateCompanionAssume | ( | ) |
Definition at line 75 of file CreateCompanionAssume.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr<mlir::Pass> circt::firrtl::createCreateSiFiveMetadataPass | ( | bool | replSeqMem = false , |
mlir::StringRef | replSeqMemFile = "" |
||
) |
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createDedupPass | ( | ) |
std::unique_ptr< mlir::Pass > circt::firrtl::createDropConstPass | ( | ) |
Definition at line 110 of file DropConst.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createDropNamesPass | ( | PreserveValues::PreserveMode | mode = PreserveValues::None | ) |
Definition at line 101 of file DropName.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), and circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createEliminateWiresPass | ( | ) |
This is the pass constructor.
Definition at line 97 of file EliminateWires.cpp.
std::unique_ptr< mlir::Pass > circt::firrtl::createExpandWhensPass | ( | ) |
Definition at line 888 of file ExpandWhens.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), and circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createExtractInstancesPass | ( | ) |
Definition at line 1183 of file ExtractInstances.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createFinalizeIRPass | ( | ) |
Definition at line 45 of file FinalizeIR.cpp.
Referenced by circt::firtool::populateFinalizeIR().
std::unique_ptr< mlir::Pass > circt::firrtl::createFIRRTLFieldSourcePass | ( | ) |
Definition at line 80 of file PrintFIRRTLFieldSource.cpp.
std::unique_ptr< mlir::Pass > circt::firrtl::createFlattenMemoryPass | ( | ) |
Definition at line 241 of file FlattenMemory.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createGrandCentralPass | ( | CompanionMode | companionMode = CompanionMode::Bind | ) |
Definition at line 2233 of file GrandCentral.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createIMConstPropPass | ( | ) |
Definition at line 1099 of file IMConstProp.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), and circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createIMDeadCodeElimPass | ( | ) |
Definition at line 809 of file IMDeadCodeElim.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createInferReadWritePass | ( | ) |
Definition at line 606 of file InferReadWrite.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createInferResetsPass | ( | ) |
Definition at line 553 of file InferResets.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), and circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createInferWidthsPass | ( | ) |
Definition at line 2318 of file InferWidths.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), and circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createInjectDUTHierarchyPass | ( | ) |
Definition at line 340 of file InjectDUTHierarchy.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createInlinerPass | ( | ) |
Definition at line 1614 of file ModuleInliner.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), and circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createInnerSymbolDCEPass | ( | ) |
Definition at line 139 of file InnerSymbolDCE.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createLayerMergePass | ( | ) |
Definition at line 72 of file LayerMerge.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createLayerSinkPass | ( | ) |
Definition at line 58 of file LayerSink.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< Pass > circt::firrtl::createLintingPass | ( | ) |
Definition at line 77 of file Lint.cpp.
Referenced by circt::firtool::populateLowFIRRTLToHW().
std::unique_ptr<mlir::Pass> circt::firrtl::createLowerBundleVectorTypesPass | ( | ) |
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerCHIRRTLPass | ( | ) |
Definition at line 672 of file LowerCHIRRTL.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), and circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerClassesPass | ( | ) |
Definition at line 958 of file LowerClasses.cpp.
Referenced by circt::firtool::populateLowFIRRTLToHW().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerDPIPass | ( | ) |
Definition at line 294 of file LowerDPI.cpp.
Referenced by circt::firtool::populateLowFIRRTLToHW().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerFIRRTLAnnotationsPass | ( | bool | ignoreUnhandledAnnotations = false , |
bool | ignoreClasslessAnnotations = false , |
||
bool | noRefTypePorts = false , |
||
bool | allowAddingPortsOnPublic = false |
||
) |
This is the pass constructor.
Definition at line 1270 of file LowerAnnotations.cpp.
Referenced by circt::firtool::populatePreprocessTransforms().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerFIRRTLTypesPass | ( | PreserveAggregate::PreserveMode | mode = PreserveAggregate::None , |
PreserveAggregate::PreserveMode | memoryMode = PreserveAggregate::None |
||
) |
This is the pass constructor.
Definition at line 1692 of file LowerTypes.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), and circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerIntmodulesPass | ( | bool | fixupEICGWrapper = false | ) |
This is the pass constructor.
Definition at line 224 of file LowerIntmodules.cpp.
Referenced by circt::firtool::populatePreprocessTransforms().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerIntrinsicsPass | ( | ) |
This is the pass constructor.
Definition at line 66 of file LowerIntrinsics.cpp.
Referenced by circt::firtool::populatePreprocessTransforms().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerLayersPass | ( | ) |
Definition at line 947 of file LowerLayers.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerMatchesPass | ( | ) |
Definition at line 95 of file LowerMatches.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerMemoryPass | ( | ) |
Definition at line 562 of file LowerMemory.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerOpenAggsPass | ( | ) |
This is the pass constructor.
Definition at line 859 of file LowerOpenAggs.cpp.
Referenced by circt::firtool::populatePreprocessTransforms().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerSignaturesPass | ( | ) |
This is the pass constructor.
Definition at line 488 of file LowerSignatures.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createLowerXMRPass | ( | ) |
Definition at line 864 of file LowerXMR.cpp.
Referenced by circt::firtool::populateLowFIRRTLToHW().
std::unique_ptr< Pass > circt::firrtl::createMaterializeDebugInfoPass | ( | ) |
Definition at line 118 of file MaterializeDebugInfo.cpp.
Referenced by circt::firtool::populatePreprocessTransforms().
std::unique_ptr< mlir::Pass > circt::firrtl::createMemToRegOfVecPass | ( | bool | replSeqMem = false , |
bool | ignoreReadEnable = false |
||
) |
Definition at line 456 of file MemToRegOfVec.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createMergeConnectionsPass | ( | bool | enableAggressiveMerging = false | ) |
Definition at line 345 of file MergeConnections.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< Pass > circt::firrtl::createModuleSummaryPass | ( | ) |
Definition at line 153 of file ModuleSummary.cpp.
std::unique_ptr< mlir::Pass > circt::firrtl::createPassiveWiresPass | ( | ) |
This is the pass constructor.
Definition at line 93 of file PassiveWires.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
PathOp circt::firrtl::createPathRef | ( | Operation * | op, |
hw::HierPathOp | nla, | ||
mlir::ImplicitLocOpBuilder & | builderOM | ||
) |
Add the tracker annotation to the op and get a PathOp to the op.
Definition at line 1080 of file FIRRTLUtils.cpp.
References circt::firrtl::AnnotationSet::addAnnotations(), circt::firrtl::AnnotationSet::applyToOperation(), and circt::calyx::direction::get().
std::unique_ptr< mlir::Pass > circt::firrtl::createPrintInstanceGraphPass | ( | ) |
Definition at line 45 of file PrintInstanceGraph.cpp.
std::unique_ptr< mlir::Pass > circt::firrtl::createPrintNLATablePass | ( | ) |
Definition at line 51 of file PrintNLATable.cpp.
std::unique_ptr< mlir::Pass > circt::firrtl::createProbesToSignalsPass | ( | ) |
This is the pass constructor.
Definition at line 626 of file ProbesToSignals.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createRandomizeRegisterInitPass | ( | ) |
Definition at line 41 of file RandomizeRegisterInit.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createRegisterOptimizerPass | ( | ) |
Definition at line 161 of file RegisterOptimizer.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createRemoveUnusedPortsPass | ( | bool | ignoreDontTouch = false | ) |
Definition at line 209 of file RemoveUnusedPorts.cpp.
Referenced by circt::firrtl::FIRRTLReducePatternDialectInterface::populateReducePatterns().
std::unique_ptr< mlir::Pass > circt::firrtl::createResolvePathsPass | ( | ) |
Definition at line 260 of file ResolvePaths.cpp.
Referenced by circt::firtool::populatePreprocessTransforms().
std::unique_ptr<mlir::Pass> circt::firrtl::createResolveTracesPass | ( | mlir::StringRef | outputAnnotationFilename = "" | ) |
Referenced by circt::firtool::populateLowFIRRTLToHW().
std::unique_ptr< mlir::Pass > circt::firrtl::createSFCCompatPass | ( | ) |
Definition at line 165 of file SFCCompat.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< Pass > circt::firrtl::createSpecializeLayersPass | ( | ) |
Definition at line 778 of file SpecializeLayers.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< Pass > circt::firrtl::createSpecializeOptionPass | ( | bool | selectDefaultInstanceChoice = false | ) |
Definition at line 111 of file SpecializeOption.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createVBToBVPass | ( | ) |
Definition at line 993 of file VBToBV.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::firrtl::createVectorizationPass | ( | ) |
Definition at line 102 of file Vectorization.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
void circt::firrtl::emitConnect | ( | ImplicitLocOpBuilder & | builder, |
Value | lhs, | ||
Value | rhs | ||
) |
Emit a connect between two values.
Definition at line 34 of file FIRRTLUtils.cpp.
References areTypesConstCastable(), emitConnect(), circt::calyx::direction::get(), circt::firrtl::IntType::getConstType(), circt::firrtl::FIRRTLBaseType::isConst(), circt::firrtl::IntType::isSigned(), and numElements.
void circt::firrtl::emitConnect | ( | OpBuilder & | builder, |
Location | loc, | ||
Value | lhs, | ||
Value | rhs | ||
) |
Emit a connect between two values.
Definition at line 25 of file FIRRTLUtils.cpp.
Referenced by applyGCTDataTaps(), connectLeafsTo(), createZeroValue(), emitConnect(), fixupConnect(), circt::firrtl::IntrinsicLowerings::lower(), lowerInternalPathAnno(), lowerModuleBody(), and lowerModuleSignature().
mlir::LogicalResult circt::firrtl::exportFIRFile | ( | mlir::ModuleOp | module, |
llvm::raw_ostream & | os, | ||
std::optional< size_t > | targetLineLength, | ||
FIRVersion | version | ||
) |
Definition at line 1578 of file FIREmitter.cpp.
Referenced by mlirExportFIRRTL(), and registerToFIRFileTranslation().
LogicalResult circt::firrtl::extractDUT | ( | FModuleLike | mod, |
FModuleLike & | dut | ||
) |
Utility that searches for a MarkDUTAnnotation on a specific module, mod
, and tries to update a design-under-test (DUT), dut
, with this module if the module is the DUT.
This function returns success if either no DUT was found or if the DUT was found and a previous DUT was not set (if dut
is null). This returns failure if a DUT was found and a previous DUT was set. This function generates an error message in the failure case.
Definition at line 567 of file FIRRTLAnnotations.cpp.
References dutAnnoClass.
Flow circt::firrtl::foldFlow | ( | Value | val, |
Flow | accumulatedFlow = Flow::Source |
||
) |
Compute the flow for a Value, val
, as determined by the FIRRTL specification.
This recursively walks backwards from val
to the declaration. The resulting flow is a combination of the declaration flow (output ports and instance inputs are sinks, registers and wires are duplex, anything else is a source) and the number of intermediary flips. An even number of flips will result in the same flow as the declaration. An odd number of flips will result in reversed flow being returned. The reverse of source is sink. The reverse of sink is source. The reverse of duplex is duplex. The accumulatedFlow
parameter sets the initial flow. A user should normally not have to change this from its default of Flow::Source
.
Definition at line 212 of file FIRRTLOps.cpp.
References Duplex, In, None, Out, Sink, Source, and swapFlow().
Referenced by checkConnectFlow(), circt::firrtl::FieldSource::FieldSource(), firrtlValueFoldFlow(), circt::firrtl::FieldSource::visitInst(), circt::firrtl::FieldSource::visitInstChoice(), circt::firrtl::FieldSource::visitMem(), circt::firrtl::FieldSource::visitOp(), circt::firrtl::FieldSource::visitOpenSubfield(), circt::firrtl::FieldSource::visitOpenSubindex(), circt::firrtl::FieldSource::visitSubaccess(), circt::firrtl::FieldSource::visitSubfield(), and circt::firrtl::FieldSource::visitSubindex().
|
inline |
Return the name of the attribute used for annotations on FIRRTL ops.
Definition at line 37 of file FIRRTLAnnotations.h.
Referenced by addAnnotation(), circt::firrtl::AnnotationSet::applyToOperation(), getAnnotationsFrom(), and getAnnotationsIfPresent().
|
inline |
Definition at line 42 of file FIRRTLAnnotations.h.
References getAnnotationAttrName().
Referenced by getAnnotationsFrom(), circt::firrtl::AnnotationSet::hasAnnotation(), and circt::firrtl::AnnotationSet::removeAnnotations().
|
inline |
Get base type if isa<> the requested type, else null.
Definition at line 232 of file FIRRTLUtils.h.
References getBaseType().
|
inline |
If it is a base type, return it as is.
If reftype, return wrapped base type. Otherwise, return null.
Definition at line 222 of file FIRRTLUtils.h.
Referenced by applyGCTDataTaps(), getBaseOfType(), isUselessVec(), DiscoverLoops::recordDataflow(), ResolveTracesPass::updatePortTarget(), ResolveTracesPass::updateTarget(), and walkGroundTypes().
std::optional< int64_t > circt::firrtl::getBitWidth | ( | FIRRTLBaseType | type, |
bool | ignoreFlip = false |
||
) |
Definition at line 2682 of file FIRRTLTypes.cpp.
References circt::firrtl::WidthQualifiedTypeTrait< ConcreteType >::getWidth(), and circt::esi::detail::getWidth().
Referenced by canonicalizeOrOfConcatsWithCstOperands(), createRandomizationAttributes(), firrtlTypeGetBitWidth(), LowerXMRPass::handleRefResolve(), hasZeroBitWidth(), circt::seq::isClockOrI1Type(), and SFCCompatPass::runOnOperation().
DeclKind circt::firrtl::getDeclarationKind | ( | Value | val | ) |
Definition at line 289 of file FIRRTLOps.cpp.
References Instance, Other, and Port.
Referenced by checkConnectFlow().
FieldRef circt::firrtl::getDeltaRef | ( | Value | value, |
bool | lookThroughCasts = false |
||
) |
Get the delta indexing from a value, as a FieldRef.
Definition at line 504 of file FIRRTLUtils.cpp.
Referenced by circt::firrtl::FieldRefCache::getFieldRefFromValue(), and getFieldRefFromValue().
Value circt::firrtl::getDriverFromConnect | ( | Value | val | ) |
Return the module-scoped driver of a value only looking through one connect.
Return the value that drives another FIRRTL value within module scope.
Only look backwards through one connection. This is intended to be used in situations where you only need to look at the most recent connect, e.g., to know if a wire has been driven to a constant. Return null if no driver via a connect was found.
Definition at line 214 of file FIRRTLUtils.cpp.
References Python.support::connect().
std::pair< std::string, bool > circt::firrtl::getFieldName | ( | const FieldRef & | fieldRef, |
bool | nameSafe = false |
||
) |
Get a string identifier representing the FieldRef.
Return this string and a boolean indicating if a valid "root" for the identifier was found. If nameSafe is true, this will generate a string that is better suited for naming something in the IR. E.g., if the fieldRef is a subfield of a subindex, without name safe the output would be:
foo[42].bar
With nameSafe, this would be:
foo_42_bar
Definition at line 600 of file FIRRTLUtils.cpp.
References getDeclName(), circt::FieldRef::getFieldID(), and circt::FieldRef::getValue().
Referenced by Equivalence::check(), checkConnectFlow(), DiscoverLoops::getName(), LowerLayersPass::runOnModuleBody(), and LowerXMRPass::runOnOperation().
FieldRef circt::firrtl::getFieldRefForTarget | ( | const hw::InnerSymTarget & | ist | ) |
Get FieldRef pointing to the specified inner symbol target, which must be valid.
Returns null FieldRef if target points to something with no value, such as a port of an external module.
Definition at line 778 of file FIRRTLUtils.cpp.
References assert(), circt::hw::InnerSymTarget::getField(), circt::hw::InnerSymTarget::getOp(), circt::hw::InnerSymTarget::getPort(), and circt::hw::InnerSymTarget::isPort().
Referenced by LowerLayersPass::runOnModuleBody().
FieldRef circt::firrtl::getFieldRefFromValue | ( | Value | value, |
bool | lookThroughCasts = false |
||
) |
Get the FieldRef from a value.
This will travel backwards to through the IR, following Subfield and Subindex to find the op which declares the location. Optionally look through recognized cast operations, which likely will result in source having slightly different type.
Definition at line 530 of file FIRRTLUtils.cpp.
References getDeltaRef().
Referenced by Equivalence::check(), checkConnectFlow(), getAmbientLayersFor(), LowerXMRPass::runOnOperation(), circt::firrtl::FieldRefCache::verifyImpl(), and walkDrivers().
hw::InnerRefAttr circt::firrtl::getInnerRefTo | ( | const hw::InnerSymTarget & | target, |
GetNamespaceCallback | getNamespace | ||
) |
Obtain an inner reference to the target (operation or port), adding an inner symbol as necessary.
Obtain an inner reference to an operation, possibly adding an inner_sym
to that operation.
Definition at line 861 of file FIRRTLUtils.cpp.
References assert(), circt::calyx::direction::get(), circt::hw::InnerSymTarget::getOp(), getOrAddInnerSym(), and circt::hw::InnerSymTarget::isPort().
Referenced by getInnerRefTo(), LowerXMRPass::getInnerRefTo(), circt::firrtl::OpAnnoTarget::getNLAReference(), circt::firrtl::PortAnnoTarget::getNLAReference(), LowerXMRPass::handleInstanceOp(), LowerXMRPass::runOnOperation(), and ResolveTracesPass::runOnOperation().
|
inlinestatic |
Obtain an inner reference to a port, possibly adding an inner symbol.
Definition at line 203 of file FIRRTLUtils.h.
References getInnerRefTo().
|
inlinestatic |
Obtain an inner reference to a port's field, possibly adding an inner symbol.
Definition at line 211 of file FIRRTLUtils.h.
References getInnerRefTo().
|
inlinestatic |
Obtain an inner reference to an operation, possibly adding an inner symbol.
Definition at line 173 of file FIRRTLUtils.h.
References getInnerRefTo().
|
inlinestatic |
Obtain an inner reference to an operation's field, possibly adding an inner symbol.
Definition at line 180 of file FIRRTLUtils.h.
References getInnerRefTo().
|
inline |
Return the StringAttr for the inner_sym name, if it exists.
Definition at line 108 of file FIRRTLOps.h.
References circt::hw::InnerSymbolTable::getInnerSymbolAttrName().
Referenced by addHierarchy(), findInstanceInNLA(), circt::firrtl::NLATable::getInstanceNLAs(), and Deduper::recordSymRenames().
IntegerAttr circt::firrtl::getIntAttr | ( | Type | type, |
const APInt & | value | ||
) |
Utiility for generating a constant attribute.
Definition at line 168 of file FIRRTLUtils.cpp.
References assert(), and circt::calyx::direction::get().
Referenced by constFoldFIRRTLBinaryOp(), foldMux(), getIntOnesAttr(), and getIntZerosAttr().
IntegerAttr circt::firrtl::getIntOnesAttr | ( | Type | type | ) |
Utility for generating a constant all ones attribute.
Return an IntegerAttr filled with ones for the specified FIRRTL integer type.
This handles both the known width and unknown width case.
Definition at line 189 of file FIRRTLUtils.cpp.
References getIntAttr().
IntegerAttr circt::firrtl::getIntZerosAttr | ( | Type | type | ) |
Utility for generating a constant zero attribute.
Return an IntegerAttr filled with zeros for the specified FIRRTL integer type.
This handles both the known width and unknown width case.
Definition at line 182 of file FIRRTLUtils.cpp.
References getIntAttr().
Referenced by LowerXMRPass::handleRefResolve(), and SFCCompatPass::runOnOperation().
Value circt::firrtl::getModuleScopedDriver | ( | Value | val, |
bool | lookThroughWires, | ||
bool | lookThroughNodes, | ||
bool | lookThroughCasts | ||
) |
Return the value that drives another FIRRTL value within module scope.
This is parameterized by looking through or not through certain constructs. This assumes a single driver and should only be run after ExpandWhens
.
Definition at line 225 of file FIRRTLUtils.cpp.
References Python.support::connect(), In, lookThroughWires(), and Out.
Referenced by isModuleScopedDrivenBy().
size_t circt::firrtl::getNumPorts | ( | Operation * | op | ) |
Return the number of ports in a module-like thing (modules, memories, etc)
Definition at line 301 of file FIRRTLOps.cpp.
Referenced by addAnnotation(), addPortsToModule(), fixupAllModules(), getPortListImpl(), Deduper::mergeAnnotations(), Deduper::record(), and resolveEntities().
StringAttr circt::firrtl::getOrAddInnerSym | ( | const hw::InnerSymTarget & | target, |
GetNamespaceCallback | getNamespace | ||
) |
Returns an inner symbol identifier for the specified target (op or port), adding one if necessary.
Definition at line 844 of file FIRRTLUtils.cpp.
References assert(), circt::hw::InnerSymTarget::getOp(), getOrAddInnerSym(), and circt::hw::InnerSymTarget::isPort().
StringAttr circt::firrtl::getOrAddInnerSym | ( | const hw::InnerSymTarget & | target, |
llvm::function_ref< hw::InnerSymbolNamespace &()> | getNamespace | ||
) |
Returns an inner symbol identifier for the specified target (op or port), adding one if necessary.
Definition at line 816 of file FIRRTLUtils.cpp.
References assert(), circt::hw::InnerSymTarget::getField(), circt::hw::InnerSymTarget::getOp(), getOrAddInnerSym(), circt::hw::InnerSymTarget::getPort(), and circt::hw::InnerSymTarget::isPort().
|
inlinestatic |
Returns an inner symbol identifier for the specified port, adding one if necessary.
Definition at line 187 of file FIRRTLUtils.h.
References getOrAddInnerSym().
|
inlinestatic |
Returns an inner symbol identifier for the specified port's field, adding one if necessary.
Definition at line 194 of file FIRRTLUtils.h.
References getOrAddInnerSym().
std::pair< hw::InnerSymAttr, StringAttr > circt::firrtl::getOrAddInnerSym | ( | MLIRContext * | context, |
hw::InnerSymAttr | attr, | ||
uint64_t | fieldID, | ||
llvm::function_ref< hw::InnerSymbolNamespace &()> | getNamespace | ||
) |
Ensure that the the InnerSymAttr has a symbol on the field specified.
Returns the updated InnerSymAttr as well as the name of the symbol attached to the specified field.
Definition at line 794 of file FIRRTLUtils.cpp.
References circt::calyx::direction::get().
Referenced by getInnerRefTo(), getOrAddInnerSym(), and Deduper::recordSymRenames().
|
inlinestatic |
Returns an inner symbol identifier for the specified operation, adding one if necessary.
Definition at line 160 of file FIRRTLUtils.h.
References getOrAddInnerSym().
|
inlinestatic |
Returns an inner symbol identifier for the specified operation's field adding one if necessary.
Definition at line 166 of file FIRRTLUtils.h.
References getOrAddInnerSym().
mlir::Type circt::firrtl::getPassiveType | ( | mlir::Type | anyBaseFIRRTLType | ) |
|
inline |
Return the name of the attribute used for port annotations on FIRRTL ops.
Definition at line 40 of file FIRRTLAnnotations.h.
Referenced by addAnnotation(), applyToPort(), and forPort().
PropAssignOp circt::firrtl::getPropertyAssignment | ( | FIRRTLPropertyValue | value | ) |
Return the single assignment to a Property value.
It is assumed that the single assigment invariant is enforced elsewhere.
Definition at line 197 of file FIRRTLUtils.cpp.
Referenced by WireOpConversion::matchAndRewrite(), and updateInstanceInClass().
MatchingConnectOp circt::firrtl::getSingleConnectUserOf | ( | Value | value | ) |
Scan all the uses of the specified value, checking to see if there is exactly one connect that has the value as its destination.
This returns the operation if found and if all the other users are "reads" from the value. Returns null if there are no connects, or multiple connects to the value, or if the value is involved in an AttachOp
.
Note that this will simply return the connect, which is located anywhere after the definition of the value. Users of this function are likely interested in the source side of the returned connect, the definition of which does likely not dominate the original value.
This returns the operation if found and if all the other users are "reads" from the value. Returns null if there are no connects, or multiple connects to the value, or if the value is involved in an AttachOp
, or if the connect isn't matching.
Note that this will simply return the connect, which is located anywhere after the definition of the value. Users of this function are likely interested in the source side of the returned connect, the definition of which does likely not dominate the original value.
Definition at line 1730 of file FIRRTLFolds.cpp.
References Python.support::connect().
Referenced by canonicalizeSingleSetConnect(), foldHiddenReset(), and getPortFieldValue().
hw::InnerSymTarget circt::firrtl::getTargetFor | ( | FieldRef | ref | ) |
Return the inner sym target for the specified value and fieldID.
If root is a blockargument, this must be FModuleLike.
Definition at line 766 of file FIRRTLUtils.cpp.
References circt::FieldRef::getFieldID(), and circt::FieldRef::getValue().
Value circt::firrtl::getValueByFieldID | ( | ImplicitLocOpBuilder | builder, |
Value | value, | ||
unsigned | fieldID | ||
) |
This gets the value targeted by a field id.
If the field id is targeting the value itself, it returns it unchanged. If it is targeting a single field in a aggregate value, such as a bundle or vector, this will create the necessary subaccesses to get the value.
Definition at line 681 of file FIRRTLUtils.cpp.
References circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case().
Referenced by applyGCTDataTaps(), applyWiring(), lowerModuleBody(), and lowerModuleSignature().
Value circt::firrtl::getValueSource | ( | Value | val, |
bool | lookThroughWires, | ||
bool | lookThroughNodes, | ||
bool | lookThroughCasts | ||
) |
Return the value that drives another FIRRTL value within module scope.
This is parameterized by looking through or not through certain constructs.
bool circt::firrtl::hasDontTouch | ( | Operation * | op | ) |
Check whether an operation has a DontTouch
annotation, or a symbol that should prevent certain types of canonicalizations.
Definition at line 309 of file FIRRTLOps.cpp.
References circt::hw::InnerSymbolTable::getInnerSymbolAttrName(), and circt::firrtl::AnnotationSet::hasDontTouch().
bool circt::firrtl::hasDontTouch | ( | Value | value | ) |
Check whether a block argument ("port") or the operation defining a value has a DontTouch
annotation, or a symbol that should prevent certain types of canonicalizations.
Definition at line 317 of file FIRRTLOps.cpp.
References circt::firrtl::AnnotationSet::forPort(), and circt::firrtl::AnnotationSet::hasDontTouch().
Referenced by canErase(), canonicalizeSingleSetConnect(), isDeletableDeclaration(), and isDeletableWireOrRegOrNode().
bool circt::firrtl::hasDroppableName | ( | Operation * | op | ) |
Return true if the name is droppable.
Note that this is different from isUselessName
because non-useless names may be also droppable.
Definition at line 135 of file FIRRTLFolds.cpp.
Referenced by canonicalizeSingleSetConnect(), and isDeletableWireOrRegOrNode().
|
inline |
Definition at line 368 of file FIRRTLTypes.h.
References circt::firrtl::ClassElement::direction, esi::utils::hash_combine(), circt::firrtl::ClassElement::name, and circt::firrtl::ClassElement::type.
bool circt::firrtl::hasZeroBitWidth | ( | FIRRTLType | type | ) |
Return true if the type has zero bit width.
Definition at line 851 of file FIRRTLTypes.cpp.
References circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case(), and getBitWidth().
Referenced by isPreservableAggregateType().
bool circt::firrtl::importAnnotationsFromJSONRaw | ( | llvm::json::Value & | value, |
SmallVectorImpl< Attribute > & | annotations, | ||
llvm::json::Path | path, | ||
MLIRContext * | context | ||
) |
Deserialize a JSON value into FIRRTL Annotations.
Annotations are represented as a Target-keyed arrays of attributes. The input JSON value is checked, at runtime, to be an array of objects. Returns true if successful, false if unsuccessful.
Referenced by firrtlImportAnnotationsFromJSONRaw().
mlir::OwningOpRef<mlir::ModuleOp> circt::firrtl::importFIRFile | ( | llvm::SourceMgr & | sourceMgr, |
mlir::MLIRContext * | context, | ||
mlir::TimingScope & | ts, | ||
FIRParserOptions | options = {} |
||
) |
Referenced by registerFromFIRFileTranslation().
bool circt::firrtl::isConst | ( | Type | type | ) |
Returns true if this is a 'const' type whose value is guaranteed to be unchanging at circuit execution time.
Definition at line 836 of file FIRRTLTypes.cpp.
Referenced by customTypePrinter(), firrtlTypeGetConstType(), and MLIR_DEFINE_CAPI_DIALECT_REGISTRATION().
bool circt::firrtl::isConstant | ( | Operation * | op | ) |
Return true if the specified operation has a constant value.
This trivially checks for firrtl.constant
and friends, but also looks through subaccesses and correctly handles wires driven with only constant values.
Definition at line 4588 of file FIRRTLOps.cpp.
Referenced by circt::firrtl::InstanceInfo::LatticeValue::getConstant(), isConstant(), isConstantLike(), and circt::firrtl::InstanceInfo::LatticeValue::mergeIn().
bool circt::firrtl::isConstant | ( | Value | value | ) |
Return true if the specified value is a constant.
This trivially checks for firrtl.constant
and friends, but also looks through subaccesses and correctly handles wires driven with only constant values.
Definition at line 4621 of file FIRRTLOps.cpp.
References isConstant().
bool circt::firrtl::isDuplexValue | ( | Value | val | ) |
Returns true if the value results from an expression with duplex flow.
Duplex values have special treatment in bundle connect operations, and their flip orientation is not used to determine the direction of each pairwise connect.
Definition at line 102 of file FIRRTLOps.cpp.
bool circt::firrtl::isExpression | ( | Operation * | op | ) |
Return true if the specified operation is a firrtl expression.
Definition at line 3959 of file FIRRTLOps.cpp.
References circt::firrtl::ExprVisitor< ConcreteType, ResultType, ExtraArgs >::dispatchExprVisitor().
Referenced by isEmittedInline(), and circt::ExportVerilog::isVerilogExpression().
|
static |
Return true if a value is module-scoped driven by a value of a specific type.
Definition at line 59 of file FIRRTLUtils.h.
References getModuleScopedDriver(), and lookThroughWires().
bool circt::firrtl::isRecognizedPrintfEncodedVerif | ( | PrintFOp | printOp | ) |
Classifier for legacy verif intent captured in printf + when's.
Chisel has a tendency to emit complex assert/assume/cover statements encoded as print operations with special formatting and metadata embedded in the message literal.
Returns true if the printf encodes verif intent, false otherwise.
One variant looks like:
when invCond: printf(clock, UInt<1>(1), "...[verif-library-assert]...") stop(clock, UInt<1>(1), 1)
Depending on the nature the verification operation, the stop
may be optional. The Scala implementation simply removes all stop
s that have the same condition as the printf.
This is no longer supported. This method retains enough support to accurately detect when this is used and returns whether this is a recognized (legacy) printf+when-encoded verif.
Definition at line 41 of file FIRParserAsserts.cpp.
bool circt::firrtl::isTypeInOut | ( | mlir::Type | type | ) |
Returns true if the given type has some flipped (aka unaligned) dataflow.
This will be true if the port contains either bi-directional signals or analog types. Non-HW types (e.g., ref types) are never considered InOut.
Referenced by circt::firrtl::PortInfo::isInOut(), and circt::firrtl::ClassElement::isInOut().
bool circt::firrtl::isTypeLarger | ( | FIRRTLBaseType | dstType, |
FIRRTLBaseType | srcType | ||
) |
Returns true if the destination is at least as wide as a source.
Returns true if the destination is at least as wide as an equivalent source.
The source and destination types must be equivalent non-analog types. The types are recursively connected to ensure that the destination is larger than the source: ground types are compared on width, vector types are checked recursively based on their elements and bundles are compared field-by-field. Types with unresolved widths are assumed to fit into or hold their counterparts.
Definition at line 1153 of file FIRRTLTypes.cpp.
References circt::firrtl::FIRRTLBaseType::getBitWidthOrSentinel(), and circt::firrtl::FIRRTLBaseType::getPassiveType().
Referenced by circt::firrtl::IntrinsicLowerings::lower().
|
constexpr |
|
constexpr |
Type circt::firrtl::lowerType | ( | Type | type, |
std::optional< Location > | loc = {} , |
||
llvm::function_ref< hw::TypeAliasType(Type, BaseTypeAliasType, Location)> | getTypeDeclFn = {} |
||
) |
Given a type, return the corresponding lowered type for the HW dialect.
Non-FIRRTL types are simply passed through. This returns a null type if it cannot be lowered. The optional function is required to specify how to lower AliasTypes.
Non-FIRRTL types are simply passed through. This returns a null type if it cannot be lowered.
Definition at line 996 of file FIRRTLUtils.cpp.
References circt::calyx::direction::get().
Referenced by convertToUnpackedArray(), getLowered(), lowerDPIArgumentType(), and tryEliminatingAttachesToAnalogValue().
void circt::firrtl::makeCommonPrefix | ( | SmallString< 64 > & | a, |
StringRef | b | ||
) |
Truncate a
to the common prefix of a
and b
.
Definition at line 1065 of file FIRRTLUtils.cpp.
Referenced by makeCommonPrefix().
|
inline |
Return a FIRRTLType with its base type component mutated by the given function.
(i.e., ref<T> -> ref<f(T)> and T -> f(T)).
Definition at line 238 of file FIRRTLUtils.h.
References circt::calyx::direction::get().
Referenced by mapLoweredType().
|
inline |
Return a FIRRTLType with its base type component mutated by the given function.
Return null when the function returns null. (i.e., ref<T> -> ref<f(T)> if f(T) != null else null, and T -> f(T)).
Definition at line 252 of file FIRRTLUtils.h.
References circt::calyx::direction::get().
std::pair<bool, std::optional<mlir::LocationAttr> > circt::firrtl::maybeStringToLocation | ( | llvm::StringRef | spelling, |
bool | skipParsing, | ||
mlir::StringAttr & | locatorFilenameCache, | ||
FileLineColLoc & | fileLineColLocCache, | ||
MLIRContext * | context | ||
) |
std::pair< bool, std::optional< mlir::LocationAttr > > circt::firrtl::maybeStringToLocation | ( | StringRef | spelling, |
bool | skipParsing, | ||
StringAttr & | locatorFilenameCache, | ||
FileLineColLoc & | fileLineColLocCache, | ||
MLIRContext * | context | ||
) |
Parse a string that may encode a FIRRTL location into a LocationAttr.
Return an FileLineColLoc for the specified location, but use a bit of caching to reduce thrasing the MLIRContext.
Definition at line 873 of file FIRRTLUtils.cpp.
References circt::calyx::direction::get().
|
constexpr |
The current minimum version of FIRRTL that the parser supports.
|
constexpr |
The next version of FIRRTL that is not yet released.
Features use this version if they have been landed on the main branch of chipsalliance/firrtl-spec
, but have not been part of a release yet. Once a new version of the spec is released, all uses of nextFIRVersion
in the parser are replaced with the concrete version {x, y, z}
, and this declaration here is bumped to the next probable version number.
llvm::raw_ostream & circt::firrtl::operator<< | ( | llvm::raw_ostream & | os, |
const Direction & | dir | ||
) |
Prints the Direction to the stream as either "in" or "out".
Definition at line 62 of file FIRRTLAttributes.cpp.
References circt::firrtl::direction::toString().
|
inline |
Definition at line 199 of file FIRRTLInstanceInfo.h.
References circt::firrtl::InstanceInfo::LatticeValue::getConstant(), circt::firrtl::InstanceInfo::LatticeValue::isConstant(), and circt::firrtl::InstanceInfo::LatticeValue::isUnknown().
|
static |
Definition at line 77 of file FIRRTLAnnotationHelper.h.
References circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case(), circt::firrtl::AnnoPathValue::fieldIdx, circt::firrtl::AnnoTarget::getModule(), circt::hw::instance_like_impl::getName(), circt::firrtl::AnnoTarget::getType(), circt::firrtl::AnnoPathValue::instances, circt::firrtl::AnnoPathValue::isLocal(), circt::firrtl::AnnoPathValue::isOpOfType(), and circt::firrtl::AnnoPathValue::ref.
|
static |
Definition at line 129 of file FIRRTLAnnotationHelper.h.
|
static |
Definition at line 117 of file FIRRTLAnnotationHelper.h.
References circt::firrtl::AnnoTarget::getOp().
|
static |
Definition at line 123 of file FIRRTLAnnotationHelper.h.
References circt::firrtl::AnnoTarget::getModule(), and circt::firrtl::PortAnnoTarget::getPortNo().
T& circt::firrtl::operator<< | ( | T & | os, |
FIRVersion | version | ||
) |
Definition at line 142 of file FIRParser.h.
References circt::firrtl::FIRVersion::major, circt::firrtl::FIRVersion::minor, and circt::firrtl::FIRVersion::patch.
|
inline |
Allow 'or'ing MemDirAttr.
This allows combining Read and Write into ReadWrite.
Definition at line 96 of file FIRRTLOps.h.
|
inline |
Definition at line 102 of file FIRRTLOps.h.
ParseResult circt::firrtl::parseNestedBaseType | ( | FIRRTLBaseType & | result, |
AsmParser & | parser | ||
) |
Definition at line 549 of file FIRRTLTypes.cpp.
References parseFIRRTLBaseType().
ParseResult circt::firrtl::parseNestedPropertyType | ( | PropertyType & | result, |
AsmParser & | parser | ||
) |
Definition at line 559 of file FIRRTLTypes.cpp.
References parseFIRRTLPropertyType().
ParseResult circt::firrtl::parseNestedType | ( | FIRRTLType & | result, |
AsmParser & | parser | ||
) |
Parse a FIRRTLType
.
Note that only a subset of types defined in the FIRRTL dialect inherit from FIRRTLType
. Use parseType
to parse any of the defined types.
Definition at line 539 of file FIRRTLTypes.cpp.
References parseFIRRTLType().
void circt::firrtl::printNestedType | ( | Type | type, |
AsmPrinter & | os | ||
) |
Print a type defined by this dialect.
Definition at line 148 of file FIRRTLTypes.cpp.
LogicalResult circt::firrtl::registerAnnotationRecord | ( | StringRef | annoClass, |
AnnoRecord | annoRecord, | ||
const std::function< void(llvm::Twine)> & | errorHandler = {} |
||
) |
Register external annotation records.
Definition at line 692 of file LowerAnnotations.cpp.
References annotationRecords.
void circt::firrtl::registerFromFIRFileTranslation | ( | ) |
Definition at line 5888 of file FIRParser.cpp.
References importFIRFile().
Referenced by circt::registerAllTranslations().
void circt::firrtl::registerReducePatternDialectInterface | ( | mlir::DialectRegistry & | registry | ) |
Register the FIRRTL Reduction pattern dialect interface to the given registry.
Definition at line 1145 of file FIRRTLReductions.cpp.
void circt::firrtl::registerToFIRFileTranslation | ( | ) |
Definition at line 1590 of file FIREmitter.cpp.
References exportFIRFile(), and exportFIRVersion.
Referenced by circt::registerAllTranslations().
std::optional< AnnoPathValue > circt::firrtl::resolveEntities | ( | TokenAnnoTarget | path, |
CircuitOp | circuit, | ||
SymbolTable & | symTbl, | ||
CircuitTargetCache & | cache | ||
) |
Convert a parsed target string to a resolved target structure.
This resolves all names and aggregates from a parsed target.
Definition at line 167 of file FIRRTLAnnotationHelper.cpp.
References assert(), circt::firrtl::TokenAnnoTarget::circuit, circt::firrtl::TokenAnnoTarget::component, findFieldID(), getNumPorts(), circt::firrtl::AnnoTarget::getOp(), circt::firrtl::AnnoTarget::getType(), circt::firrtl::TokenAnnoTarget::instances, circt::firrtl::CircuitTargetCache::lookup(), circt::firrtl::TokenAnnoTarget::module, circt::firrtl::TokenAnnoTarget::name, and circt::firrtl::TokenAnnoTarget::str().
Referenced by resolvePath(), and stdResolveImpl().
std::optional< AnnoPathValue > circt::firrtl::resolvePath | ( | StringRef | rawPath, |
CircuitOp | circuit, | ||
SymbolTable & | symTbl, | ||
CircuitTargetCache & | cache | ||
) |
Resolve a string path to a named item inside a circuit.
Definition at line 331 of file FIRRTLAnnotationHelper.cpp.
References canonicalizeTarget(), resolveEntities(), and tokenizePath().
Referenced by applyGCTDataTaps(), and applyGCTMemTaps().
std::optional< AnnoPathValue > circt::firrtl::stdResolve | ( | DictionaryAttr | anno, |
ApplyState & | state | ||
) |
===-------------------------------------------------------------------—===// Standard Utility Resolvers ===-------------------------------------------------------------------—===//
(SFC) FIRRTL SingleTargetAnnotation resolver.
(SFC) FIRRTL SingleTargetAnnotation resolver. Uses the 'target' field of the annotation with standard parsing to resolve the path. This requires 'target' to exist and be normalized (per docs/FIRRTLAnnotations.md).
Uses the 'target' field of the annotation with standard parsing to resolve the path. This requires 'target' to exist and be normalized (per docs/FIRRTLAnnotations.md).
Definition at line 170 of file LowerAnnotations.cpp.
References circt::firrtl::ApplyState::circuit, and stdResolveImpl().
Get a flow's reverse.
Definition at line 182 of file FIRRTLOps.cpp.
References Duplex, None, Sink, and Source.
Referenced by foldFlow().
std::optional< TokenAnnoTarget > circt::firrtl::tokenizePath | ( | StringRef | origTarget | ) |
Parse a FIRRTL annotation path into its constituent parts.
split a target string into it constituent parts.
This is the primary parser for targets.
Definition at line 291 of file FIRRTLAnnotationHelper.cpp.
References circt::firrtl::TokenAnnoTarget::circuit, circt::firrtl::TokenAnnoTarget::component, circt::firrtl::TokenAnnoTarget::instances, circt::firrtl::TokenAnnoTarget::module, and circt::firrtl::TokenAnnoTarget::name.
Referenced by applyGCTDataTaps(), applyGCTMemTaps(), resolvePath(), and stdResolveImpl().
|
static |
Wrapper for llvm::parallelTransformReduce that performs the transform_reduce serially when MLIR multi-threading is disabled.
Does not add a ParallelDiagnosticHandler like mlir::parallelFor.
Definition at line 295 of file FIRRTLUtils.h.
Referenced by LowerLayersPass::runOnOperation(), ResolveTracesPass::runOnOperation(), and transformReduce().
|
static |
A circt::firrtl::tryGetAs | ( | DictionaryAttr & | dict, |
const Attribute & | root, | ||
StringRef | key, | ||
Location | loc, | ||
Twine | className, | ||
Twine | path = Twine() |
||
) |
Implements the same behavior as DictionaryAttr::getAs<A> to return the value of a specific type associated with a key in a dictionary.
However, this is specialized to print a useful error message, specific to custom annotation process, on failure.
Definition at line 389 of file FIRRTLAnnotationHelper.h.
std::optional< AnnoPathValue > circt::firrtl::tryResolve | ( | DictionaryAttr | anno, |
ApplyState & | state | ||
) |
Resolves with target, if it exists. If not, resolves to the circuit.
Definition at line 187 of file LowerAnnotations.cpp.
References circt::firrtl::ApplyState::circuit, and stdResolveImpl().
BaseTy circt::firrtl::type_cast | ( | Type | type | ) |
Definition at line 478 of file FIRRTLTypes.h.
References assert().
BaseTy circt::firrtl::type_dyn_cast | ( | Type | type | ) |
Definition at line 497 of file FIRRTLTypes.h.
BaseTy circt::firrtl::type_dyn_cast_or_null | ( | Type | type | ) |
Definition at line 505 of file FIRRTLTypes.h.
bool circt::firrtl::type_isa | ( | Type | type | ) |
Definition at line 454 of file FIRRTLTypes.h.
Referenced by type_isa_and_nonnull().
bool circt::firrtl::type_isa_and_nonnull | ( | Type | type | ) |
Definition at line 471 of file FIRRTLTypes.h.
References type_isa().
LogicalResult circt::firrtl::verifyModuleLikeOpInterface | ( | FModuleLike | module | ) |
Verification hook for verifying module like operations.
Definition at line 51 of file FIRRTLOpInterfaces.cpp.
References verifyNoInputProbes().
bool circt::firrtl::walkDrivers | ( | FIRRTLBaseValue | value, |
bool | lookThroughWires, | ||
bool | lookThroughNodes, | ||
bool | lookThroughCasts, | ||
WalkDriverCallback | callback | ||
) |
Definition at line 304 of file FIRRTLUtils.cpp.
References assert(), Python.support::connect(), circt::FieldRef::getFieldID(), getFieldRefFromValue(), circt::FieldRef::getValue(), In, lookThroughWires(), and Out.
Referenced by SFCCompatPass::runOnOperation().
void circt::firrtl::walkGroundTypes | ( | FIRRTLType | firrtlType, |
llvm::function_ref< void(uint64_t, FIRRTLBaseType, bool)> | fn | ||
) |
Walk leaf ground types in the firrtlType
and apply the function fn
.
The first argument of fn
is field ID, and the second argument is a leaf ground type, and the third argument indicates if the element was flipped in a bundle.
The first argument of fn
is field ID, and the second argument is a leaf ground type and the third argument is a bool to indicate flip.
Definition at line 720 of file FIRRTLUtils.cpp.
References assert(), circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case(), and getBaseType().
Referenced by DiscoverLoops::constructConnectivityGraph(), and DiscoverLoops::recordDataflow().
|
constexpr |
Definition at line 179 of file AnnotationDetails.h.
|
constexpr |
Definition at line 181 of file AnnotationDetails.h.
|
static |
Definition at line 592 of file LowerAnnotations.cpp.
Referenced by getAnnotationHandler(), and registerAnnotationRecord().
|
constexpr |
Definition at line 197 of file AnnotationDetails.h.
|
constexpr |
Definition at line 101 of file AnnotationDetails.h.
|
constexpr |
Definition at line 99 of file AnnotationDetails.h.
|
constexpr |
Definition at line 61 of file AnnotationDetails.h.
|
constexpr |
Definition at line 53 of file AnnotationDetails.h.
|
constexpr |
Definition at line 55 of file AnnotationDetails.h.
|
constexpr |
Definition at line 59 of file AnnotationDetails.h.
|
constexpr |
Definition at line 57 of file AnnotationDetails.h.
|
constexpr |
Definition at line 97 of file AnnotationDetails.h.
Referenced by applyGCTView(), and circt::firrtl::InstanceInfo::InstanceInfo().
|
constexpr |
Definition at line 31 of file AnnotationDetails.h.
Referenced by applyBodyTypeLoweringAnno(), and applyConventionAnno().
|
constexpr |
Definition at line 165 of file AnnotationDetails.h.
|
constexpr |
Definition at line 105 of file AnnotationDetails.h.
|
constexpr |
Definition at line 103 of file AnnotationDetails.h.
Referenced by applyGCTDataTaps().
|
constexpr |
Definition at line 44 of file AnnotationDetails.h.
|
constexpr |
Definition at line 89 of file AnnotationDetails.h.
|
constexpr |
Definition at line 115 of file AnnotationDetails.h.
|
constexpr |
Definition at line 146 of file AnnotationDetails.h.
|
constexpr |
Definition at line 34 of file AnnotationDetails.h.
Referenced by circt::firrtl::AnnotationSet::addDontTouch(), applyTraceName(), Deduper::copyAnnotations(), circt::firrtl::AnnotationSet::hasDontTouch(), and circt::firrtl::AnnotationSet::removeDontTouch().
|
constexpr |
Definition at line 138 of file AnnotationDetails.h.
Referenced by extractDUT(), and circt::firrtl::InstanceInfo::InstanceInfo().
|
constexpr |
Definition at line 148 of file AnnotationDetails.h.
|
constexpr |
Definition at line 36 of file AnnotationDetails.h.
|
constexpr |
Definition at line 38 of file AnnotationDetails.h.
|
constexpr |
Definition at line 40 of file AnnotationDetails.h.
|
constexpr |
Annotation that marks a module as not belonging to any reset domain.
Definition at line 155 of file AnnotationDetails.h.
Referenced by convertToExcludeFromFullResetAnnotation().
|
constexpr |
Definition at line 167 of file AnnotationDetails.h.
|
constexpr |
The version of FIRRTL that the exporter produces.
This is always the next version, since it contains any new developments.
Definition at line 139 of file FIRParser.h.
Referenced by mlirExportFIRRTL(), and registerToFIRFileTranslation().
|
constexpr |
Definition at line 67 of file AnnotationDetails.h.
|
constexpr |
Definition at line 69 of file AnnotationDetails.h.
|
constexpr |
Definition at line 171 of file AnnotationDetails.h.
Referenced by isAnnoInteresting().
|
constexpr |
Definition at line 173 of file AnnotationDetails.h.
|
constexpr |
Definition at line 71 of file AnnotationDetails.h.
|
constexpr |
Definition at line 132 of file AnnotationDetails.h.
|
constexpr |
Definition at line 175 of file AnnotationDetails.h.
|
constexpr |
Definition at line 46 of file AnnotationDetails.h.
|
constexpr |
Definition at line 42 of file AnnotationDetails.h.
|
constexpr |
Annotation that marks a reset (port or wire) and domain.
Definition at line 158 of file AnnotationDetails.h.
Referenced by convertToFullResetAnnotation().
|
constexpr |
Annotation that marks a reset (port or wire) and domain.
Definition at line 153 of file AnnotationDetails.h.
Referenced by convertToFullResetAnnotation(), and SFCCompatPass::runOnOperation().
|
constexpr |
Definition at line 134 of file AnnotationDetails.h.
|
constexpr |
Annotation that marks a module as not belonging to any reset domain.
Definition at line 161 of file AnnotationDetails.h.
Referenced by convertToExcludeFromFullResetAnnotation().
|
constexpr |
Definition at line 140 of file AnnotationDetails.h.
|
constexpr |
Definition at line 47 of file AnnotationDetails.h.
|
constexpr |
Definition at line 125 of file AnnotationDetails.h.
Referenced by applyGCTDataTaps().
|
constexpr |
Definition at line 127 of file AnnotationDetails.h.
|
constexpr |
Definition at line 129 of file AnnotationDetails.h.
|
constexpr |
Definition at line 117 of file AnnotationDetails.h.
|
constexpr |
Definition at line 185 of file AnnotationDetails.h.
|
constexpr |
Definition at line 187 of file AnnotationDetails.h.
|
constexpr |
Definition at line 109 of file AnnotationDetails.h.
|
constexpr |
Definition at line 107 of file AnnotationDetails.h.
Referenced by applyGCTMemTaps().
|
constexpr |
Definition at line 111 of file AnnotationDetails.h.
|
constexpr |
Definition at line 113 of file AnnotationDetails.h.
|
constexpr |
Definition at line 86 of file AnnotationDetails.h.
|
constexpr |
A marker for parser features that are currently missing from the spec.
Features use this version if they have not been added to the documentation in the chipsalliance/firrtl-spec
repository. This allows us to distinguish features that are released in the next version of the spec and features that are still missing from the spec.
Definition at line 135 of file FIRParser.h.
|
constexpr |
Definition at line 75 of file AnnotationDetails.h.
|
constexpr |
Definition at line 200 of file AnnotationDetails.h.
Referenced by applyModulePrefixAnno().
|
constexpr |
Definition at line 63 of file AnnotationDetails.h.
|
constexpr |
Definition at line 88 of file AnnotationDetails.h.
Referenced by Equivalence::Equivalence().
|
static |
Resolution and application of a "firrtl.annotations.NoTargetAnnotation".
This should be used for any Annotation which does not apply to anything in the FIRRTL Circuit, i.e., an Annotation which has no target. Historically, NoTargetAnnotations were used to control the Scala FIRRTL Compiler (SFC) or its passes, e.g., to set the output directory or to turn on a pass. Examples of these in the SFC are "firrtl.options.TargetDirAnnotation" to set the output directory or "firrtl.stage.RunFIRRTLTransformAnnotation" to cause the SFC to schedule a specified pass. Instead of leaving these floating or attaching them to the top-level MLIR module (which is a purer interpretation of "no target"), we choose to attach them to the Circuit even they do not "apply" to the Circuit. This gives later passes a common place, the Circuit, to search for these control Annotations.
Definition at line 589 of file LowerAnnotations.cpp.
|
constexpr |
Definition at line 77 of file AnnotationDetails.h.
Referenced by applyOutputDirAnno().
|
constexpr |
Definition at line 25 of file AnnotationDetails.h.
|
constexpr |
Definition at line 119 of file AnnotationDetails.h.
Referenced by applyGCTDataTaps().
|
constexpr |
Definition at line 121 of file AnnotationDetails.h.
|
constexpr |
Definition at line 123 of file AnnotationDetails.h.
|
constexpr |
Definition at line 82 of file AnnotationDetails.h.
|
constexpr |
Definition at line 80 of file AnnotationDetails.h.
|
constexpr |
Definition at line 65 of file AnnotationDetails.h.
|
constexpr |
Definition at line 93 of file AnnotationDetails.h.
|
constexpr |
Definition at line 142 of file AnnotationDetails.h.
|
constexpr |
Definition at line 144 of file AnnotationDetails.h.
|
constexpr |
Definition at line 73 of file AnnotationDetails.h.
|
constexpr |
Definition at line 78 of file AnnotationDetails.h.
|
constexpr |
Definition at line 150 of file AnnotationDetails.h.
|
constexpr |
Definition at line 50 of file AnnotationDetails.h.
Referenced by applyTraceName(), and ResolveTracesPass::runOnOperation().
|
constexpr |
Definition at line 48 of file AnnotationDetails.h.
|
constexpr |
Definition at line 32 of file AnnotationDetails.h.
Referenced by applyBodyTypeLoweringAnno().
|
constexpr |
Definition at line 84 of file AnnotationDetails.h.
|
constexpr |
Definition at line 95 of file AnnotationDetails.h.
Referenced by applyGCTView().
|
constexpr |
Definition at line 191 of file AnnotationDetails.h.
Referenced by applyWiring().
|
constexpr |
Definition at line 193 of file AnnotationDetails.h.
Referenced by applyWiring().