I see elab error when I try to uvm_config_db set/get on a parameterized interface type with one of its interfaces as struct type.
**GENERIC INTERFACE - Interface definition
**
interface peip_generic_if
import peip_pkg::*;
import peip_generic_components_pkg::*;
#( parameter ADDR_WIDTH=64, parameter DATA_WIDTH=64, parameter TAG_WIDTH=64, parameter interface_type = `peip_VLD_RDY_TYPE, parameter type command_struct = DEFAULT_STRUCT_TYPE, parameter type command_struct_2 = DEFAULT_STRUCT_TYPE, string name ="") ( input clk, input rst_n );
------
--------
endinterface
**DEFINE FILE - Created an interface by passing parameters to the generic interface.
**
`define pe_wtx_rlc_vld_rdy_req_if_decl \
peip_generic_if#(.DATA_WIDTH(64), .interface_type(`peip_VLD_RDY_TYPE), .command_struct(peip_rdma_pkg::rlc_wtx_sched_cmd_t))
`define pe_wtx_rlc_vld_rdy_req_if \
virtual interface `pe_wtx_rlc_vld_rdy_req_if_decl
**TEST MODULE - Created a handle and tried to do uvm_config set/get
**
module pe_wtx_tb_top_ti( pe_wtx_tb_sync_pin_if pe_wtx_pins );
`pe_wtx_rlc_vld_rdy_req_if_decl pe_wtx_rlc_vld_rdy_req_get (.clk(pe_wtx_pins.clk), .rst_n(pe_wtx_pins.i_rst_n));
Initial begin
uvm_config_db#(virtual `pe_wtx_rlc_vld_rdy_req_if_decl)::set(uvm_root::get(), "*", "vif_get", pe_wtx_rlc_vld_rdy_req_pins);
if (!uvm_config_db#(virtual `pe_wtx_rlc_vld_rdy_req_if_decl)::get(null,"", "vif_get", pe_wtx_rlc_vld_rdy_req_get)) begin
$display("UVM_ERROR virtual interface must be set for vif_get pe_wtx_tb_top_ti");
$finish();
end
end
endmodule
Elab error reported.
Error :
Error-[ICTTFC] Incompatible complex type usage
<>/pe_wtx_ulv_tb_top_ti.sv, 72
Incompatible complex type usage in task or function call.
The following expression is incompatible with the formal parameter of the
function. The type of the actual is ‘interface
PE_WTX_ULV_PE_COMMON_TB_LIB.peip_generic_if#(64,64,64,0,struct
peip_rdma_pkg::rlc_wtx_sched_cmd_t,struct
$unit::DEFAULT_STRUCT_TYPE,“\000”)’, while the type of the formal is
‘virtual interface
PE_WTX_ULV_PE_COMMON_TB_LIB.peip_generic_if#(64,64,64,0,struct
peip_rdma_pkg::rlc_wtx_sched_cmd_t,struct
$unit::DEFAULT_STRUCT_TYPE,“\000”)’. Expression:
pe_wtx_ulv_tb_top_ti.pe_wtx_rlc_vld_rdy_req_get
Source info:
uvm_config_db#(PE_WTX_ULV_PE_COMMON_TB_LIB.peip_generic_if#(64,64,64,0,struct_peip_rdma_pkg::rlc_wtx_sched_cmd_t,struct_$unit::DEFAULT_STRUCT_TYPE,“\000”))::g
**The error is still reported even if I declare the interface with the default struct type
**define pe_wtx_rlc_vld_rdy_req_if_decl \ peip_generic_if#(.DATA_WIDTH(64), .interface_type(
peip_VLD_RDY_TYPE), .command_struct(DEFAULT_STRUCT_TYPE))[/b]
No error, if I do not pass anything :
define pe_wtx_rlc_vld_rdy_req_if_decl \ peip_generic_if#(.DATA_WIDTH(64), .interface_type(
peip_VLD_RDY_TYPE))
Unable to figure out what I am missing here.