|
slang-netlist
0.9.0
|
Represent the netlist connectivity of an elaborated design. More...
#include <NetlistGraph.hpp>
Classes | |
| struct | SensitivitySource |
| A clock/reset signal driving a State node, paired with its edge kind. More... | |
Public Member Functions | |
| void | build (ast::Compilation &compilation, analysis::AnalysisManager &analysisManager, BuilderOptions options={}) |
| auto | lookup (std::string_view name) const -> NetlistNode * |
| 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 | getCombFanOut (NetlistNode &node) const -> std::vector< NetlistNode * > |
| auto | getCombFanIn (NetlistNode &node) const -> std::vector< NetlistNode * > |
| auto | getSensitivity (NetlistNode &node) const -> std::vector< SensitivitySource > |
| auto | findNodes (std::string_view pattern) const -> std::vector< NetlistNode * > |
| auto | findNodesRegex (std::string_view pattern) const -> std::vector< NetlistNode * > |
Find named nodes whose hierarchical path matches the regex pattern. | |
| auto | filterNodes (NodeKind kind) const |
| auto | addEdge (NetlistNode &sourceNode, NetlistNode &targetNode) -> NetlistEdge & |
| Add an edge between two nodes. | |
| auto | getBuildProfile () const -> BuildProfile const & |
| Return the profiling data from the last build() call. | |
| void | setBuildProfile (BuildProfile const &profile) |
| Set the profiling data (called internally by NetlistBuilder). | |
| Public Member Functions inherited from slang::netlist::DirectedGraph< NetlistNode, NetlistEdge > | |
| DirectedGraph ()=default | |
| auto | begin () const -> const_iterator |
| auto | end () const -> const_iterator |
| auto | findNode (const NetlistNode &nodeToFind) const -> node_descriptor |
| auto | getNode (node_descriptor node) const -> NetlistNode & |
| Given a node descriptor, return the node by reference. | |
| auto | addNode () -> NetlistNode & |
| auto | removeNode (NetlistNode &nodeToRemove) -> bool |
| auto | addEdge (NetlistNode &sourceNode, NetlistNode &targetNode) -> NetlistEdge & |
| Add an edge between two existing nodes in the graph. | |
| auto | addNewEdge (NetlistNode &sourceNode, NetlistNode &targetNode) -> NetlistEdge & |
| auto | removeEdge (NetlistNode &sourceNode, NetlistNode &targetNode) -> bool |
| auto | outDegree (const NetlistNode &node) const -> size_t |
| Return the number of edges outgoing from the specified node. | |
| auto | inDegree (const NetlistNode &node) const -> size_t |
| Return the number of edges incident to the specified node. | |
| auto | numNodes () const -> size_t |
| Return the size of the graph. | |
| auto | numEdges () const -> size_t |
| Return the number of edges in the graph. | |
Public Attributes | |
| FileTable | fileTable |
| SymbolTable | symbolTable |
Additional Inherited Members | |
| Public Types inherited from slang::netlist::DirectedGraph< NetlistNode, NetlistEdge > | |
| using | NodePtrType |
| using | NodeListType |
| using | iterator |
| using | const_iterator |
| using | node_descriptor |
| using | edge_descriptor |
| using | DirectedGraphType |
| Static Public Attributes inherited from slang::netlist::DirectedGraph< NetlistNode, NetlistEdge > | |
| static const size_t | null_node |
| Protected Attributes inherited from slang::netlist::DirectedGraph< NetlistNode, NetlistEdge > | |
| std::mutex | nodesMutex |
| NodeListType | nodes |
Represent the netlist connectivity of an elaborated design.
|
inline |
Add an edge between two nodes.
| void slang::netlist::NetlistGraph::build | ( | ast::Compilation & | compilation, |
| analysis::AnalysisManager & | analysisManager, | ||
| BuilderOptions | options = {} ) |
Build the netlist from an elaborated compilation.
Caller is responsible for having run VisitAll, frozen the compilation, and run the analysis manager prior to this call. options configures the build, including parallel execution, thread pool size, and precision upgrades; see BuilderOptions.
|
inlinenodiscard |
Return a view of all nodes of the specified kind.
| kind | The kind of nodes to filter. |
|
nodiscard |
Find named nodes whose hierarchical path matches the wildcard pattern. Supports '*' (zero or more characters) and '?' (one character).
|
nodiscard |
Find named nodes whose hierarchical path matches the regex pattern.
|
inlinenodiscard |
Return the profiling data from the last build() call.
|
nodiscard |
Return all nodes that can reach node via combinational edges in the backward (fan-in) direction. The traversal stops at State nodes.
|
nodiscard |
Return all nodes reachable from node via combinational edges in the forward (fan-out) direction. The traversal stops at State nodes.
|
nodiscard |
Return the set of driver nodes for the symbol with the given hierarchical name over the bit range bounds.
A driver is any node that is the source of an edge annotated with a matching symbol reference whose bounds overlap bounds. Each driver is reported at most once.
|
nodiscard |
|
nodiscard |
Lookup a node in the graph by its hierarchical name.
| name | The hierarchical name of the node. |
|
nodiscard |
|
inline |
Set the profiling data (called internally by NetlistBuilder).
| FileTable slang::netlist::NetlistGraph::fileTable |
| SymbolTable slang::netlist::NetlistGraph::symbolTable |