slang::ast::NetType class

Base class for all net types in SystemVerilog.

There is a parallel type system for nets that exists independently from the data type system. Most nets will be one of the built in types, but user defined net types can exist too.

Base classes

class Symbol
Base class for all symbols (logical code constructs) such as modules, types, functions, variables, etc.

Public types

enum NetKind { Unknown, Wire, WAnd, WOr, Tri, TriAnd, TriOr, Tri0, Tri1, TriReg, Supply0, Supply1, UWire, Interconnect, UserDefined }
The specific kind of net.

Public functions

auto getDataType() const -> const Type&
Gets the data type for nets of this particular net type.
auto getResolutionFunction() const -> const SubroutineSymbol*
Gets the custom resolution function for this net type, if it has one.
auto isError() const -> bool
auto isBuiltIn() const -> bool

Public variables

DeclaredType declaredType
The declared type of the net.

Enum documentation

enum slang::ast::NetType::NetKind

The specific kind of net.

Enumerators
Unknown

Unknown (i.e. an error of some sort).

Wire

A wire.

WAnd

A wire that ANDs multiple drivers.

WOr

A wire that ORs multiple drivers.

Tri

Same as 'wire'.

TriAnd

Same as 'wand'.

TriOr

Same as 'wor'.

Tri0

A wire that with a resistive pull down.

Tri1

A wire that with a resistive pull up.

TriReg

A net that stores a value and is used to model charge storage nodes.

Supply0

A net that models a power supply with supply0 strength.

Supply1

A net that models a power supply with supply1 strength.

UWire

A single-driver net that does not permit conflicts.

Interconnect

A generic interconnect net.

UserDefined

A user-defined nettype.

Function documentation

bool slang::ast::NetType::isError() const

Returns true if this is an error nettype.

bool slang::ast::NetType::isBuiltIn() const

Returns true if this nettype is built-in (i.e. not user-defined).