slang::analysis::ValueDriver class

Represents an expression that drives a value by assigning to some range of its type.

Constructors, destructors, conversion operators

ValueDriver(DriverKind kind, const ast::Expression& longestStaticPrefix, const ast::Symbol& containingSymbol, bitmask<DriverFlags> flags)
Constructs a new ValueDriver instance.

Public functions

bool isInputPort() const
Indicates whether the driver is for an input port.
bool isUnidirectionalPort() const
Indicates whether the driver is for a unidirectional port (i.e. not an inout or ref port).
bool isClockVar() const
Indicates whether the driver is for a clocking variable.
bool isInSingleDriverProcedure() const
Indicates whether the driver is inside a single-driver procedure (such as always_comb).
SourceRange getSourceRange() const
Gets the source range describing the driver as written in the source code.

Public variables

not_null<const ast::Expression*> prefixExpression
The expression that drives the value.
not_null<const ast::Symbol*> containingSymbol
The symbol that contains the driver expression.
const ast::Expression* procCallExpression
If the driver is implied inside a procedure by a subroutine, this is the call expression for that subroutine.
bitmask<DriverFlags> flags
Flags that control how the driver operates.
DriverKind kind
The kind of driver (procedural or continuous).
DriverSource source
The source of the driver (procedural block, subroutine, etc).
bool isFromSideEffect
Indicates whether the driver is from a side effect of applying a cached instance body.