Difference between using configuration space vs configuration object

I read this in UVM Cookbook.
In order to keep components modular and reusable, drivers and monitors should not retrieve their virtual interface handles directly from the configuration space, but only from their configuration object. The test class is the correct place to ensure that the virtual interfaces are assigned to the right verification components via their configuration objects.

Can someone explain this in a simple terms. From my understanding we retrieve a interface handle when we do a get call from a driver to the configuration space.

Each agent should have an associated configuration object which contains all of the various parameters that control the behavior of the agent. One element of the configuration object should be the virtual interface handle used by the driver and monitor.

The test class should create and configure the required configuration object for each agent. Part of this process is to get the virtual interface handle passed from the testbench, and assign it to the configuration object. The configuration object is then stored in the configuration database for the agent to retrieve.

Thanks for replying,
I still have one doubt. why can’t I just retrieve interface handle directly from config space? It would be very easy as it will involve just a set in tb_top followed by get in driver/monitor.

An agent can have many different configuration parameters along with a virtual interface. By encapsulating all the configuration parameters and virtual interface into a single configuration object, it makes coding simpler and reduces the number of objects in the configuration database, improving performance.

2 Likes