Sequence not starting without raise/drop objection

This is the UVM TB I’m using:

I made some small changes in the run_phase of file mem_wr_rd_test.sv to comment out the raise/drop objection (just some experiments) and add a couple of prints, like the snippet below:


  //---------------------------------------
  // run_phase - starting the test
  //---------------------------------------
  task run_phase(uvm_phase phase);
    
    //phase.raise_objection(this);   -------> comment out
    `uvm_info(get_type_name(), "Before seq.start", UVM_LOW)  // ----------> New print added
    seq.start(env.mem_agnt.sequencer);
    `uvm_info(get_type_name(), "After seq.start", UVM_LOW) // ----------> New print added
    //phase.drop_objection(this);   --------> comment out
    
    //set a drain-time for the environment if desired
    phase.phase_done.set_drain_time(this, 50);
  endtask : run_phase

After executing the new code, I noticed that the print after seq.start is never printed, however, the test was able to finished. I wonder how the run_phase ends without having all the code executed? BTW, before removing the raise/drop objection, everything was fine.

Any hint is appreciated!

In reply to cyy0825:
Do you have somewhereelse an objection mechanism implemented. If not the simulation stucks at run time zero.

In reply to chr_sue:

In reply to cyy0825:
Do you have somewhereelse an objection mechanism implemented. If not the simulation stucks at run time zero.

Thank you.

I don’t have an objection mechanism implemented in other places.

I think I’ve seen somewhere that if there’s no objection raised then the run_phase will just end. That kinda explains it. But then I modified the code a little bit to add a while(1) loop, I saw different results when putting while(1) loop in different places. (Theoretically both case should be able to finish I think?)

  1. Putting it before seq.start, the uvm_info inside the while loop is printed forever and test hang.

  //---------------------------------------
  // run_phase - starting the test
  //---------------------------------------
  task run_phase(uvm_phase phase);
 
    //phase.raise_objection(this);   -------> comment out
    while(1) begin
      `uvm_info(get_type_name(), "Before seq.start", UVM_LOW)  // ----------> New print added
    end
    seq.start(env.mem_agnt.sequencer);
    `uvm_info(get_type_name(), "After seq.start", UVM_LOW) // ----------> New print added
    //phase.drop_objection(this);   --------> comment out
 
    //set a drain-time for the environment if desired
    phase.phase_done.set_drain_time(this, 50);
  endtask : run_phase

  1. Putting it after seq.start, the uvm_info never printed and test was able to finish (PASS).

  //---------------------------------------
  // run_phase - starting the test
  //---------------------------------------
  task run_phase(uvm_phase phase);
 
    //phase.raise_objection(this);   -------> comment out
    `uvm_info(get_type_name(), "Before seq.start", UVM_LOW)  // ----------> New print added
    seq.start(env.mem_agnt.sequencer);
    while(1) begin
      `uvm_info(get_type_name(), "After seq.start", UVM_LOW) // ----------> New print added
    end
    //phase.drop_objection(this);   --------> comment out
 
    //set a drain-time for the environment if desired
    phase.phase_done.set_drain_time(this, 50);
  endtask : run_phase

In reply to cyy0825:

The message is if there is no objection implemented the seq start command will be ignored and the run_phase comes to its end. All what you are doing before starting your sequence will be executed. Thus your while loop befor the start command is running forever. It never comes to the seq start and the run_phase can not come to its end.