Right usage of uvm_resource_db v uvm_config_db

I’ve been looking for a solution to this query.
uvm_config_db is extended from uvm_resource_db. Hence uvm_resource_db becomes the parent and uvm_config_db becomes the child. As per inheritance, child inherits properties of its parent. So, if I set a component in uvm_resource_db and try to get in uvm_config_db in the same hierarchy, would it be possible? Please assist.

In reply to Athulv:

Your terms for parent and child are not correct. A parent class will instantiate an instance of a child class. You want to use the terms ‘base’ class and ‘extended’ class.

While the uvm_config_db is extended from the uvm_resource_db, you can not use them interchangably. You create a typed instance of the uvm_config_db when you use it:


uvm_config_db#(my_class)::...

You can only refer to the typed class to get()/set() the variables.