// apply_config_settings// ---------------------functionvoiduvm_component::apply_config_settings(bitverbose=0);uvm_resource_poolrp=uvm_resource_pool::get();uvm_queue#(uvm_resource_base)rq;uvm_resource_baser;stringname;stringsearch_name;intunsignedi;intunsignedj;// populate an internal 'field_array' with list of// fields declared with `uvm_field macros (checking// that there aren't any duplicates along the way)__m_uvm_field_automation(null,UVM_CHECK_FIELDS,"");// if no declared fields, nothing to do.
//variable to disable uvm_component::apply_config_settings();`ifdefUVM_DISABLE_APPLY_CFG_SETTINGSbitdisable_apply_cfg_settings=1;`elsestringtrace_args[$];uvm_cmdline_processorclp_inst=uvm_cmdline_processor::get_inst();bitdisable_apply_cfg_settings=clp_inst.get_arg_matches("+UVM_DISABLE_APPLY_CFG_SETTINGS",trace_args)?1:0;`endif// internal function not to be used// get the initialized singleton instance of uvm_rootstaticfunctionuvm_rootm_uvm_get_root();if(m_inst==null)beginm_inst=new();void'(uvm_domain::get_common_domain());m_inst.m_domain=uvm_domain::get_uvm_domain();end
// otherwise, returns 0.//// @uvm-ieee 1800.2-2020 auto 13.1.5.2externvirtualfunctionbituse_automatic_config();// Function: print_config//// Print_config prints all configuration information for this// component, as set by previous calls to <uvm_config_db::set()> and exports to// the resources pool. The settings are printed in the order of// their precedence.//// If ~recurse~ is set, then configuration information for all// children and below are printed as well.//// if ~audit~ is set then the audit trail for each resource is printed// along with the resource name and value//// @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2
// | typedef bit [1:0] config_mode_t;//// @uvm-contribtypedefbit[1:0]config_mode_t;// Type: config_mode_e// Enumeration for controlling component config settings.//// CONFIG_STRICT - Strictly adhere to the LRM// CONFIG_HIGHEST_PRECEDENCE - Only apply resources with highest precedence for each // field name / type handle pair// CONFIG_CHECK_NAMES - Only apply settings for fields names responding to UVM_CHECK_FIELDS op//// @uvm-contribtypedefenumconfig_mode_t{CONFIG_STRICT=2'b00,CONFIG_HIGHEST_PRECEDENCE=2'b01,CONFIG_CHECK_NAMES=2'b10}config_mode_e;// Variable: CONFIG_DEFAULT// Default configuration mode used by apply_config_settings_mode.//// @uvm-contriblocalparamconfig_mode_tCONFIG_DEFAULT=`UVM_COMPONENT_CONFIG_MODE_DEFAULT;
// mode.//// @uvm-contribexternvirtualfunctionconfig_mode_tapply_config_settings_mode();// Variable -- NODOCS -- tr_database//// Specifies the <uvm_tr_database> object to use for <begin_tr>// and other methods in the <Recording Interface>. // Default is <uvm_coreservice_t::get_default_tr_database>.uvm_tr_databasetr_database;// @uvm-ieee 1800.2-2020 auto 13.1.7.12externvirtualfunctionuvm_tr_databaseget_tr_database();// @uvm-ieee 1800.2-2020 auto 13.1.7.11externvirtualfunctionvoidset_tr_database(uvm_tr_databasedb);
// contains default behavior for build_phase()functionvoiduvm_component::build();m_build_done=1;if(use_automatic_config())apply_config_settings(get_print_config_matches());endfunction// These are the old style phase names for backward compatibility. functionvoiduvm_component::connect();return;endfunctionfunctionvoiduvm_component::start_of_simulation();return;endfunctionfunctionvoiduvm_component::end_of_elaboration();return;endfunctiontaskuvm_component::run();return;endtaskfunctionvoiduvm_component::extract();return;endfunctionfunctionvoiduvm_component::check();return;endfunctionfunctionvoiduvm_component::report();return;endfunction
//// @uvm-contrib`ifndefUVM_COMPONENT_CONFIG_MODE_DEFAULT`defineUVM_COMPONENT_CONFIG_MODE_DEFAULTCONFIG_CHECK_NAMES`endif// MACRO -- NODOCS -- `UVM_MAX_STREAMBITS//// Defines the maximum bit vector size for integral types. // Used to set uvm_bitstream_t`ifndefUVM_MAX_STREAMBITS`defineUVM_MAX_STREAMBITS4096`endif// MACRO -- NODOCS -- `UVM_PACKER_MAX_BYTES//// Defines the maximum bytes to allocate for packing an object using