// The event pool instance for this transaction. This pool is used to track// various milestones: by default, begin, accept, and endconstuvm_event_poolevents=new;// Variable: begin_event//// A ~uvm_event#(uvm_object)~ that is triggered when this transaction's actual execution on the// bus begins, typically as a result of a driver calling <uvm_component::begin_tr>. // Processes that wait on this event will block until the transaction has// begun. //// For more information, see the general discussion for <uvm_transaction>.// See <uvm_event#(T)> for details on the event API.//uvm_event#(uvm_object)begin_event;// Variable: end_event//// A ~uvm_event#(uvm_object)~ that is triggered when this transaction's actual execution on// the bus ends, typically as a result of a driver calling <uvm_component::end_tr>. // Processes that wait on this event will block until the transaction has// ended. //// For more information, see the general discussion for <uvm_transaction>.// See <uvm_event#(T)> for details on the event API.////| virtual task my_sequence::body();//| ...//| start_item(item); \ //| item.randomize(); } `uvm_do(item)
//| item.end_event.wait_on();//| ...// uvm_event#(uvm_object)end_event;//----------------------------------------------------------------------------//// Internal methods properties; do not use directly////----------------------------------------------------------------------------//Override data control methods for internal propertiesexternvirtualfunctionvoiddo_print(uvm_printerprinter);externvirtualfunctionvoiddo_record(uvm_recorderrecorder);externvirtualfunctionvoiddo_copy(uvm_objectrhs);externprotectedfunctionintegerm_begin_tr(timebegin_time=0,integerparent_handle=0);
// specialization of <uvm_pool#(KEY,T)>, e.g. a ~uvm_pool#(uvm_event)~.// @uvm-ieee 1800.2-2020 auto 5.4.2.13externfunctionuvm_event_poolget_event_pool();// Function -- NODOCS -- set_initiator//// Sets initiator as the initiator of this transaction. //// The initiator can be the component that produces the transaction. It can// also be the component that started the transaction. This or any other// usage is up to the transaction designer.// @uvm-ieee 1800.2-2020 auto 5.4.2.14externfunctionvoidset_initiator(uvm_componentinitiator);// Function -- NODOCS -- get_initiator
// The event pool instance for this transaction. This pool is used to track// various milestones: by default, begin, accept, and endconstlocaluvm_event_poolevents=new("events");//----------------------------------------------------------------------------//// Internal methods properties; do not use directly////----------------------------------------------------------------------------//Override data control methods for internal propertiesexternvirtualfunctionvoiddo_print(uvm_printerprinter);externvirtualfunctionvoiddo_record(uvm_recorderrecorder);externvirtualfunctionvoiddo_copy(uvm_objectrhs);externprotectedfunctionintm_begin_tr(timebegin_time=0,
do_begin_tr();//execute callback before event triggerbeginuvm_event#(uvm_object)begin_event;begin_event=events.get("begin");begin_event.trigger();endendfunction// end_tr// ------functionvoiduvm_transaction::end_tr(timeend_time=0,bitfree_handle=1);this.end_time=(end_time==0)?$realtime:end_time;do_end_tr();// Callback prior to actual ending of transaction