Jump to content

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



Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...