CIRCT  20.0.0git
Classes | Namespaces | Macros | Functions
GrandCentral.cpp File Reference
#include "circt/Analysis/FIRRTLInstanceInfo.h"
#include "circt/Dialect/FIRRTL/AnnotationDetails.h"
#include "circt/Dialect/FIRRTL/FIRRTLAnnotationHelper.h"
#include "circt/Dialect/FIRRTL/FIRRTLAttributes.h"
#include "circt/Dialect/FIRRTL/FIRRTLInstanceGraph.h"
#include "circt/Dialect/FIRRTL/FIRRTLOps.h"
#include "circt/Dialect/FIRRTL/FIRRTLUtils.h"
#include "circt/Dialect/FIRRTL/NLATable.h"
#include "circt/Dialect/FIRRTL/Namespace.h"
#include "circt/Dialect/FIRRTL/Passes.h"
#include "circt/Dialect/HW/HWAttributes.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/HW/InnerSymbolNamespace.h"
#include "circt/Dialect/SV/SVOps.h"
#include "circt/Support/Debug.h"
#include "mlir/Pass/Pass.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/YAMLTraits.h"
#include <variant>
#include "circt/Dialect/FIRRTL/Passes.h.inc"
Include dependency graph for GrandCentral.cpp:

Go to the source code of this file.

Classes

struct  llvm::yaml::MappingContextTraits< DescribedSignal, Context >
 Conversion from a DescribedSignal to YAML. More...
 
struct  llvm::yaml::MappingContextTraits< DescribedSignal, Context >::Field
 A one-to-one representation with a YAML representation of a signal/field. More...
 
struct  llvm::yaml::MappingContextTraits< DescribedInstance, Context >
 Conversion from a DescribedInstance to YAML. More...
 
struct  llvm::yaml::MappingContextTraits< DescribedInstance, Context >::Instance
 A YAML-serializable representation of an interface instantiation. More...
 
struct  llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >
 Conversion from an sv::InterfaceOp to YAML. More...
 
struct  llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface
 A YAML-serializable representation of an interface. More...
 

Namespaces

 circt
 The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
 
 circt::firrtl
 
 yaml
 
 llvm
 
 llvm::yaml
 

Macros

#define DEBUG_TYPE   "gct"
 
#define GEN_PASS_DEF_GRANDCENTRAL
 

Functions

static std::string llvm::yaml::stripComment (StringRef str)
 Convert newlines and comments to remove the comments. More...
 
static std::optional< DictionaryAttr > parseAugmentedType (ApplyState &state, DictionaryAttr augmentedType, DictionaryAttr root, StringRef companion, StringAttr name, StringAttr defName, std::optional< IntegerAttr > id, std::optional< StringAttr > description, Twine clazz, StringAttr companionAttr, Twine path={})
 Recursively walk a sifive.enterprise.grandcentral.AugmentedType to extract any annotations it may contain. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "gct"

Definition at line 35 of file GrandCentral.cpp.

◆ GEN_PASS_DEF_GRANDCENTRAL

#define GEN_PASS_DEF_GRANDCENTRAL

Definition at line 39 of file GrandCentral.cpp.

Function Documentation

◆ parseAugmentedType()

static std::optional<DictionaryAttr> parseAugmentedType ( ApplyState state,
DictionaryAttr  augmentedType,
DictionaryAttr  root,
StringRef  companion,
StringAttr  name,
StringAttr  defName,
std::optional< IntegerAttr >  id,
std::optional< StringAttr >  description,
Twine  clazz,
StringAttr  companionAttr,
Twine  path = {} 
)
static

Recursively walk a sifive.enterprise.grandcentral.AugmentedType to extract any annotations it may contain.

This is going to generate two types of annotations: 1) Annotations necessary to build interfaces and store them at "~" 2) Scattered annotations for how components bind to interfaces

Optionally unpack a ReferenceTarget encoded as a DictionaryAttr. Return either a pair containing the Target string (up to the reference) and an array of components or none if the input is malformed. The input DictionaryAttr encoding is a JSON object of a serialized ReferenceTarget Scala class. By example, this is converting: ~Foo|Foo>a.b[0] To: {"~Foo|Foo>a", {".b", "[0]"}} The format of a ReferenceTarget object like: circuit: String module: String path: Seq[(Instance, OfModule)] ref: String component: Seq[TargetToken]

Definition at line 757 of file GrandCentral.cpp.

Referenced by circt::firrtl::applyGCTView().