How to get the output of find_override_by_name method?

class ahb_driver extends uvm_driver#(ahb_tx);
`uvm_component_utils(ahb_driver);
...
function void end_of_elaboration_phase (uvm_phase phase);
	uvm_object_wrapper wrapper; // not sure if wrapper type should take the output of find override method, just guessed
	$display("inside end of elaboration in driver");
        wrapper = find_override_by_name("ahb_tx",{super.get_full_name(),".",""}); // error here
       	$display(wrapper); 
endfunction
...
endclass

** Error: (vsim-3978) ahb_driver.sv(36): Cannot assign a packed type to an unpacked type.

Time: 0 ns Iteration: 0 Region: /file_list_svh_unit::ahb_driver File: file_list.svh

** Error: (vsim-3043) ahb_driver.sv(36): Unresolved reference to ‘find_override_by_name’.

Region: /file_list_svh_unit::ahb_driver

Help me to resolve this error. ‘ahb_tx’ is my requested type and ‘bad_tx’ is my override type. I am expecting the find_override_by_name should return the override type. Thank you.

In reply to rakesh2learn:
It is unclear what you want to do. Are you want to know your overrides only or do you want to override something.
Which overrides are used for your testbench you know after the testbench was constructed and connected. This is in the end_elaboration_phase/start_of_simulation_phase of your test.
There you can execute
factory.print();
This prints you all overrides available.

In reply to chr_sue:

My intent here is to learn how “find_override_by_name” or “find_override_by_type” can be used in our testbench and what is their output. My understanding is that these methods help us to know what our override is. So yes, I want to know only what my overrides is using find_override_by_name.

I have already experimented using methods like set_inst_override_by_type from my test file and using factory.print() to see my overrides.

In reply to rakesh2learn:

The simply call
factory.function uvm_object_wrapper find_override_by_name (string requested_type_name, string full_inst_path)
with your requested type_name and the path. In a first approach let the path open.

In reply to rakesh2learn:
Hi Rakesh,
Not sure if this approach is useful in real life, but since you mentioned you are learning/experimenting - below are some comments:

** Error: (vsim-3043) ahb_driver.sv(36): Unresolved reference to ‘find_override_by_name’.

Region: /file_list_svh_unit::ahb_driver

That error tells you - find_override_by_name is NOT a method at component, rather it is an internal method in factory.

Try:

class ahb_driver extends uvm_driver#(ahb_tx);
`uvm_component_utils(ahb_driver);
...
function void end_of_elaboration_phase (uvm_phase phase);
	uvm_object_wrapper wrapper; // not sure if wrapper type should take the output of find override method, just guessed
	$display("inside end of elaboration in driver");
        wrapper = factory.find_override_by_name("ahb_tx",{super.get_full_name(),".",""}); // error here
       	$display(wrapper); 
endfunction
...
endclass

Didn’t try it myself, so you are on your own :-)

Regards
Srini
www.go2uvm.org