|
CIRCT 23.0.0git
|
ImportVerilog Elaboration Phases for Hierarchical Names. More...
#include <ImportVerilogInternals.h>

Public Member Functions | |
| std::strong_ordering | operator<=> (const LocationKey &) const =default |
| bool | operator== (const LocationKey &) const =default |
Static Public Member Functions | |
| static LocationKey | get (const slang::SourceLocation &loc, const slang::SourceManager &mgr) |
Public Attributes | |
| uint64_t | sortKey |
| size_t | offset |
ImportVerilog Elaboration Phases for Hierarchical Names.
Hierarchical name resolution is performed in four distinct phases:
traverseInstanceBody pass walks the Slang AST to identify all hierarchical references (e.g., Top.sub.var). It records these in hierPaths mapped by module body.convertModuleHeader, we inspect hierPaths for the module and add corresponding input/output ports to the generated moore.module to allow cross-module communication.Structure.cpp during instance creation, we look up the canonical module body's hierPaths to determine which hierarchical values need to be passed as inputs or captured as outputs from the instance.Expressions.cpp, visitors for rvalues and lvalues resolve hierarchical names by first checking function captures (inside a function body the capture argument must be used to respect region isolation), then the instance-aware hierValueSymbols map, and finally standard scoped lookups. Definition at line 198 of file ImportVerilogInternals.h.
|
inlinestatic |
Definition at line 202 of file ImportVerilogInternals.h.
References offset.
Referenced by circt::ImportVerilog::Context::convertGlobalVariable(), circt::ImportVerilog::Context::declareCallableImpl(), and circt::ImportVerilog::Context::declareClass().
|
default |
|
default |
| size_t circt::ImportVerilog::LocationKey::offset |
Definition at line 200 of file ImportVerilogInternals.h.
Referenced by get().
| uint64_t circt::ImportVerilog::LocationKey::sortKey |
Definition at line 199 of file ImportVerilogInternals.h.