slang::ast::TimingControl class

The base class for SystemVerilog timing controls (delay, event, etc).

Derived classes

class BlockEventListControl
Represents a list of block events (used within coverage events).
class CycleDelayControl
Represents a cycle-based delay control.
class Delay3Control
Represents multiple delays associated with a single gate primitive.
class DelayControl
Represents a delay time control.
class EventListControl
Represents a list of timing controls to wait on.
class ImplicitEventControl
Represents an implicit event control (i.e. the @* construct).
class InvalidTimingControl
Represents an invalid timing control.
class OneStepDelayControl
Represents the built-in 1step delay.
class RepeatedEventControl
Represents a repeat event control.
class SignalEventControl
Represents a signal event control.

Public static functions

static auto bind(const syntax::TimingControlSyntax& syntax, const ASTContext& context) -> TimingControl&
Binds a timing control from the given syntax node.
static auto bind(const syntax::PropertyExprSyntax& syntax, const ASTContext& context) -> TimingControl&
Binds a timing control from the given syntax node.
static auto bind(const syntax::SequenceExprSyntax& syntax, const ASTContext& context) -> TimingControl&
Binds a timing control from the given syntax node.

Public functions

auto bad() const -> bool
Indicates whether the timing control is invalid.
template<typename T>
auto as() -> T&
Casts this timing control to the given concrete derived type.
template<typename T>
auto as() const -> const T&
Casts this timing control to the given concrete derived type.
template<typename T>
auto as_if() -> T*
Tries to cast this timing control to the given concrete derived type.
template<typename T>
auto as_if() const -> const T*
Tries to cast this timing control to the given concrete derived type.
template<typename TVisitor, typename... Args>
auto visit(TVisitor& visitor, Args && ... args) const -> decltype(auto)
Visits this timing control's concrete derived type via the provided visitor object.

Public variables

TimingControlKind kind
The kind of timing control; indicates the type of derived class.
const syntax::SyntaxNode* syntax
The syntax used to create the timing control, if any.
SourceRange sourceRange
The source range of this timing control, if it originated from source code.

Function documentation

template<typename T>
T& slang::ast::TimingControl::as()

Casts this timing control to the given concrete derived type.

Asserts that the type is appropriate given this timing control's kind.

template<typename T>
const T& slang::ast::TimingControl::as() const

Casts this timing control to the given concrete derived type.

Asserts that the type is appropriate given this timing control's kind.

template<typename T>
T* slang::ast::TimingControl::as_if()

Tries to cast this timing control to the given concrete derived type.

If the type is not appropriate given this timing control's kind, returns nullptr.

template<typename T>
const T* slang::ast::TimingControl::as_if() const

Tries to cast this timing control to the given concrete derived type.

If the type is not appropriate given this timing control's kind, returns nullptr.