Location of uvm_config_db(uvm_object) ::set/get

Hello Team,

I am new user of UVM-1.1d and using Questasim-10.2c. I have small query regarding config_db for object.

I am trying to call the write method defined in coverage model from driver and monitor by creating its object like this:

coverage cvg;

cvg = coverage::type_id::create(“cvg”, this).

from two different places from driver and monitor, and giving error of multiple definition of object naturally.
So i am trying to set the object of coverage from the place where it can be taken and casted to the uvm_object type
and can be used to call the write() method defined in coverage model. I need help in knowing where to set the object using uvm_config_db and where to get this object and in which phase will help me out a lot. My driver, monitor and sequencer are in agent file. Please help and guide.

Thanks and Regards
Sunil Sharma

Hi,

Regarding the error when you try to create cvg object in monitor and drive using create method , seems like you kept string name same at both place else no one would stop to create two object of class
E.g -

cvg = coverage::type_id::create("cvg_monitor", this)
cvg = coverage::type_id::create("cvg_driver", this)

Another way is to have analysis port-export, which would be more idle way
For the coverage collecting.

-Vinay Jain
V4verification.com

In reply to Vinay Jain:

Hello Vinay,

Thank you. I am able to resolve it. Thanks.

With Regards
Sunil Sharma