Can i use uvm_create only once?

The `uvm_do macros are just prepackaged calls to the sequence API with a bit of sugar for creating items and randomizing them added on top. While they’re fine for beginners, most experts recommend using start_item() and finish_item() directly.

You needn’t do a `uvm_create every time if you already have a created object. You can just do:


// create just once
`uvm_create(trans);

// randomize and send
trans.randomize();
`uvm_send(trans);

// do procedural updates and send
trans.field1 = 4;
trans.field2 = 3;
`uvm_send(trans);