Usage : `uvm_do vs `uvm_send

Hi All,

consider an uvm_sequence code

====================

class my_seq extends uvm_sequence #(packet);

`uvm_object…

function new…

virtual task body();

packet transaction;

for (int i=0; i<3; i++)begin

`uvm_do(transaction)

end

transaction.last_item=1;

`uvm_send(transaction)

endtask

endclass

==========================

I do understand the difference between uvm_do and uvm_send

But, here I would like to understand the significance of those two.

For 3 transactions, `uvm_do has been used; means, three times a transaction will be created and randomized.

For the 4th transaction, `uvm_send has been used; means last transaction, no randomization, it should have the previous randomized value.

Can I say this?

" the combinations of uvm_do and uvm_send will be used if two consecutive transactions wants to have the same value"

Kindly share your opinion on this.

Thank You,

Don’t use any uvm_do/uvm_send macros.

You should use start_item()/finish_item() instead. This gives you complete control over the creation and configuration of the sequence item.