Why the body of sequence is running for one time, even if the repeat statement is used in it?

//body of transaction

class adder_transaction extends uvm_sequence_item;
  rand bit  [3:0]a0;
  rand bit  [3:0]b0;
  rand bit  doAdd0;
  bit  [3:0]result0;

	`uvm_object_utils(adder_transaction)



  function new(string name = "");
		super.new(name);
	endfunction
  
  constraint c{a0 inside {[1:15]};b0 inside {[1:15]};}
endclass


//body of sequence

class adder_sequence extends uvm_sequence#(adder_transaction);
     `uvm_object_utils(adder_sequence)

     function new(string name = "");
          super.new(name);
     endfunction: new
 
    task body();
      $display("body of sequence");
      repeat(15)
      begin
        
            sa_tx = adder_transaction::type_id::create("sa_tx");
               start_item(sa_tx);
                    assert(sa_tx.randomize());
               finish_item(sa_tx);
      end
     endtask: body
         
       endclass

In reply to swatisatpathy10:

Code looks good. Are you running any other sequence in parallel? Add display in loop, probably after finish_item() and check the output.

In reply to swatisatpathy10:

Don’t use assert() when randomizing a transaction. Use an ‘if’ statement to determine if the randomization() call failed.

Are you calling raise_objection() and drop_objection() in your test? If the objections aren’t handled correctly, the test sequences will end prematurely.

In reply to MayurKubavat:

thank you for your reply.

I found the error. actually there was connection problem in my code, in agent block, so the code was not running.

In reply to cgales:

Thank you very much for your reply