uvm_do(SEQ_OR_ITEM) macro takes as an argument a uvm_sequence_item variable or object. The argument is created using `uvm_create if necessary

I am seeing below information in UVM 1.1 class reference .

`uvm_do(SEQ_OR_ITEM)

This macro takes as an argument a uvm_sequence_item variable or object. The argument is created using `uvm_create if necessary.

Here does it mean that if object is already created for sequence item than it will not be created using ùvm_create ?
Because in the sentence it is mentioned that if necessary than only it will create .

In reply to ravin:
This was a mistake in the UVM 1.1 and 1.2 documentation. I it has been corrected in the upcoming UVM IEEE 1800.2 standard.

Here’s what that macro expands out to

begin
   uvm_sequence_base __seq;
   begin
      uvm_object_wrapper w_;
      w_ = SEQ_OR_ITEM.get_type();
      $cast(SEQ_OR_ITEM , create_item(w_, m_sequencer, "SEQ_OR_ITEM"));
   end
   if (!$cast(__seq,SEQ_OR_ITEM)) 
     start_item(SEQ_OR_ITEM, -1);
   if ((__seq == null || !__seq.do_not_randomize) && !SEQ_OR_ITEM.randomize()  with {} )
     begin
        begin
	   if (uvm_report_enabled(UVM_NONE,UVM_WARNING,"RNDFLD"))
	     uvm_report_warning ("RNDFLD", "Randomization failed in uvm_do_with action", UVM_NONE, "uvm_do.sv", 8);
	end
     end
   if (!$cast(__seq,SEQ_OR_ITEM)) 
     finish_item(SEQ_OR_ITEM, -1);
   else 
     __seq.start(m_sequencer, this, -1, 0);
end

We strongly recommend not using the `umm_do macro and instead learn the 4 simple steps to execute an item or the 3 simple steps to execute a sequence. From there you can modify the code to suit your needs.

ITEM_TYPE ITEM;
ITEM = ITEM_TYPE::type_id::create("ITEM");            // 1 create
start_item(ITEM);                                     // 2 start_item
if (!(ITEM.randomize() with {/* your constraints */}) // 3 randomize
   `umm_error("RNDFLD","Randomization failed")
finish_item(ITEM);                                    // 4 finish_item

SEQ_TYPE SEQ;
SEQ = SEQ_TYPE::type_id::create("SEQ");              // 1 create
if (!(SEQ.randomize() with {/* your constraints */}) // 3 randomize
   `umm_error("RNDFLD","Randomization failed")
start(ITEM,this);                                    // 4 start

In reply to dave_59:

Thanks Dave.

In reply to dave_59: i am trying to override this UVM_WARNING with UVM_ERROR using set_report_severity_id_override(UVM_WARNING,“RNDFLD”,UVM_ERROR) but its not working. i am doing it in my environment and in end_of_elaboration_phase. am i doing it right?

In reply to samuduru:

Since umm_sequence is not extended from umm_report_object, all messages use the global report object in uvm_top. So do

uvm_top.set_report_severity_id_override(UVM_WARNING,"RNDFLD",UVM_ERROR) ;

In reply to dave_59:

In reply to samuduru:
Since umm_sequence is not extended from umm_report_object, all messages use the global report object in uvm_top. So do

uvm_top.set_report_severity_id_override(UVM_WARNING,"RNDFLD",UVM_ERROR) ;

i tried doing this in my environment and in base test but its not working. i also tried set_report_severity_override but no use. Appreciate your help on this. Thanks.

In reply to samuduru:

We strongly recommend not using the `umm_do macro and instead learn the 4 simple steps to execute an item or the 3 simple steps to execute a sequence. From there you can modify the code to suit your needs.

In reply to dave_59:
I agree but i am in middle of project and really have no time to change all the existing sequences. so i was trying to change severity of messages. any other alternative solution?