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.
uvm_event_base | The uvm_event_base class is an abstract wrapper class around the SystemVerilog event construct. |
uvm_event#(T) | The uvm_event class is an extension of the abstract uvm_event_base class. |
virtual task wait_on ( bit delta = 0 )
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 task wait_off ( bit delta = 0 )
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 task wait_trigger ()
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 task wait_ptrigger ()
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.
virtual function time get_trigger_time ()
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 ()
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 ()
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 = 0 )
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 ()
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 ()
Returns the number of processes waiting on the event.
The uvm_event class is an extension of the abstract uvm_event_base class.
The optional parameter T allows the user to define a data type which can be passed during an event trigger.
uvm_event#(T) | |||||||||||||||||
The uvm_event class is an extension of the abstract uvm_event_base class. | |||||||||||||||||
Class Hierarchy | |||||||||||||||||
| |||||||||||||||||
Class Declaration | |||||||||||||||||
| |||||||||||||||||
Methods | |||||||||||||||||
new | Creates a new event object. | ||||||||||||||||
wait_trigger_data | This method calls uvm_event_base::wait_trigger followed by get_trigger_data. | ||||||||||||||||
wait_ptrigger_data | This method calls uvm_event_base::wait_ptrigger followed by get_trigger_data. | ||||||||||||||||
trigger | Triggers the event, resuming all waiting processes. | ||||||||||||||||
get_trigger_data | Gets the data, if any, provided by the last call to trigger. | ||||||||||||||||
add_callback | Registers a callback object, cb, with this event. | ||||||||||||||||
delete_callback | Unregisters the given callback, cb, from this event. |
virtual task wait_trigger_data ( output T data )
This method calls uvm_event_base::wait_trigger followed by get_trigger_data.
virtual task wait_ptrigger_data ( output T data )
This method calls uvm_event_base::wait_ptrigger followed by get_trigger_data.
virtual function void trigger ( T data = null )
Triggers the event, resuming all waiting processes.
An optional data argument can be supplied with the enable to provide trigger-specific information.
virtual function T get_trigger_data ()
Gets the data, if any, provided by the last call to trigger.
virtual function void add_callback ( uvm_event_callback#(T) cb, bit append = 1 )
Registers a callback object, cb, with this event. The callback object may include pre_trigger and post_trigger functionality. If append is set to 1, the default, cb is added to the back of the callback list. Otherwise, cb is placed at the front of the callback list.
virtual function void delete_callback ( uvm_event_callback#(T) cb )
Unregisters the given callback, cb, from this event.
The uvm_void class is the base class for all UVM classes.
virtual class uvm_void
The uvm_object class is the base class for all UVM data and hierarchical classes.
virtual class uvm_object extends uvm_void
The uvm_event_base class is an abstract wrapper class around the SystemVerilog event construct.
virtual class uvm_event_base extends uvm_object
The uvm_event class is an extension of the abstract uvm_event_base class.
class uvm_event#( type T = uvm_object ) extends uvm_event_base
Resets the event to its off state.
virtual function void reset ( bit wakeup = 0 )
Triggers the event, resuming all waiting processes.
virtual function void trigger ( T data = null )
Waits for the event to be triggered.
virtual task wait_trigger ()
Creates a new event object.
function new ( string name = "" )
This method calls uvm_event_base::wait_trigger followed by get_trigger_data.
virtual task wait_trigger_data ( output T data )
Gets the data, if any, provided by the last call to trigger.
virtual function T get_trigger_data ()
This method calls uvm_event_base::wait_ptrigger followed by get_trigger_data.
virtual task wait_ptrigger_data ( output T data )
Waits for a persistent trigger of the event.
virtual task wait_ptrigger ()
Registers a callback object, cb, with this event.
virtual function void add_callback ( uvm_event_callback#(T) cb, bit append = 1 )
Unregisters the given callback, cb, from this event.
virtual function void delete_callback ( uvm_event_callback#(T) cb )