Uvm_config_db access issue

Hi,

I have two scoreboards in my tb, each in different environments.

my_sb1 in my_env1—it has interface my_interface1
my_sb2 in my_env2

my_sb1 extends my_sb2

In my_sb1 scoreboard build_phase I’m using uvm_config_db to get interface signals from my_interface1.But fatal error is coming.
I’m sure the syntax for uvm_config_db is correct.

why I’m not able to access interface signals through uvm_config_db ??

Thanks in advance

In reply to kalyanib:

If this happens something is wrong with your implementation. Please note NEVER use virtual interfaces in TL components like scoreboards. These elements does not know anything about the timing which is behind thepinlevel signals.

In reply to kalyanib:

Please check:

  • Where did you set virtual interface, did you provide correct path to config_db when you set?
  • Did you provide correct path to config_db when you get?
    Provide us code where you set/get config_db.

About shr_sue mentioned that we never use virtual interface in scoreboard. I don’t totally agree with him: Once you verify complex designs, crazy scenarios. I think it’s useful to use virtual interface signals/timing (of course, it should be confirmed by designers).

Hi Chris,
below is my code
In rxif_tb_top.sv I’m doing config_db set

uvm_config_db#(virtual rx_misc_interface)::set(null ,“uvm_test_top”, “rx_misc_intf”, dut_wrapper.rx_misc_intf);

In scoreboard I’m using config_db get

class rx_scoreboard
#(type T_POSTED = rx_sb_transaction,
type T_CHECKED = rx_sb_transaction)
extends pw_scoreboard #(T_POSTED, T_CHECKED);

// This bit determines whether to tolerate drops or not
bit pw_enable_drop_without_error = 0;
uvm_phase m_run_phase;

uvm_component_param_utils_begin(rx_scoreboard #(T_POSTED,T_CHECKED)) uvm_field_int(pw_enable_drop_without_error,UVM_ALL_ON)
`uvm_component_utils_end

virtual interface rx_misc_interface rx_misc_intf;

// Create an instance
function new(string name=“rx_scoreboard”, uvm_component parent=null);
super.new(name, parent);
display_exp_act = 1;
endfunction: new

//BUILD
function void build_phase (uvm_phase phase);
super.build_phase(phase);
uvm_info(get_full_name( ),"BUILD PHASE ", UVM_LOW) if(!uvm_config_db#(virtual rx_misc_interface)::get(this, "*", "rx_misc_intf", rx_misc_intf)) uvm_fatal(this.get_type_name(), “failed to get vif object”)
`uvm_info(get_full_name( ),“BUILD PHASE COMPLETE.”, UVM_LOW)

endfunction : build_phase

For the above code I’m getting FATAL error

In reply to kalyanib:

There is mismatched path when you set and get. Please change:


if(!uvm_config_db#(virtual rx_misc_interface)::get(null, "uvm_test_top", "rx_misc_intf", rx_misc_intf))
`uvm_fatal(this.get_type_name(), "failed to get vif object")

Or change config db set function.

Thanks Chris,

It’s working