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

Thanks

Siraj

Link to post
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 post
Share on other sites
  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...