The ovm_event_callback class is an abstract class that is used to create callback objects which may be attached to ovm_events. To use, you derive a new class and override any or both pre_trigger and post_trigger.
Callbacks are an alternative to using processes that wait on events. When a callback is attached to an event, that callback object’s callback function is called each time the event is triggered.
| ovm_event_callback | |||
| The ovm_event_callback class is an abstract class that is used to create callback objects which may be attached to ovm_events. | |||
| Class Hierarchy | |||
| |||
| Class Declaration | |||
| |||
| Methods | |||
| new | Creates a new callback object. | ||
| pre_trigger | This callback is called just before triggering the associated event. | ||
| post_trigger | This callback is called after triggering the associated event. | ||
virtual function bit pre_trigger ( ovm_event e, ovm_object data = null )
This callback is called just before triggering the associated event. In a derived class, override this method to implement any pre-trigger functionality.
If your callback returns 1, then the event will not trigger and the post-trigger callback is not called. This provides a way for a callback to prevent the event from triggering.
In the function, e is the ovm_event that is being triggered, and data is the optional data associated with the event trigger.
virtual function void post_trigger ( ovm_event e, ovm_object data = null )
This callback is called after triggering the associated event. In a derived class, override this method to implement any post-trigger functionality.
In the function, e is the ovm_event that is being triggered, and data is the optional data associated with the event trigger.
The ovm_object class is the base class for all OVM data and hierarchical classes.
virtual class ovm_object extends ovm_void
The ovm_event_callback class is an abstract class that is used to create callback objects which may be attached to ovm_events.
virtual class ovm_event_callback extends ovm_object
The ovm_event class is a wrapper class around the SystemVerilog event construct.
class ovm_event extends ovm_object
Creates a new callback object.
function new ( string name = "" )
This callback is called just before triggering the associated event.
virtual function bit pre_trigger ( ovm_event e, ovm_object data = null )
This callback is called after triggering the associated event.
virtual function void post_trigger ( ovm_event e, ovm_object data = null )