slang::ast::InterfacePortSymbol class

Represents the public-facing side of a module / program / interface port that is also a connection to an interface instance (optionally with a modport restriction).

Base classes

class Symbol

Public functions

auto getDeclaredRange() const -> std::optional<std::span<const ConstantRange>>
auto getConnection() const -> const Symbol*
Gets the interface instance that this port connects to.

Public variables

const Definition* interfaceDef
A pointer to the definition for the interface.
std::string_view modport
If non-empty, the name of the modport that restricts which interface signals are accessible.
bool isGeneric

Function documentation

std::optional<std::span<const ConstantRange>> slang::ast::InterfacePortSymbol::getDeclaredRange() const

Gets the set of dimensions for specifying interface arrays. Returns nullopt if an error occurs evaluating the dimensions.

Variable documentation

bool slang::ast::InterfacePortSymbol::isGeneric

Set to true if this is a generic interface port, which allows connections to any interface type. If true, interfaceDef will be nullptr.