12#include "slang/ast/SemanticFacts.h"
18#include <unordered_map>
44 void build(ast::Compilation &compilation,
45 analysis::AnalysisManager &analysisManager,
59 -> std::vector<NetlistNode *>;
69 -> std::vector<NetlistNode *>;
74 -> std::vector<NetlistNode *>;
79 -> std::vector<NetlistNode *>;
93 -> std::vector<SensitivitySource>;
97 [[nodiscard]]
auto findNodes(std::string_view pattern)
const
98 -> std::vector<NetlistNode *>;
102 -> std::vector<NetlistNode *>;
111 std::views::filter([kind](std::unique_ptr<NetlistNode>
const &p) {
112 return p->kind == kind;
119 return sourceNode.addEdge(targetNode);
132 mutable bool indexBuilt =
false;
133 mutable std::unordered_map<std::string, std::vector<NetlistNode *>> nodeIndex;
134 void buildIndex()
const;
NodeListType nodes
Definition DirectedGraph.hpp:481
Definition TextLocation.hpp:20
Definition NetlistEdge.hpp:18
Represent the netlist connectivity of an elaborated design.
Definition NetlistGraph.hpp:33
void setBuildProfile(BuildProfile const &profile)
Set the profiling data (called internally by NetlistBuilder).
Definition NetlistGraph.hpp:128
auto lookup(std::string_view name, DriverBitRange bounds) const -> std::vector< NetlistNode * >
auto getDrivers(std::string_view name, DriverBitRange bounds) const -> std::vector< NetlistNode * >
auto getSensitivity(NetlistNode &node) const -> std::vector< SensitivitySource >
auto findNodesRegex(std::string_view pattern) const -> std::vector< NetlistNode * >
Find named nodes whose hierarchical path matches the regex pattern.
auto getCombFanOut(NetlistNode &node) const -> std::vector< NetlistNode * >
FileTable fileTable
Definition NetlistGraph.hpp:35
auto addEdge(NetlistNode &sourceNode, NetlistNode &targetNode) -> NetlistEdge &
Add an edge between two nodes.
Definition NetlistGraph.hpp:117
SymbolTable symbolTable
Definition NetlistGraph.hpp:36
auto getBuildProfile() const -> BuildProfile const &
Return the profiling data from the last build() call.
Definition NetlistGraph.hpp:123
auto getCombFanIn(NetlistNode &node) const -> std::vector< NetlistNode * >
auto lookup(std::string_view name) const -> NetlistNode *
auto findNodes(std::string_view pattern) const -> std::vector< NetlistNode * >
auto filterNodes(NodeKind kind) const
Definition NetlistGraph.hpp:109
void build(ast::Compilation &compilation, analysis::AnalysisManager &analysisManager, BuilderOptions options={})
Definition NetlistNode.hpp:33
Definition SymbolReference.hpp:34
Definition NetlistGraph.hpp:25
Definition NetlistGraph.hpp:22
Definition Utilities.hpp:16
NodeKind
Definition NetlistNode.hpp:19
Definition Utilities.hpp:16
Profiling data collected during netlist graph construction.
Definition BuildProfile.hpp:8
Caller-supplied options that tune how the netlist graph is built.
Definition BuilderOptions.hpp:10
A range over which a symbol is driven.
Definition DriverBitRange.hpp:14
A clock/reset signal driving a State node, paired with its edge kind.
Definition NetlistGraph.hpp:82
NetlistNode * source
Definition NetlistGraph.hpp:83
auto operator==(SensitivitySource const &) const -> bool=default
ast::EdgeKind edgeKind
Definition NetlistGraph.hpp:84