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::ValuePath& path, const ast::Symbol& containingSymbol, bitmask<DriverFlags> flags, const SourceRange* overrideRange = nullptr)
Constructs a new ValueDriver instance.
static ValueDriver* create(BumpAllocator& alloc, ast::EvalContext& evalContext, const ValueDriver& copyFrom, const ast::ValueSymbol& newTarget)
Constructs a new ValueDriver instance.

Public functions

const ast::ValueSymbol& getSymbol() const
Gets the symbol that is assigned to by this driver.
std::pair<uint64_t, uint64_t> getBounds() const
Gets the bit range assigned to by this driver.
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

ast::ValuePath path
The target value and sub-path being driven.
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).

Variable documentation

ast::ValuePath slang::analysis::ValueDriver::path

The target value and sub-path being driven.