Requesting help over a timeout

Hi

I have implemented a very simple virtual sequence which runs on a virtual sequencer. I am calling a sequence from this.
However i am seeing a timeout . Here are the 2 sequences. I have pasted my full env code since its a bit long…


//Virtual sequence 
class demo_vseq extends uvm_sequence;
  `uvm_object_utils(demo_vseq)
  `uvm_declare_p_sequencer(vseqr);
  
  seqr intfSeqr;//This is the sequencer thats connected to driver. Its handle is present in vseqr
    /*Function : new
  *	Constructor*/
  function new(string name = "demo_vseq");
    super.new(name);
  endfunction : new
  
  //Body 
  virtual task body();
    
    if(!$cast(intfSeqr,p_sequencer.leafSeqr)) begin 
      $fatal("Cast failure");
    end
    
    $display("m sequencer is %s",m_sequencer.get_name());
    send_via_do();
  endtask : body
  
  task send_via_do();

    demo_seq newSeq;

    `uvm_do_on(newSeq,intfSeqr);

  endtask :  send_via_do
  
endclass: demo_vseq



//real sequence (demo_seq)
/*Class: demo_seq
*	Sequence which sends a simple trans item */
class demo_seq extends uvm_sequence#(trans); //This runs on "seqr" sequencer
  `uvm_object_utils(demo_seq);
 // `uvm_declare_p_sequencer(seqr)
  
  /*Function : new
  *	Constructor*/
  function new(string name = "demo_seq");
    super.new(name);
  endfunction : new
  
  //Body 
  virtual task body();
    
    $display("HERE");
    //send_via_start();
    $display("HERE1");

    send_via_do();

  endtask : body
  
  task send_via_do();
    //Item 
    trans myTr;
    myTr = trans::type_id::create("myTr");
    myTr.str = "from_demo_seq_do";
    myTr.sType = "req";    
    `uvm_do(myTr);       
  endtask :  send_via_do
    
endclass : demo_seq

I see the hang in the uvm_do. If I run the demo_seq as it is, i donot see a hang. I am unable to figure out why …
Any help is greatly appreciated

Thanks
Venkatesh

In reply to Venkatesh Maddibande Sheshadrivasan:
In your case it does not make sense to use a virtual sequence because you have only 1 agent and 1 sequence (demo_seq) running.
See the code below:

//Virtual sequence 
class demo_vseq extends uvm_sequence;
  `uvm_object_utils(demo_vseq)
 
  seqr intfSeqr;//This is the sequencer thats connected to driver. Its handle is present in vseqr
  demo_seq ds;

    /*Function : new
  *	Constructor*/
  function new(string name = "demo_vseq");
    super.new(name);
  endfunction : new
 
  //Body 
  virtual task body();
 
// The seqr handle has to be passed in the agent or env to the
// config_db
 if (!uvm_config_db #(seqr)::get(null, get_full_name(), "your_sequencer", intfSeqr))
    `uvm_error(get_type_name(), "Config Error uvm_config_db cannot find sequencer")
 
 ds = demo_seq::type_id::create("ds");
 repeat (10) begin
   void'(ds.randomize());
   ds.start(intfSeqr);   // starting the sequence
 end  
endtask : body  
endclass: demo_vseq
 
 
 
//real sequence (demo_seq)
/*Class: demo_seq
*	Sequence which sends a simple trans item */
class demo_seq extends uvm_sequence#(trans); //This runs on "seqr" sequencer
  `uvm_object_utils(demo_seq);
 
  /*Function : new
  *	Constructor*/
  function new(string name = "demo_seq");
    super.new(name);
  endfunction : new
 
  //Body 
  virtual task body();
     trans myTr;
     myTr = trans::type_id::create("myTr");
     start_item(myTr);
     void'(myTr.randomize() with {str ==  "from_demo_seq_do"; sType == "req";};)
     finish_item(myTr);
  endtask : body
 
 /*
  task send_via_do();
    //Item 
    trans myTr;
    myTr = trans::type_id::create("myTr");
    myTr.str = "from_demo_seq_do";
    myTr.sType = "req";    
    `uvm_do(myTr);       
  endtask :  send_via_do
*/ 
endclass : demo_seq