//// This method should never be called directly.externvirtualtaskstop_phase(uvm_phasephase);// backward compatexternvirtualtaskstop(stringph_name);// Variable- enable_stop_interrupt - DEPRECATED//// This bit allows a component to raise an objection to the stopping of the// current phase. It affects only time consuming phases (such as the run// phase).//// When this bit is set, the <stop> task in the component is called as a result// of a call to <global_stop_request>. Components that are sensitive to an// immediate killing of its run-time processes should set this bit and// implement the stop task to prepare for shutdown.intenable_stop_interrupt;`endif// Function: resolve_bindings//// Processes all port, export, and imp connections. Checks whether each port's// min and max connection requirements are met.//// It is called just before the end_of_elaboration phase.//// Users should not call directly.externvirtualfunctionvoidresolve_bindings();externfunctionstringmassage_scope(stringscope);
// current phase. The uvm_top will then begin execution of the next phase,// if any.functionvoidstop_request();`uvm_info_context("STOP_REQ","Stop-request called. Waiting for all-dropped on uvm_test_done",UVM_FULL,m_top);forkm_stop_request();join_noneendfunctiontaskm_stop_request();raise_objection(m_top,"stop_request called; raising test_done objection");uvm_wait_for_nba_region();drop_objection(m_top,"stop_request called; dropping test_done objection");endtask
// testbench. You should lower the timeout to prevent "never-ending"// simulations. timestop_timeout=0;// Task- all_dropped DEPRECATED//// This callback is called when the given ~object's~ objection count reaches// zero; if the ~object~ is the implicit top-level, <uvm_root> then it means// there are no more objections raised for the ~uvm_test_done~ objection.// Thus, after calling <uvm_objection::all_dropped>, this method will call// <global_stop_request> to stop the current task-based phase (e.g. run).virtualtaskall_dropped(uvm_objectobj,uvm_objectsource_obj,stringdescription,intcount);if(obj!=m_top)begin
// outstanding objections. The net effect of this action is to forcibly end// the current phase.virtualtaskforce_stop(uvm_objectobj=null);uvm_report_warning("FORCE_STOP",{"Object '",(obj!=null?obj.get_name():"<unknown>"),"' called force_stop"});m_cleared=1;all_dropped(m_top,obj,"force_stop() called",1);clear(obj);endtask`endif// Below are basic data operations needed for all uvm_objects// for factory registration, printing, comparing, etc.typedefuvm_object_registry#(uvm_test_done_objection,"uvm_test_done")type_id;staticfunctiontype_idget_type();returntype_id::get();