Jump to content
Sign in to follow this  

Usage of uvm_resource_db with multiple instance of a class

Recommended Posts

Hi ,

I am trying to use 2 instance of BFM which has uvm_resource_db...::read_by_name(..."INTF", my_intf)

and from tb_top i am trying to set TWO different interface to these TWO BFM instances .

like in tb_top

bfm bfm_inst1;

bfm bfm_inst2;

uvm_resource_db..::set(bfm_inst1, "INTF", INTF1);

uvm_resource_db..::set(bfm_inst1, "INTF", INTF2);

Will this work ?

My concern is how uvm will identify each INTF in different bfm_inst



Share this post

Link to post
Share on other sites

Generally, you wouldn't use uvm_resource_db directly. Instead you'd use uvm_config_db. You would identify the different instances by their instance path:


uvm_config_db#(...)::set( this, "path.to.bfm1", "INTF", INTF1 );

uvm_config_db#(...)::set( this, "path.to.bfm2", "INTF", INTF2 );


Then in the "bfm" component:


uvm_config_db#(...)::get( this, "", "INTF", my_intf );


Because each "bfm" will have a different fullname, the "this" will select the right interface.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this