NetlistBuilder class
#include <netlist/NetlistBuilder.hpp>
A class that manages construction of the netlist graph.
Constructors, destructors, conversion operators
- NetlistBuilder(ast::Compilation& compilation, analysis::AnalysisManager& analysisManager, NetlistGraph& graph)
Public functions
- auto toTextLocation(SourceLocation loc) const -> TextLocation
- auto toSymbolRef(ast::Symbol const& sym) const -> SymbolReference
- Extract a SymbolReference from a live AST symbol.
- void build(const ast::Symbol& root, bool parallel = true, unsigned numThreads = 0)
- void finalize()
- Finalize the netlist graph after construction is complete.
- void handle(ast::PortSymbol const& symbol)
- void handle(ast::VariableSymbol const& symbol)
- void handle(ast::InstanceSymbol const& symbol)
- void handle(ast::ProceduralBlockSymbol const& symbol)
- void handle(ast::ContinuousAssignSymbol const& symbol)
- void handle(ast::GenerateBlockSymbol const& symbol)
- auto getDrivers(ast::ValueSymbol const& symbol, DriverBitRange bounds) const -> DriverList
Function documentation
TextLocation slang:: netlist:: NetlistBuilder:: toTextLocation(SourceLocation loc) const
Convert a slang SourceLocation to a TextLocation using the compilation's SourceManager and the graph's FileTable.
void slang:: netlist:: NetlistBuilder:: build(const ast::Symbol& root,
bool parallel = true,
unsigned numThreads = 0)
Build the netlist graph from the given root symbol using a two-phase collect-then-dispatch approach. Phase 1 visits the AST sequentially to create ports, variables, and instance structure. Phase 2 dispatches deferred DFA work items in parallel (when parallel=true and threads are available). numThreads specifies the thread pool size; 0 means use hardware concurrency.
DriverList slang:: netlist:: NetlistBuilder:: getDrivers(ast::ValueSymbol const& symbol,
DriverBitRange bounds) const
Get a list of all the drivers for the given symbol and bit range. If there are no drivers, the returned list will be empty.