Understanding the Real Difference Between uvm_resource_db and uvm_config_db

Hi everyone,

I am trying to understand the actual reason why UVM provides both uvm_resource_db and uvm_config_db.

After reading the source code and documentation, I noticed that uvm_config_db is built on top of uvm_resource_db and internally uses the resource database.

However, I still have some conceptual doubts:

  1. If the UVM inventors are internally using uvm_resource_db underneath, why was uvm_config_db created at all? What specific problem was it trying to solve?

  2. Looking at the syntax, the major difference I see is:

    • uvm_resource_db uses scope as a string.

    • uvm_config_db uses (cntxt, inst_name), where cntxt is a uvm_component handle.

    But ultimately both approaches resolve to a hierarchy path. If both end up using paths, what is the practical difference?

  3. What flexibility or capability does uvm_config_db provide that cannot be achieved directly with uvm_resource_db?

  4. In a real verification project, when would an engineer intentionally choose uvm_resource_db over uvm_config_db?

I am looking for an explanation from a practical verification-engineering perspective rather than just the API differences.

Thanks in advance.