Hello,
I have a class with uvm_config_db #()::get method which tries to access a parameterized interface. This interface is set in top_tb.
Below is the code snippet. In the code below “uvm_config_db #(virtual int_ctrl_if#(dac_lib::param_cfg_c#()::NUM))::get(”, the NUM points to 5.
So my question is , is there any way where in a typedef of a class can be declared commonly (somewhere like a package) visible space so that the overridden class declaration parameter can be used in the uvm_config_db::get method as shown below (which would point NUM to 8 instead of 5).
module top_tb;
parameter NUM = 8;
typedef param_cfg_c #(.NUM(NUM)) param_cfg_t;
....
endmodule;
package dac_lib;
class param_cfg_c #(parameter int NUM = 5);
.....
endclass
endpackage;
package my_lib;
class base_test extends uvm_test;
....
function void build_phase(uvm_phase phase);
uvm_config_db #(virtual int_ctrl_if#(dac_lib::param_cfg_c#()::NUM))::get(null, get_dut(), "int_if", cfg.int_if)
endfunction;
endclass;
.....
endpackage;