endfunction// @uvm-ieee 1800.2-2020 auto F.3.1.1functionuvm_core_stateget_core_state();if(m_uvm_core_state.size()==0)returnUVM_CORE_UNINITIALIZED;elsereturnm_uvm_core_state[0];endfunction// Function: uvm_init// Implementation of uvm_init, as defined in section// F.3.1.3 in 1800.2-2020.//// *Note:* The LRM states that subsequent calls to <uvm_init> after// the first are silently ignored, however there are scenarios wherein// the implementation breaks this requirement.//// If the core state (see <get_core_state>) is ~UVM_CORE_PRE_INIT~ when <uvm_init>,// is called, then the library can not determine the appropriate core service. As// such, the default core service will be constructed and a fatal message
// @uvm-contrib This API represents a potential contribution to IEEE 1800.2// @uvm-ieee 1800.2-2020 auto F.3.1.3functionvoiduvm_init(uvm_coreservice_tcs=null);uvm_default_coreservice_tdcs;if(get_core_state()!=UVM_CORE_UNINITIALIZED)beginif(get_core_state()==UVM_CORE_PRE_INIT)begin// If we're in this state, something very strange has happened.// We've called uvm_init, and it is actively assigning the// core service, but the core service isn't actually set yet.// This means that either the library messed something up, or// we have a race occurring between two threads. Either way, // this is non-recoverable. We're going to setup using the default// core service, and immediately fatal out.dcs=new();uvm_coreservice_t::set(dcs);`uvm_fatal("UVM/INIT/MULTI","Non-recoverable race during uvm_init")end
// on the sep. values shall be a queue.//----------------------------------------------------------------------------functionautomaticvoiduvm_string_split(stringstr,bytesep,refstringvalues[$]);ints=0,e=0,limit;values.delete();limit=str.len()+1;dobeginfor(s=e;e<str.len();++e)if(str[e]==sep)break;values.push_back(str.substr(s,e-1));e++;endwhile(e<limit);endfunction// Class -- NODOCS -- uvm_enum_wrapper#(T)
// after a function/task scope has been exited.//// @uvm-contrib - For potential contribution to 1800.2 standardclassuvm_shared#(typeT=int);// Variable- value// The value contained within the ref.Tvalue;endclass:uvm_shared
// @uvm-contrib Potential contribution to 1800.2// @uvm-ieee 1800.2-2020 manual F.2.10typedefenum{UVM_CORE_UNINITIALIZED,UVM_CORE_PRE_INIT,UVM_CORE_INITIALIZING,UVM_CORE_INITIALIZED,// UVM_CORE_POST_INITUVM_CORE_PRE_RUN,UVM_CORE_RUNNING,UVM_CORE_POST_RUN,UVM_CORE_FINISHED,UVM_CORE_PRE_ABORT,UVM_CORE_ABORTED}uvm_core_state;// Used to indicate a strict name vs. regex name lookup in apply_config_settingstypedefstruct{stringname;
// dereferencing. When enabled, uvm_re_match should be significantly // faster. `ifdefUVM_ENABLE_RE_MATCH_CACHEfunctionintuvm_re_match(stringre,stringstr,bitdeglob=0);uvm_regex_cachecache;chandlecached[$];intretval;cache=uvm_regex_cache::get_inst();cached=cache.get(re);if(cached.size())begin// Cache hit, use pre-compiled regexretval=uvm_re_exec(cached[0],str);endelsebegin// Cache miss, compile and cache regexchandlerexp;rexp=uvm_re_compexec(re,str,deglob,retval);if(rexp==null)begin