CIRCT 20.0.0git
Loading...
Searching...
No Matches
Private Member Functions | Private Attributes | List of all members
HWExportModuleHierarchyPass Class Reference
Inheritance diagram for HWExportModuleHierarchyPass:
Inheritance graph
[legend]
Collaboration diagram for HWExportModuleHierarchyPass:
Collaboration graph
[legend]

Private Member Functions

void printHierarchy (hw::InstanceOp &inst, SymbolTable &symbolTable, llvm::json::OStream &j, SmallVectorImpl< Attribute > &symbols, unsigned &id)
 Recursively print the module hierarchy as serialized as JSON.
 
void extractHierarchyFromTop (hw::HWModuleOp op, SymbolTable &symbolTable, llvm::raw_ostream &os, SmallVectorImpl< Attribute > &symbols)
 Return the JSON-serialized module hierarchy for the given module as the top of the hierarchy.
 
void runOnOperation () override
 Find the modules corresponding to the firrtl mainModule and DesignUnderTest, and if they exist, emit a verbatim op with the module hierarchy for each.
 

Private Attributes

DenseMap< Operation *, hw::InnerSymbolNamespace > moduleNamespaces
 

Detailed Description

Definition at line 42 of file HWExportModuleHierarchy.cpp.

Member Function Documentation

◆ extractHierarchyFromTop()

void HWExportModuleHierarchyPass::extractHierarchyFromTop ( hw::HWModuleOp  op,
SymbolTable &  symbolTable,
llvm::raw_ostream &  os,
SmallVectorImpl< Attribute > &  symbols 
)
private

Return the JSON-serialized module hierarchy for the given module as the top of the hierarchy.

Definition at line 96 of file HWExportModuleHierarchy.cpp.

References printHierarchy().

Referenced by runOnOperation().

◆ printHierarchy()

void HWExportModuleHierarchyPass::printHierarchy ( hw::InstanceOp &  inst,
SymbolTable &  symbolTable,
llvm::json::OStream &  j,
SmallVectorImpl< Attribute > &  symbols,
unsigned &  id 
)
private

Recursively print the module hierarchy as serialized as JSON.

Definition at line 61 of file HWExportModuleHierarchy.cpp.

References moduleNamespaces.

Referenced by extractHierarchyFromTop().

◆ runOnOperation()

void HWExportModuleHierarchyPass::runOnOperation ( )
overrideprivate

Find the modules corresponding to the firrtl mainModule and DesignUnderTest, and if they exist, emit a verbatim op with the module hierarchy for each.

Definition at line 117 of file HWExportModuleHierarchy.cpp.

References extractHierarchyFromTop().

Member Data Documentation

◆ moduleNamespaces

DenseMap<Operation *, hw::InnerSymbolNamespace> HWExportModuleHierarchyPass::moduleNamespaces
private

Definition at line 47 of file HWExportModuleHierarchy.cpp.

Referenced by printHierarchy().


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