CIRCT  19.0.0git
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. More...
 
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. More...
 
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. More...
 

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 95 of file HWExportModuleHierarchy.cpp.

References circt::calyx::direction::get().

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 circt::calyx::direction::get().

◆ 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 116 of file HWExportModuleHierarchy.cpp.

References builder, extractHierarchyFromTop(), and circt::calyx::direction::get().

Member Data Documentation

◆ moduleNamespaces

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

Definition at line 47 of file HWExportModuleHierarchy.cpp.


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