I've recently started studying the UVM and have some difficulty understanding the component/object registration process with the factory. Specifically, I can't find what line of code does the actual registration.
Here is my thought/search process:
I've found that
uvm_factoryclass has aregistermethod which registers a proxy object of a given typeThis proxy object is of
uvm_component_registryclass parameterized with the type of the initially desired component/objectInside
uvm_component_registryclass there is agetmethod, which creates the proxy objectmeand registers it with the factory viafactory.register(me)callIn UVM Cookbook it says that every uvm_component should be registered with the factory by using the
uvm_component_utilsmacro, which expands to the following code snippet:typedef uvm_component_registry #(T,`"S`") type_id; static function type_id get_type(); return type_id::get(); endfunction virtual function uvm_object_wrapper get_object_type(); return type_id::get(); endfunction virtual function string get_type_name (); return type_name; endfunction
So, here I come to the root of the problem. Inside the user class extended from the uvm_component class we have only the uvm_component_utils macro, which doesn't call the get method of the uvm_component_registry. Also there are no get method calls before the build phase during which we are creating the necessary class object using the factory. It certainly works, which means that our class has been registered. The question is - how? Are there some implicit get method calls?