CIRCT  19.0.0git
Classes | Namespaces | Functions
FIRRTLAnnotationHelper.h File Reference
#include "circt/Dialect/FIRRTL/CHIRRTLDialect.h"
#include "circt/Dialect/FIRRTL/FIRRTLInstanceGraph.h"
#include "circt/Dialect/FIRRTL/FIRRTLOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/HW/InnerSymbolNamespace.h"
#include "llvm/ADT/TypeSwitch.h"
Include dependency graph for FIRRTLAnnotationHelper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  circt::firrtl::TargetToken
 Stores an index into an aggregate. More...
 
struct  circt::firrtl::TokenAnnoTarget
 The parsed annotation path. More...
 
struct  circt::firrtl::AnnoPathValue
 
struct  circt::firrtl::AnnoTargetCache
 Cache AnnoTargets for a module's named things. More...
 
struct  circt::firrtl::CircuitTargetCache
 Cache AnnoTargets for a circuit's modules, walked as needed. More...
 
struct  circt::firrtl::WiringProblem
 A representation of a deferred Wiring problem consisting of a source that should be connected to a sink. More...
 
struct  circt::firrtl::LegacyWiringProblem
 A representation of a legacy Wiring problem consisting of a signal source that should be connected to one or many sinks. More...
 
struct  circt::firrtl::ModuleModifications
 A store of pending modifications to a FIRRTL module associated with solving one or more WiringProblems. More...
 
struct  circt::firrtl::HierPathCache
 A cache of existing HierPathOps, mostly used to facilitate HierPathOp reuse. More...
 
struct  circt::firrtl::ApplyState
 State threaded through functions for resolving and applying annotations. More...
 
struct  circt::firrtl::AnnoRecord
 ===-------------------------------------------------------------------—===// LowerAnnotations ===-------------------------------------------------------------------—===// More...
 

Namespaces

 circt
 This file defines an intermediate representation for circuits acting as an abstraction for constraints defined over an SMT's solver context.
 
 circt::firrtl
 

Functions

template<typename T >
static T & circt::firrtl::operator<< (T &os, const AnnoPathValue &path)
 
template<typename T >
static T & circt::firrtl::operator<< (T &os, const OpAnnoTarget &target)
 
template<typename T >
static T & circt::firrtl::operator<< (T &os, const PortAnnoTarget &target)
 
template<typename T >
static T & circt::firrtl::operator<< (T &os, const AnnoTarget &target)
 
std::string circt::firrtl::canonicalizeTarget (StringRef target)
 Return an input target string in canonical form. More...
 
std::optional< TokenAnnoTargetcirct::firrtl::tokenizePath (StringRef origTarget)
 Parse a FIRRTL annotation path into its constituent parts. More...
 
std::optional< AnnoPathValuecirct::firrtl::resolveEntities (TokenAnnoTarget path, CircuitOp circuit, SymbolTable &symTbl, CircuitTargetCache &cache)
 Convert a parsed target string to a resolved target structure. More...
 
std::optional< AnnoPathValuecirct::firrtl::resolvePath (StringRef rawPath, CircuitOp circuit, SymbolTable &symTbl, CircuitTargetCache &cache)
 Resolve a string path to a named item inside a circuit. More...
 
LogicalResult circt::firrtl::applyGCTView (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state)
 
LogicalResult circt::firrtl::applyGCTDataTaps (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state)
 
LogicalResult circt::firrtl::applyGCTMemTaps (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state)
 
LogicalResult circt::firrtl::applyOMIR (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state)
 Main entry point to handle scattering of an OMIRAnnotation. More...
 
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). More...
 
LogicalResult circt::firrtl::applyWiring (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state)
 Consume SourceAnnotation and SinkAnnotation, storing into state. More...
 
template<typename 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. More...
 
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. More...
 
LogicalResult circt::firrtl::registerAnnotationRecord (StringRef annoClass, AnnoRecord annoRecord, const std::function< void(llvm::Twine)> &errorHandler={})
 Register external annotation records. More...
 
std::optional< AnnoPathValuecirct::firrtl::stdResolve (DictionaryAttr anno, ApplyState &state)
 ===-------------------------------------------------------------------—===// Standard Utility Resolvers ===-------------------------------------------------------------------—===// More...
 
std::optional< AnnoPathValuecirct::firrtl::tryResolve (DictionaryAttr anno, ApplyState &state)
 Resolves with target, if it exists. If not, resolves to the circuit. More...
 
LogicalResult circt::firrtl::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 circt::firrtl::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 circt::firrtl::applyWithoutTarget (const AnnoPathValue &target, DictionaryAttr anno, ApplyState &state)
 
template<bool allowNonLocal = false>
static LogicalResult circt::firrtl::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...