slang-netlist  0.9.0
Loading...
Searching...
No Matches
slang::netlist::NetlistEdge Class Reference

#include <NetlistEdge.hpp>

Inheritance diagram for slang::netlist::NetlistEdge:
slang::netlist::DirectedEdge< NetlistNode, NetlistEdge >

Public Member Functions

 NetlistEdge (NetlistNode &sourceNode, NetlistNode &targetNode)
auto setEdgeKind (ast::EdgeKind kind)
auto setVariable (SymbolReference const *sym, DriverBitRange newBounds) -> bool
auto hasSymbol () const -> bool
 True if this edge carries a symbol annotation.
void disable ()
Public Member Functions inherited from slang::netlist::DirectedEdge< NetlistNode, NetlistEdge >
 DirectedEdge (NetlistNode &sourceNode, NetlistNode &targetNode)
auto operator= (const DirectedEdge< NetlistNode, NetlistEdge > &edge) -> DirectedEdge< NetlistNode, NetlistEdge > &=default
auto getSourceNode () const -> NetlistNode &
 Return the source node of this edge.
auto getTargetNode () const -> NetlistNode &
 Return the target node of this edge.

Public Attributes

ast::EdgeKind edgeKind {ast::EdgeKind::None}
SymbolReference const * symbol {nullptr}
DriverBitRange bounds
bool disabled {false}

Additional Inherited Members

Protected Member Functions inherited from slang::netlist::DirectedEdge< NetlistNode, NetlistEdge >
auto isEqualTo (const NetlistEdge &edge) const -> bool
auto getDerived () -> NetlistEdge &
Protected Attributes inherited from slang::netlist::DirectedEdge< NetlistNode, NetlistEdge >
NetlistNodesourceNode
NetlistNodetargetNode

Detailed Description

A class representing a dependency between two nodes in the netlist.

The driven symbol annotation is stored as a pointer into the owning NetlistGraph's SymbolTable so that many edges referring to the same hierarchical symbol share a single backing record.

Constructor & Destructor Documentation

◆ NetlistEdge()

slang::netlist::NetlistEdge::NetlistEdge ( NetlistNode & sourceNode,
NetlistNode & targetNode )
inline

Member Function Documentation

◆ disable()

void slang::netlist::NetlistEdge::disable ( )
inline

◆ hasSymbol()

auto slang::netlist::NetlistEdge::hasSymbol ( ) const -> bool
inline

True if this edge carries a symbol annotation.

◆ setEdgeKind()

auto slang::netlist::NetlistEdge::setEdgeKind ( ast::EdgeKind kind)
inline

◆ setVariable()

auto slang::netlist::NetlistEdge::setVariable ( SymbolReference const * sym,
DriverBitRange newBounds ) -> bool
inline

Associate a driven symbol / bit range with this edge.

If the edge already carries an annotation for the same hierarchical symbol and the new range is contiguous (abutting or overlapping) with the existing one, widen the stored bounds to the union of both ranges. Returns true if the annotation was set or merged successfully, false if the edge already carries a range for the same symbol that is not contiguous with newBounds — the caller must create a separate edge in that case.

Symbol identity is by pointer: the SymbolTable interns each hierarchical path to a single canonical record, so equal paths share the same pointer.

Member Data Documentation

◆ bounds

DriverBitRange slang::netlist::NetlistEdge::bounds

◆ disabled

bool slang::netlist::NetlistEdge::disabled {false}

◆ edgeKind

ast::EdgeKind slang::netlist::NetlistEdge::edgeKind {ast::EdgeKind::None}

◆ symbol

SymbolReference const* slang::netlist::NetlistEdge::symbol {nullptr}

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