slang::analysis::ValueDriver class

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

Public static functions

static ValueDriver* create(BumpAllocator& alloc, DriverKind kind, const ast::Expression& lsp, const ast::Symbol& containingSymbol, bitmask<DriverFlags> flags, const SourceRange* overrideRange = nullptr)
Constructs a new ValueDriver instance.
static ValueDriver* create(BumpAllocator& alloc, const ValueDriver& copyFrom)
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.
const SourceRange* getOverrideRange() const
Gets an optional extra source range that indicates the driver actually came from some other, indirected location (like a modport port expansion).

Public variables

not_null<const ast::Expression*> lsp
The longest static prefix expression that drives the value.
not_null<const ast::Symbol*> containingSymbol
The symbol that contains the driver expression.
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).