Uvm Events
Uvm Events
UVM EVENT
UVM EVENT EXAMPLE
UVM_OBJECT_STRING_POOL & UVM_EVENT_POOL
UVM_EVENT_POOL Example
Achieving the synchronization
UVM EVENTS
The uvm_event class is a wrapper class around the
SystemVerilog event construct. It provides some additional
services such as setting callbacks and maintaining the
number of waiters.
uvm_event methods
New:
wait_on:
wait_off: If the event has already triggered and is on, this task waits for the
event to be turned off via a call to reset.
wait_trigger:
wait_ptrigger_data:
get_trigger_data.
Trigger:
get_trigger_time:
is_on:
Indicates whether the event has been triggered since it was last reset.
is_off:
Reset:
add_callback:
Cancel:
get_num_waiters:
UVM_EVENT Example
Module event_example();
uvm_event event;
Initial begin
Event = new(event);
Fork
PROCESS1: begin
object obj;
obj.data = 'h55;
event.trigger(.data(obj));
End
PROCESS2: begin
object obj;
event.wait_ptrigger_data(.data(obj));
End
join
End
endmodule
uvm_object_string_pool and
uvm_event_pool
uvm_object_string_pool methods
and uvm_event_pool
new:
get_global_pool: Returns the singleton global pool for the item type, T.
get_global: Returns the specified item instance from the global item pool.
get:
delete: Removes the item with the given string key from the pool.
uvm_event_pool example
in the driver:
uvm_event_pool p1 = p1.get_global_pool();
uvm_event e1 = p1.get("ABC");
e1.trigger();
e1.reset();
in the receiver:
uvm_event_pool p1 = p1.get_global_pool();
uvm_event e1 = p1.get("ABC");
e1.wait_trigger()
cb,