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

#include <NetlistNode.hpp>

Inheritance diagram for slang::netlist::Port:
slang::netlist::NetlistNode slang::netlist::Node< NetlistNode, NetlistEdge >

Public Member Functions

 Port (std::string name, std::string hierarchicalPath, TextLocation location, ast::ArgumentDirection direction, DriverBitRange bounds)
auto isInput () const
auto isOutput () const
auto isDriven () const -> bool
 Return true if any other node drives this port.
auto getHierarchicalPath () const -> std::optional< std::string_view > override
auto getBounds () const -> std::optional< DriverBitRange > override
auto getLocation () const -> std::optional< TextLocation > override
Public Member Functions inherited from slang::netlist::NetlistNode
 NetlistNode (NodeKind kind)
 ~NetlistNode () override=default
template<typename T>
auto as () -> T &
template<typename T>
auto as () const -> const T &
Public Member Functions inherited from slang::netlist::Node< NetlistNode, NetlistEdge >
 Node ()=default
virtual ~Node ()=default
auto operator= (const Node &) -> Node &=delete
auto begin () const -> const_iterator
auto end () const -> const_iterator
auto inBegin () -> in_iterator
auto inEnd () -> in_iterator
auto findEdgeFrom (const NetlistNode &sourceNode) -> in_iterator
 Return an iterator to the edge connecting the source node.
auto findEdgeTo (const NetlistNode &targetNode) -> iterator
 Return an iterator to the edge connecting the target node.
auto addEdge (NetlistNode &targetNode) -> NetlistEdge &
auto addNewEdge (NetlistNode &targetNode) -> NetlistEdge &
auto removeEdge (NetlistNode &targetNode) -> bool
void clearAllEdges ()
 Remove all edges to/from this node.
auto getEdgesTo (const NetlistNode &targetNode, std::vector< NetlistEdge * > &result) -> bool
auto getInEdges () const -> const InEdgeListType &
 Return the list of outgoing edges from this node.
auto getOutEdges () const -> const OutEdgeListType &
auto inDegree () const -> size_t
 Return the total number of edges incoming to this node.
auto outDegree () const -> size_t
 Return the total number of edges outgoing from this node.

Static Public Member Functions

static auto isKind (NodeKind otherKind) -> bool

Public Attributes

std::string name
std::string hierarchicalPath
TextLocation location
ast::ArgumentDirection direction
DriverBitRange bounds
Public Attributes inherited from slang::netlist::NetlistNode
size_t ID
NodeKind kind

Additional Inherited Members

Public Types inherited from slang::netlist::Node< NetlistNode, NetlistEdge >
using OutEdgePtrType
using OutEdgeListType
using InEdgeListType
using iterator
using const_iterator
using in_iterator
using const_in_iterator
using edge_descriptor
Protected Types inherited from slang::netlist::Node< NetlistNode, NetlistEdge >
using OutEdgeIndex
Protected Member Functions inherited from slang::netlist::Node< NetlistNode, NetlistEdge >
auto isEqualTo (const NetlistNode &node) const -> bool
auto getDerived () -> NetlistNode &
Protected Attributes inherited from slang::netlist::Node< NetlistNode, NetlistEdge >
std::mutex edgeMutex
InEdgeListType inEdges
OutEdgeListType outEdges
std::unique_ptr< OutEdgeIndexoutEdgeIndex
Static Protected Attributes inherited from slang::netlist::Node< NetlistNode, NetlistEdge >
static constexpr size_t outEdgeIndexThreshold

Constructor & Destructor Documentation

◆ Port()

slang::netlist::Port::Port ( std::string name,
std::string hierarchicalPath,
TextLocation location,
ast::ArgumentDirection direction,
DriverBitRange bounds )
inline

Member Function Documentation

◆ getBounds()

auto slang::netlist::Port::getBounds ( ) const -> std::optional< DriverBitRange >
inlineoverridevirtual

Reimplemented from slang::netlist::NetlistNode.

◆ getHierarchicalPath()

auto slang::netlist::Port::getHierarchicalPath ( ) const -> std::optional< std::string_view >
inlineoverridevirtual

Reimplemented from slang::netlist::NetlistNode.

◆ getLocation()

auto slang::netlist::Port::getLocation ( ) const -> std::optional< TextLocation >
inlineoverridevirtual

Reimplemented from slang::netlist::NetlistNode.

◆ isDriven()

auto slang::netlist::Port::isDriven ( ) const -> bool
inline

Return true if any other node drives this port.

◆ isInput()

auto slang::netlist::Port::isInput ( ) const
inline

◆ isKind()

auto slang::netlist::Port::isKind ( NodeKind otherKind) -> bool
inlinestatic

◆ isOutput()

auto slang::netlist::Port::isOutput ( ) const
inline

Member Data Documentation

◆ bounds

DriverBitRange slang::netlist::Port::bounds

◆ direction

ast::ArgumentDirection slang::netlist::Port::direction

◆ hierarchicalPath

std::string slang::netlist::Port::hierarchicalPath

◆ location

TextLocation slang::netlist::Port::location

◆ name

std::string slang::netlist::Port::name

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