// Before: global functions in UVM 1.2.uvm_pkg::set_config_int("uvm_test_top.env.*","limit",64'h1234567801234567);uvm_pkg::set_config_object("uvm_test_top.env.*","cfg",cfg,1);// After: methods retained by the target library.uvm_root::get().set_config_int("uvm_test_top.env.*","limit",64'h1234567801234567);uvm_root::get().set_config_object("uvm_test_top.env.*","cfg",cfg,1);
// raised objections, an implicit call to <global_stop_request> is issued// to end the run phase (or any other task-based phase).constuvm_test_done_objectionuvm_test_done=uvm_test_done_objection::get();// Method- global_stop_request - DEPRECATED//// Convenience function for uvm_test_done.stop_request(). See // <uvm_test_done_objection::stop_request> for more information.functionvoidglobal_stop_request();uvm_test_done_objectiontdo;tdo=uvm_test_done_objection::get();tdo.stop_request();endfunction// Method- set_global_timeout - DEPRECATED//// Convenience function for uvm_top.set_timeout(). See // <uvm_root::set_timeout> for more information. The overridable bit // controls whether subsequent settings will be honored.functionvoidset_global_timeout(timetimeout,bitoverridable=1);uvm_roottop;uvm_coreservice_tcs;cs=uvm_coreservice_t::get();top=cs.get_root();top.set_timeout(timeout,overridable);endfunction// Function- set_global_stop_timeout - DEPRECATED//// Convenience function for uvm_test_done.stop_timeout = timeout.// See <uvm_uvm_test_done::stop_timeout> for more information.functionvoidset_global_stop_timeout(timetimeout);uvm_test_done_objectiontdo;tdo=uvm_test_done_objection::get();tdo.stop_timeout=timeout;endfunction`endif`ifdefUVM_DISABLE_ERROR_MSG_POST_QUIT_COUNTstaticbitset_error=0;//Set 1 when UVM quit count is reached.functionvoidset_error_max_count_reached(interror);set_error=error;endfunction
// component-level setting. See <uvm_component::set_config_int> for// details on setting configuration.functionvoidset_config_int(stringinst_name,stringfield_name,uvm_bitstream_tvalue);uvm_roottop;uvm_coreservice_tcs;if(!uvm_component::m_config_deprecated_warned)begin`uvm_warning("UVM/CFG/SET/DPR","get/set_config_* API has been deprecated. Use uvm_config_db instead.")uvm_component::m_config_deprecated_warned=1;endcs=uvm_coreservice_t::get();top=cs.get_root();top.set_config_int(inst_name,field_name,value);endfunction// Function- set_config_object
// component-level setting. See <uvm_component::set_config_object> for// details on setting configuration.functionvoidset_config_object(stringinst_name,stringfield_name,uvm_objectvalue,bitclone=1);uvm_roottop;uvm_coreservice_tcs;if(!uvm_component::m_config_deprecated_warned)begin`uvm_warning("UVM/CFG/SET/DPR","get/set_config_* API has been deprecated. Use uvm_config_db instead.")uvm_component::m_config_deprecated_warned=1;endcs=uvm_coreservice_t::get();top=cs.get_root();top.set_config_object(inst_name,field_name,value,clone);endfunction
// component-level setting. See <uvm_component::set_config_string> for// details on setting configuration.functionvoidset_config_string(stringinst_name,stringfield_name,stringvalue);uvm_roottop;uvm_coreservice_tcs;if(!uvm_component::m_config_deprecated_warned)begin`uvm_warning("UVM/CFG/SET/DPR","get/set_config_* API has been deprecated. Use uvm_config_db instead.")uvm_component::m_config_deprecated_warned=1;endcs=uvm_coreservice_t::get();top=cs.get_root();top.set_config_string(inst_name,field_name,value);endfunction`endif