//------------------------// Group- Sequence Library DEPRECATED//------------------------`ifndefUVM_NO_DEPRECATED// Variable- seq_kind//// Used as an identifier in constraints for a specific sequence type.randintunsignedseq_kind;// For user random selection. This excludes the exhaustive and// random sequences.constraintpick_sequence{(num_sequences()<=2)||(seq_kind>=2);(seq_kind<num_sequences())||(seq_kind==0);}// Function- num_sequences// // Returns the number of sequences in the sequencer's sequence library.functionintnum_sequences();if(m_sequencer==null)return0;return(m_sequencer.num_sequences());endfunction// Function- get_seq_kind//// This function returns an int representing the sequence kind that has// been registerd with the sequencer. The return value may be used with// the <get_sequence> or <do_sequence_kind> methods.functionintget_seq_kind(stringtype_name);`uvm_warning("UVM_DEPRECATED",$sformatf("%m deprecated."))if(m_sequencer!=null)returnm_sequencer.get_seq_kind(type_name);elseuvm_report_warning("NULLSQ",$sformatf("%0s sequencer is null.",get_type_name()),UVM_NONE);endfunction// Function- get_sequence//// This function returns a reference to a sequence specified by ~req_kind~,// which can be obtained using the <get_seq_kind> method.functionuvm_sequence_baseget_sequence(intunsignedreq_kind);uvm_sequence_basem_seq;stringm_seq_type;uvm_coreservice_tcs=uvm_coreservice_t::get();uvm_factoryfactory=cs.get_factory();`uvm_warning("UVM_DEPRECATED",$sformatf("%m deprecated."))if(req_kind<0||req_kind>=m_sequencer.sequences.size())beginuvm_report_error("SEQRNG",$sformatf("Kind arg '%0d' out of range. Need 0-%0d",req_kind,m_sequencer.sequences.size()-1),UVM_NONE);endm_seq_type=m_sequencer.sequences[req_kind];if(!$cast(m_seq,factory.create_object_by_name(m_seq_type,get_full_name(),m_seq_type)))beginuvm_report_fatal("FCTSEQ",$sformatf("Factory cannot produce a sequence of type %0s.",m_seq_type),UVM_NONE);endm_seq.set_use_sequence_info(1);returnm_seq;endfunction// Task- do_sequence_kind//// This task will start a sequence of kind specified by ~req_kind~,// which can be obtained using the <get_seq_kind> method.taskdo_sequence_kind(intunsignedreq_kind);stringm_seq_type;uvm_sequence_basem_seq;uvm_coreservice_tcs=uvm_coreservice_t::get();uvm_factoryfactory=cs.get_factory();`uvm_warning("UVM_DEPRECATED",$sformatf("%m deprecated."))m_seq_type=m_sequencer.sequences[req_kind];if(!$cast(m_seq,factory.create_object_by_name(m_seq_type,get_full_name(),m_seq_type)))beginuvm_report_fatal("FCTSEQ",$sformatf("Factory cannot produce a sequence of type %0s.",m_seq_type),UVM_NONE);endm_seq.set_item_context(this,m_sequencer);if(!m_seq.randomize())beginuvm_report_warning("RNDFLD","Randomization failed in do_sequence_kind()");endm_seq.start(m_sequencer,this,get_priority(),0);endtask// Function- get_sequence_by_name//// Internal method.functionuvm_sequence_baseget_sequence_by_name(stringseq_name);uvm_sequence_basem_seq;uvm_coreservice_tcs=uvm_coreservice_t::get();uvm_factoryfactory=cs.get_factory();`uvm_warning("UVM_DEPRECATED",$sformatf("%m deprecated."))if(!$cast(m_seq,factory.create_object_by_name(seq_name,get_full_name(),seq_name)))beginuvm_report_fatal("FCTSEQ",$sformatf("Factory cannot produce a sequence of type %0s.",seq_name),UVM_NONE);endm_seq.set_use_sequence_info(1);returnm_seq;endfunction// Task- create_and_start_sequence_by_name//// Internal method.taskcreate_and_start_sequence_by_name(stringseq_name);uvm_sequence_basem_seq;