// and name. Resources are set to the <default_precedence> initially,// and may be set to a higher or lower precedence as desired.intunsignedprecedence;// variable: default_precedence//// The default precedence for an resource that has been created.// When two resources have the same precedence, the first resource// found has precedence.//staticintunsigneddefault_precedence=1000;// Function: new//// constructor for uvm_resource_base. The constructor takes two// arguments, the name of the resource and a regular expression which// represents the set of scopes over which this resource is visible.functionnew(stringname="",strings="*");super.new(name);set_scope(s);modified=0;read_only=0;precedence=default_precedence;endfunction
protectedstringscope;//@uvm-compat provided for compatibility with 1.2intunsignedprecedence;//@uvm-compat provided for compatibility with 1.2staticintunsigneddefault_precedence=1000;// @uvm-ieee 1800.2-2020 auto C.2.3.2.1functionnew(stringname="",strings="<not provided>");//string argument added for compatibilitysuper.new(name);modified=0;read_only=0;// begin lines provided for compatibility with 1.2if(s=="<not provided>")scope=s;//don't call glob_to_re unless legacy usageelsescope=uvm_glob_to_re(s);precedence=default_precedence;// end lines provided for compatibility with 1.2endfunction
purevirtualfunctionuvm_resource_poolget_resource_pool();// @uvm-ieee 1800.2-2020 auto F.4.1.4.23purevirtualfunctionvoidset_resource_pool_default_precedence(intunsignedprecedence);purevirtualfunctionintunsignedget_resource_pool_default_precedence();// Function: get_phase_hopper//// Returns the <uvm_phase_hopper> (singleton) instance for this environment//// @uvm-contrib For potential contribution to 1800.2purevirtualfunctionuvm_phase_hopperget_phase_hopper();localstaticuvm_coreservice_tinst;// @uvm-ieee 1800.2-2020 auto F.4.1.3staticfunctionuvm_coreservice_tget();if(inst==null)