Saturday, July 26, 2014

uvm_event and uvm_event_pool !!!


Synchronization in a multithreaded environment in system verilog is done using event’s. In UVM uvm_event and uvm_event_pool can be used for synchronization of multiple threads or components. Simple example of uvm event is as follows.


uvm_event_pool  event_pool_s=uvm_uvm_event_pool::get_global_pool()
uvm_event           event_s=event_pool_s.get(event_s);


fork
begin
    ........

    event_s.trigger();

end
begin
    .......
  
   event_s.wait_ptrigger();

end
join