[source]

Class uvm_event_base

uvm_pkg::uvm_event_base + type_name : string + cancel(): void + do_copy(): void + do_print(): void + get_num_waiters(): int + get_trigger_time(): time + get_type_name(): string + is_off(): bit + is_on(): bit + reset(): void + wait_off() + wait_on() + wait_ptrigger() + wait_trigger() uvm_pkg::uvm_event <T>

Inheritance Diagram of uvm_event_base

The uvm_event_base class is an abstract wrapper class around the SystemVerilog event construct. It provides some additional services such as setting callbacks and maintaining the number of waiters.

Variables

Name

Type

Description

type_name

string

Constructors

function new ( string name ) [source]

Creates a new event object.

Functions

virtual function time get_trigger_time ( ) [source]

Gets the time that this event was last triggered. If the event has not been triggered, or the event has been reset, then the trigger time will be 0.

virtual function bit is_on ( ) [source]

Indicates whether the event has been triggered since it was last reset.

A return of 1 indicates that the event has triggered.

virtual function bit is_off ( ) [source]

Indicates whether the event has been triggered or been reset.

A return of 1 indicates that the event has not been triggered.

virtual function void reset ( bit wakeup ) [source]

Resets the event to its off state. If wakeup is set, then all processes currently waiting for the event are activated before the reset.

No callbacks are called during a reset.

virtual function void cancel ( ) [source]

Decrements the number of waiters on the event.

This is used if a process that is waiting on an event is disabled or activated by some other means.

virtual function int get_num_waiters ( ) [source]

Returns the number of processes waiting on the event.

virtual function string get_type_name ( ) [source]
virtual function void do_print ( uvm_printer printer ) [source]
virtual function void do_copy ( uvm_object rhs ) [source]

Tasks

virtual function wait_on ( bit delta ) [source]

Waits for the event to be activated for the first time.

If the event has already been triggered, this task returns immediately. If delta is set, the caller will be forced to wait a single delta #0 before returning. This prevents the caller from returning before previously waiting processes have had a chance to resume.

Once an event has been triggered, it will be remain "on" until the event is reset.

virtual function wait_off ( bit delta ) [source]

If the event has already triggered and is "on", this task waits for the event to be turned "off" via a call to reset.

If the event has not already been triggered, this task returns immediately. If delta is set, the caller will be forced to wait a single delta #0 before returning. This prevents the caller from returning before previously waiting processes have had a chance to resume.

virtual function wait_trigger ( ) [source]

Waits for the event to be triggered.

If one process calls wait_trigger in the same delta as another process calls <uvm_event#(T)::trigger>, a race condition occurs. If the call to wait occurs before the trigger, this method will return in this delta. If the wait occurs after the trigger, this method will not return until the next trigger, which may never occur and thus cause deadlock.

virtual function wait_ptrigger ( ) [source]

Waits for a persistent trigger of the event. Unlike wait_trigger, this views the trigger as persistent within a given time-slice and thus avoids certain race conditions. If this method is called after the trigger but within the same time-slice, the caller returns immediately.