Hi ,
As per the UVM Library code, uvm_object_registry is called a lightweight proxy.
//------------------------------------------------------------------------------
//
// CLASS: uvm_object_registry #(T,Tname)
//
// The uvm_object_registry serves as a lightweight proxy for a <uvm_object> of
// type ~T~ and type name ~Tname~, a string. The proxy enables efficient
// registration with the <uvm_factory>. Without it, registration would
// require an instance of the object itself.
//
// See section below for information on using uvm_component_registry.
//
//------------------------------------------------------------------------------
However, As per the class definition :
local static this_type me = get();
// Function: get//// Returns the singleton instance of this type. Type-based factory operation// depends on there being a single proxy instance for each registered type.
static function this_type get();
if (me == null) begin
uvm_coreservice_t cs = uvm_coreservice_t::get();
uvm_factory factory=cs.get_factory();
me = new;
factory.register(me);
end
return me;
endfunction
Here, Inside get() function, we are creating object of this class. Then, Why it is called as lightweight proxy?
Thanks,
Meet