CIRCT
20.0.0git
|
Public Member Functions | |
void | runOnOperation () override |
Private Member Functions | |
unsigned | getSymbolIndex (Attribute attr) |
Get a symbol index and update symbol datastructures. More... | |
void | buildTarget (AnnoPathValue &path, SmallString< 64 > &newTarget) |
Convert an annotation path to a string with symbol substitutions. More... | |
AnnoPathValue | updateTargetImpl (Annotation &anno, FModuleLike &module, FIRRTLBaseType type, hw::InnerRefAttr name, AnnoTarget target) |
Internal implementation that updates an Annotation to add a "target" field based on the current location of the annotation in the circuit. More... | |
std::optional< AnnoPathValue > | updatePortTarget (FModuleLike &module, Annotation &anno, unsigned portIdx, hw::InnerRefAttr innerRef) |
Add a "target" field to a port Annotation that indicates the current location of the port in the circuit. More... | |
std::optional< AnnoPathValue > | updateTarget (FModuleLike &module, Operation *op, Annotation &anno, hw::InnerRefAttr innerRef) |
Add a "target" field to an Annotation that indicates the current location of a component in the circuit. More... | |
std::optional< AnnoPathValue > | updateModuleTarget (FModuleLike &module, Annotation &anno) |
Add a "target" field to an Annotation on a Module that indicates the current location of the module. More... | |
Private Attributes | |
NLATable * | nlaTable |
Stores a pointer to an NLA Table. More... | |
hw::InnerSymbolTableCollection * | istc |
Stores a pointer to an inner symbol table collection. More... | |
unsigned | symbolIdx = 0 |
Global symbol index used for substitutions, e.g., "{{42}}". More... | |
DenseMap< Attribute, unsigned > | symbolMap |
Map of symbol to symbol index. More... | |
SmallVector< Attribute > | symbols |
Symbol substitutions for the JSON verbatim op. More... | |
Definition at line 75 of file ResolveTraces.cpp.
|
inlineprivate |
Convert an annotation path to a string with symbol substitutions.
Definition at line 114 of file ResolveTraces.cpp.
References assert(), circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case(), circt::firrtl::AnnoPathValue::fieldIdx, circt::calyx::direction::get(), circt::hw::InnerSymbolTable::getInnerSymbol(), circt::firrtl::AnnoTarget::getModule(), circt::firrtl::AnnoTarget::getOp(), circt::firrtl::AnnoTarget::getType(), circt::firrtl::AnnoPathValue::instances, circt::firrtl::AnnoPathValue::isLocal(), circt::firrtl::AnnoPathValue::isOpOfType(), and circt::firrtl::AnnoPathValue::ref.
|
inlineprivate |
Get a symbol index and update symbol datastructures.
Definition at line 101 of file ResolveTraces.cpp.
|
override |
Definition at line 277 of file ResolveTraces.cpp.
References circt::calyx::direction::get(), circt::firrtl::getInnerRefTo(), circt::firrtl::Annotation::isClass(), circt::firrtl::AnnotationSet::removeAnnotations(), circt::firrtl::AnnotationSet::removePortAnnotations(), circt::firrtl::traceAnnoClass, and circt::firrtl::transformReduce().
|
inlineprivate |
Add a "target" field to an Annotation on a Module that indicates the current location of the module.
This will be local or non-local depending on the Annotation.
Definition at line 257 of file ResolveTraces.cpp.
References circt::firrtl::Annotation::getMember(), circt::firrtl::NLATable::getModule(), and circt::firrtl::NLATable::getNLA().
|
inlineprivate |
Add a "target" field to a port Annotation that indicates the current location of the port in the circuit.
Definition at line 222 of file ResolveTraces.cpp.
References circt::firrtl::getBaseType().
|
inlineprivate |
Add a "target" field to an Annotation that indicates the current location of a component in the circuit.
Definition at line 233 of file ResolveTraces.cpp.
References circt::firrtl::getBaseType().
|
inlineprivate |
Internal implementation that updates an Annotation to add a "target" field based on the current location of the annotation in the circuit.
The value of the "target" will be a local target if the Annotation is local and a non-local target if the Annotation is non-local.
Definition at line 196 of file ResolveTraces.cpp.
References circt::firrtl::Annotation::getFieldID(), circt::firrtl::Annotation::getMember(), circt::firrtl::NLATable::getModule(), and circt::firrtl::NLATable::getNLA().
|
private |
Stores a pointer to an inner symbol table collection.
Definition at line 87 of file ResolveTraces.cpp.
|
private |
Stores a pointer to an NLA Table.
This is populated during runOnOperation.
Definition at line 84 of file ResolveTraces.cpp.
|
private |
Global symbol index used for substitutions, e.g., "{{42}}".
This value is the next index that will be used.
Definition at line 91 of file ResolveTraces.cpp.
|
private |
Map of symbol to symbol index.
This is used to reuse symbol substitutions.
Definition at line 95 of file ResolveTraces.cpp.
|
private |
Symbol substitutions for the JSON verbatim op.
Definition at line 98 of file ResolveTraces.cpp.