Neither the item's sequencer nor dedicated sequencer has been supplied to start item in m_bseq

Hi,
I have a sequence and standard sequencer.
I am starting the sequence via my test on the sequencer but, I am getting the following error:

neither the item’s sequencer nor dedicated sequencer has been supplied to start item in m_bseq

to give a little insight into my code.
I have the following files.
sequence.sv - has the start_item to start the item post-creation.
test.sv - in the run_phase initiates the start of the sequence on the sequencer.
sequencer.sv - this is pretty standard code.

sequencer.sv:

`include "uvm_macros.svh"
import uvm_pkg::*;
class Sequencer extends uvm_sequencer #(SequenceItem);
  `uvm_component_utils(Sequencer)

  extern function new (string name, uvm_component parent);
endclass: Sequencer

function Sequencer::new(string name, uvm_component parent);
  super.new(name,parent);
endfunction: new

sequence.sv:

`include "uvm_macros.svh"
import uvm_pkg::*;
class BaseSequence extends uvm_sequence #(SequenceItem);
  `uvm_object_utils(BaseSequence)
  //`uvm_declare_p_sequencer(Sequencer)

  Config m_config;

  extern function new (string name = "");
  extern task body;
endclass: BaseSequence

function BaseSequence::new(string name = "");
 super.new(name);
endfunction: new

task BaseSequence::body();
  if(starting_phase != null) starting_phase.raise_objection(this);
  repeat(8)
  begin
    SequenceItem m_seqItem;
    m_seqItem=SequenceItem::type_id::create("m_seqItem");
    start_item(m_seqItem);
    if(!m_seqItem.randomize()) `uvm_warning(get_type_name(),$sformatf("Randomization Failed."))
    finish_item(m_seqItem);
  end
  if(starting_phase != null) starting_phase.drop_objection(this);
endtask: body

test.sv

`include "uvm_macros.svh"
import uvm_pkg::*;
class BaseTest extends uvm_test;
  `uvm_component_utils(BaseTest)

  Env m_env;
  BaseSequence m_bseq;
  Config m_config;
 
  extern function new(string name, uvm_component parent);
  extern function void build_phase(uvm_phase phase);
  extern function void connect_phase(uvm_phase phase);
  extern function void end_of_elaboration_phase(uvm_phase phase);
  extern function void start_of_simulation_phase(uvm_phase phase);
  extern task run_phase(uvm_phase phase);
  extern function void extract_phase(uvm_phase phase);
  extern function void check_phase(uvm_phase phase);
  extern function void report_phase(uvm_phase phase);
  extern function void final_phase(uvm_phase phase);
endclass: BaseTest

function BaseTest::new(string name, uvm_component parent);
  super.new(name,parent);
endfunction

function void BaseTest::build_phase(uvm_phase phase);
  m_env = Env::type_id::create("m_env",this);
endfunction: build_phase

function void BaseTest::connect_phase(uvm_phase phase);
endfunction: connect_phase

function void BaseTest::end_of_elaboration_phase(uvm_phase phase);
endfunction: end_of_elaboration_phase

function void BaseTest::start_of_simulation_phase(uvm_phase phase);
  if(!uvm_config_db#(Config)::get(this,"m_env","Config",m_config))
    `uvm_error(get_type_name(),$sformatf("Unable to get Config"))
  m_config.coverage_enable = 0;
  m_config.count = 4;
endfunction: start_of_simulation_phase

task BaseTest::run_phase(uvm_phase phase);
  phase.raise_objection(this);
  m_bseq = BaseSequence::type_id::create("m_bseq");
  if (!m_bseq.randomize()) `uvm_error("","Randomization failed")
  m_bseq.set_starting_phase(phase);
  m_bseq.start(m_env.m_Agent.m_seqr);
  uvm_top.set_timeout(1ms);
  phase.drop_objection(this);
endtask

function void BaseTest::extract_phase(uvm_phase phase);
endfunction: extract_phase

function void BaseTest::check_phase(uvm_phase phase);
endfunction: check_phase

function void BaseTest::report_phase(uvm_phase phase);
endfunction: report_phase

function void BaseTest::final_phase(uvm_phase phase);
endfunction: final_phase

Thanks for your time and pointer.

Regards

In reply to UVM_Xplorer:

My guess is Sequencer is null i.e not created within Agent .
Please share the code for Agent class .
Also it would be easier to debug if you can point to the complete executable code on edaplayground .
That way we could execute and observe the output as well .

In reply to ABD_91:

Hi,
I did create it in the agent. my code from the agent is as below.

agent.sv:

`include "uvm_macros.svh"
import uvm_pkg::*;
class Agent extends uvm_agent;
  `uvm_component_utils(Agent)

  uvm_analysis_port #(SequenceItem) analysis_port;

  Config m_config;
  Sequencer m_seqr;
  Driver m_drvr;
  Monitor m_mon;
  bit m_is_active;

  extern function new(string name, uvm_component parent);
  extern function void build_phase(uvm_phase phase);
  extern function void connect_phase(uvm_phase phase);
  extern function uvm_active_passive_enum get_is_active();
endclass: Agent

function uvm_active_passive_enum Agent::get_is_active();
  if(m_is_active == -1) m_is_active = m_config.is_active;
  return uvm_active_passive_enum'(m_is_active);
endfunction: get_is_active

function Agent::new(string name, uvm_component parent);
  super.new(name, parent);
  analysis_port = new("analysis_port",this);
endfunction: new

function void Agent::build_phase(uvm_phase phase);
  if(!uvm_config_db#(Config)::get(this,"","Config",m_config))
    `uvm_error(get_type_name(),$sformatf("config not found"))
  m_mon = Monitor::type_id::create("m_mon",this);
  if(get_is_active() == UVM_ACTIVE)
  begin
    m_drvr = Driver::type_id::create("m_drvr",this);
    m_seqr = Sequencer::type_id::create("m_seqr",this);
  end
endfunction: build_phase

function void Agent::connect_phase(uvm_phase phase);
  if(m_config.vif == null) 
    `uvm_fatal(get_type_name(),$sformatf("virtual interface is not set!"))
  m_mon.Intf_vi=m_config.vif;
  m_mon.analysis_port.connect(analysis_port);

  if(get_is_active() == UVM_ACTIVE)
  begin
    m_drvr.seq_item_port.connect(m_seqr.seq_item_export);
    m_drvr.Intf_vi = m_config.vif;
  end
endfunction: connect_phase

Thanks for your time.

In reply to UVM_Xplorer:

Within UVM the typedef for uvm_active_passive_enum is declared as :

 typedef enum bit { UVM_PASSIVE=0, UVM_ACTIVE=1 } uvm_active_passive_enum; 

Your variable m_is_active is a bit-type i.e unsigned type with default value of 0 .


function uvm_active_passive_enum Agent::get_is_active();
  if(m_is_active == -1) m_is_active = m_config.is_active;
  return uvm_active_passive_enum'(m_is_active);
endfunction: get_is_active

So if condition is false and the value returned is uvm_active_passive_enum’( 0 ) i.e UVM_PASSIVE

Hence you aren’t creating Driver and Sequencer within the Agent .

In reply to ABD_91:

Thank you so much for catching it.
Really appreciate it.