// demand, and passed and stored by reference.//------------------------------------------------------------------------------classuvm_queue#(typeT=int)extendsuvm_object;conststaticstringtype_name="uvm_queue";typedefuvm_queue#(T)this_type;staticlocalthis_typem_global_queue;protectedTqueue[$];// Function: new//// Creates a new queue with the given ~name~.functionnew(stringname="");super.new(name);endfunction
typedefuvm_queue#(T)this_type;`uvm_object_param_utils(uvm_queue#(T))`uvm_type_name_decl("uvm_queue")staticlocalthis_typem_global_queue;protectedTqueue[$];// Function -- NODOCS -- new//// Creates a new queue with the given ~name~.// @uvm-ieee 1800.2-2020 auto 11.3.2.1functionnew(stringname="");super.new(name);endfunction
// Blocks until not empty// @uvm-ieee 1800.2-2020 auto 11.3.2.12virtualtaskwait_until_not_empty();wait(queue.size()>0);endtaskvirtualfunctionvoiddo_copy(uvm_objectrhs);this_typep;super.do_copy(rhs);if(rhs==null||!$cast(p,rhs))return;queue=p.queue;endfunctionvirtualfunctionstringconvert2string();return$sformatf("%p",queue);endfunction