slang::ast::DistExpression class

Denotes an expression along with a distribution of probabilities for that expression.

This can't occur in normal expression code; it's used as part of constraints and properties (and always has the type 'void').

Base classes

class Expression
The base class for all expressions in SystemVerilog.

Public types

struct DistItem
A single distribution item.
struct DistWeight
A weight to apply to a distribution.

Public functions

auto left() const -> const Expression&
auto items() const -> std::span<DistItem const>

Function documentation

const Expression& slang::ast::DistExpression::left() const

Returns the left-hand side of the distribution operator.

std::span<DistItem const> slang::ast::DistExpression::items() const

Returns the distribution items with their associated weights.