// by the `uvm_do*() and `uvm_rand_send*() macros,// or as a default sequence.//bitdo_not_randomize;protectedprocessm_sequence_process;localbitm_use_response_handler;staticstringtype_name="uvm_sequence_base";// bits to detect if is_relevant()/wait_for_relevant() are implementedlocalbitis_rel_default;localbitwait_rel_default;// Function: new//// The constructor for uvm_sequence_base. //
// or as a default sequence.//// @uvm-compat , provided for compatibility with 1.2bitdo_not_randomize;protectedprocessm_sequence_process;localbitm_use_response_handler;// bits to detect if is_relevant()/wait_for_relevant() are implementedlocalbitis_rel_default;localbitwait_rel_default;// @uvm-ieee 1800.2-2020 auto 14.2.2.1functionnew(stringname="uvm_sequence");super.new(name);m_sequence_state_mutex=new(1);
m_init_phase_daps(1);endfunctionvirtualfunctionbitget_randomize_enabled();return(do_not_randomize==0);endfunction:get_randomize_enabled// @uvm-ieee 1800.2-2020 auto 14.2.2.3virtualfunctionvoidset_randomize_enabled(bitenable);do_not_randomize=!enable;endfunction:set_randomize_enabled// Function -- NODOCS -- is_item//// Returns 1 on items and 0 on sequences. As this object is a sequence,// ~is_item~ will always return 0.//virtualfunctionbitis_item();return0;endfunction// Function -- NODOCS -- get_sequence_state
seq.reseed();seq.set_starting_phase(phase);if(seq.get_randomize_enabled()&&!seq.randomize())begin`uvm_warning("STRDEFSEQ",{"Randomization failed for default sequence '",seq.get_type_name(),"' for phase '",phase.get_name(),"'"})return;endforkbeginuvm_sequence_process_wrapperw=new();// reseed this process for random stabilityw.pid=process::self();w.seq=seq;w.pid.srandom(uvm_create_random_seed(seq.get_type_name(),this.get_full_name()));m_default_sequences[phase]=w;// this will either complete naturally, or be killed laterseq.start(this);m_default_sequences.delete(phase);