slang-netlist  0.12.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, ast::EdgeKind kind) -> 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 >
NetlistNode & sourceNode
NetlistNode & targetNode

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,
ast::EdgeKind kind ) -> bool
inline

Associate a driven symbol, bit range and edge kind with this edge.

One edge describes a single symbol over a single contiguous range at a single edge kind, so an annotation is only absorbed when it agrees with the stored one: same symbol, same edge kind, and a range contiguous (abutting or overlapping) with the stored range, which is widened to the union of the two. Returns true if the annotation was set or merged, and false if it disagrees, in which case the caller must put it on a parallel edge rather than overwrite what is already here.

These are the same attributes NetlistGraph::mergeParallelEdges groups on, so an edge set built through this function is merged consistently.

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: