CIRCT  19.0.0git
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ResolveTracesPass Struct Reference
Inheritance diagram for ResolveTracesPass:
Inheritance graph
[legend]
Collaboration diagram for ResolveTracesPass:
Collaboration graph
[legend]

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< AnnoPathValueupdatePortTarget (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< AnnoPathValueupdateTarget (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< AnnoPathValueupdateModuleTarget (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

NLATablenlaTable
 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...
 

Detailed Description

Definition at line 69 of file ResolveTraces.cpp.

Member Function Documentation

◆ buildTarget()

void ResolveTracesPass::buildTarget ( AnnoPathValue path,
SmallString< 64 > &  newTarget 
)
inlineprivate

◆ getSymbolIndex()

unsigned ResolveTracesPass::getSymbolIndex ( Attribute  attr)
inlineprivate

Get a symbol index and update symbol datastructures.

Definition at line 94 of file ResolveTraces.cpp.

◆ runOnOperation()

void ResolveTracesPass::runOnOperation ( )
override

◆ updateModuleTarget()

std::optional<AnnoPathValue> ResolveTracesPass::updateModuleTarget ( FModuleLike &  module,
Annotation anno 
)
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 250 of file ResolveTraces.cpp.

References circt::firrtl::Annotation::getMember(), circt::firrtl::NLATable::getModule(), and circt::firrtl::NLATable::getNLA().

◆ updatePortTarget()

std::optional<AnnoPathValue> ResolveTracesPass::updatePortTarget ( FModuleLike &  module,
Annotation anno,
unsigned  portIdx,
hw::InnerRefAttr  innerRef 
)
inlineprivate

Add a "target" field to a port Annotation that indicates the current location of the port in the circuit.

Definition at line 215 of file ResolveTraces.cpp.

References circt::firrtl::getBaseType().

◆ updateTarget()

std::optional<AnnoPathValue> ResolveTracesPass::updateTarget ( FModuleLike &  module,
Operation *  op,
Annotation anno,
hw::InnerRefAttr  innerRef 
)
inlineprivate

Add a "target" field to an Annotation that indicates the current location of a component in the circuit.

Definition at line 226 of file ResolveTraces.cpp.

References circt::firrtl::getBaseType().

◆ updateTargetImpl()

AnnoPathValue ResolveTracesPass::updateTargetImpl ( Annotation anno,
FModuleLike &  module,
FIRRTLBaseType  type,
hw::InnerRefAttr  name,
AnnoTarget  target 
)
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 189 of file ResolveTraces.cpp.

References circt::firrtl::Annotation::getFieldID(), circt::firrtl::Annotation::getMember(), circt::firrtl::NLATable::getModule(), and circt::firrtl::NLATable::getNLA().

Member Data Documentation

◆ istc

hw::InnerSymbolTableCollection* ResolveTracesPass::istc
private

Stores a pointer to an inner symbol table collection.

Definition at line 80 of file ResolveTraces.cpp.

◆ nlaTable

NLATable* ResolveTracesPass::nlaTable
private

Stores a pointer to an NLA Table.

This is populated during runOnOperation.

Definition at line 77 of file ResolveTraces.cpp.

◆ symbolIdx

unsigned ResolveTracesPass::symbolIdx = 0
private

Global symbol index used for substitutions, e.g., "{{42}}".

This value is the next index that will be used.

Definition at line 84 of file ResolveTraces.cpp.

◆ symbolMap

DenseMap<Attribute, unsigned> ResolveTracesPass::symbolMap
private

Map of symbol to symbol index.

This is used to reuse symbol substitutions.

Definition at line 88 of file ResolveTraces.cpp.

◆ symbols

SmallVector<Attribute> ResolveTracesPass::symbols
private

Symbol substitutions for the JSON verbatim op.

Definition at line 91 of file ResolveTraces.cpp.


The documentation for this struct was generated from the following file: