You can use it like normal queue, but as its class based data type, it needs to be created. This queue then can be passed to different object/components through config_db. Queue access methods are similar to SV queue with few additional methods.
class env extends uvm_env;
uvm_queue#(string) my_queue;
//Build
function void buil_phase(uvm_phase phase);
my_queue = uvm_queue#(string)::type_id::create("my_queue");
//Or, returns singleton instance of global queue with string data type
my_queue = get_global_queue();
endfunction
endclass
If I use the queue in my transaction shouldn’t I create it there?
3.How I define the queue to be a queue of array of bit (bit[31:0])?
4.What is the adventage of using uvm_queue over regular systemVerilog queue?