I have 4 instances of a DAI interface in my testbench. I have been running some simulations with my created environment and have had no issues with errors. However, when I attempt to bind my assertions to the interface instances, I get an error relating to setting the interface in the configuration database. The code below shows where I add the interfaces to the configuration database:
//------------------------------------------------------------------------------------------------------
//Create instances of the interface for inputs and outputs - note these instances are the same, but they
//are hooked up differently in the env level
//------------------------------------------------------------------------------------------------------
//Parallel Inputs - To be used for the input drivers, agents and monitors
dai_if #(.P_WD_DATA (P_WD_DATA ),
.P_CH_NUM_MAX (P_CH_NUM_MAX ),
.P_WD_OFFSET (P_WD_OFFSET ),
.P_WD_CH_NUM (P_WD_CH_NUM ),
.P_WD_FMT (P_WD_FMT ),
.P_WD_WL (P_WD_WL )
)
dai_par_ivif();
//Serial Inputs - To be used for the input drivers, agents and monitors
dai_if #(.P_WD_DATA (P_WD_DATA ),
.P_CH_NUM_MAX (P_CH_NUM_MAX ),
.P_WD_OFFSET (P_WD_OFFSET ),
.P_WD_CH_NUM (P_WD_CH_NUM ),
.P_WD_FMT (P_WD_FMT ),
.P_WD_WL (P_WD_WL )
)
dai_ser_ivif();
//Parallel Outputs - To be used for the output monitors and agents
dai_if #(.P_WD_DATA (P_WD_DATA ),
.P_CH_NUM_MAX (P_CH_NUM_MAX ),
.P_WD_OFFSET (P_WD_OFFSET ),
.P_WD_CH_NUM (P_WD_CH_NUM ),
.P_WD_FMT (P_WD_FMT ),
.P_WD_WL (P_WD_WL )
)
dai_par_ovif();
//Serial Outputs - To be used for the output monitors and agents
dai_if #(.P_WD_DATA (P_WD_DATA ),
.P_CH_NUM_MAX (P_CH_NUM_MAX ),
.P_WD_OFFSET (P_WD_OFFSET ),
.P_WD_CH_NUM (P_WD_CH_NUM ),
.P_WD_FMT (P_WD_FMT ),
.P_WD_WL (P_WD_WL )
)
dai_ser_ovif();
//------------------------------------------------------------------------------------------------------
//Set interfaces in the database with specific hierachical paths.
//------------------------------------------------------------------------------------------------------
initial begin
//------------------------------------------------------------------------------------------------------
//Set these unrequired signals to their default values.
//------------------------------------------------------------------------------------------------------
dft_latch_clk = 1'b1;
dft_latch_rst_an = 1'b1;
scan_mode = 1'b0;
scan_enable = 1'b0;
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_ag_in[0]*", "dai_vif", dai_ser_ivif);
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_ag_in[1]*", "dai_vif", dai_par_ivif);
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_ag_out[0]*", "dai_vif", dai_par_ovif);
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_ag_out[1]*", "dai_vif", dai_ser_ovif);
//Scoreboard interface uses the one which drives the clock
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_sb[0]*", "dai_vif", dai_ser_ivif);
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_sb[1]*", "dai_vif", dai_ser_ivif);
//Print top level topology
uvm_top.print();
//Run specific test using command line switch addition (+UVM_TESTNAME=test_name)
run_test();
end
I bind the interface assertions prior to endmodule in the top level module as shown below:
bind dai_if :dai_ser_ivif dai_ser_in_checkers #(.P_WD_DATA (P_WD_DATA ),
.P_CH_NUM_MAX (P_CH_NUM_MAX ),
.P_WD_OFFSET (P_WD_OFFSET ),
.P_WD_CH_NUM (P_WD_CH_NUM ),
.P_WD_FMT (P_WD_FMT ),
.P_WD_WL (P_WD_WL )) ast_dai_ser_in_checkers (bclk, wclk, rst_an, wclk_period, bclk_period,
serial_data, sdatout_oe, frame_sync, active_clk,
active_dai, tdm_en, bclk_pol, wclk_pol, dai_en,
tdm_ch_en, ch_num, format, offset, wl, parallel_data);
bind dai_if :dai_ser_ovif dai_ser_out_checkers #(.P_WD_DATA (P_WD_DATA ),
.P_CH_NUM_MAX (P_CH_NUM_MAX ),
.P_WD_OFFSET (P_WD_OFFSET ),
.P_WD_CH_NUM (P_WD_CH_NUM ),
.P_WD_FMT (P_WD_FMT ),
.P_WD_WL (P_WD_WL )) ast_dai_ser_out_checkers (bclk, wclk, rst_an, wclk_period, bclk_period,
serial_data, sdatout_oe, frame_sync, active_clk,
active_dai, tdm_en, bclk_pol, wclk_pol, dai_en,
tdm_ch_en, ch_num, format, offset, wl, parallel_data);
bind dai_if :dai_par_ivif dai_par_in_checkers #(.P_WD_DATA (P_WD_DATA ),
.P_CH_NUM_MAX (P_CH_NUM_MAX ),
.P_WD_OFFSET (P_WD_OFFSET ),
.P_WD_CH_NUM (P_WD_CH_NUM ),
.P_WD_FMT (P_WD_FMT ),
.P_WD_WL (P_WD_WL )) ast_dai_par_in_checkers (bclk, wclk, rst_an, wclk_period, bclk_period,
serial_data, sdatout_oe, frame_sync, active_clk,
active_dai, tdm_en, bclk_pol, wclk_pol, dai_en,
tdm_ch_en, ch_num, format, offset, wl, parallel_data);
bind dai_if :dai_par_ovif dai_par_out_checkers #(.P_WD_DATA (P_WD_DATA ),
.P_CH_NUM_MAX (P_CH_NUM_MAX ),
.P_WD_OFFSET (P_WD_OFFSET ),
.P_WD_CH_NUM (P_WD_CH_NUM ),
.P_WD_FMT (P_WD_FMT ),
.P_WD_WL (P_WD_WL )) ast_dai_par_out_checkers (bclk, wclk, rst_an, wclk_period, bclk_period,
serial_data, sdatout_oe, frame_sync, active_clk,
active_dai, tdm_en, bclk_pol, wclk_pol, dai_en,
tdm_ch_en, ch_num, format, offset, wl, parallel_data);
`
The error I receive from this points to the lines where I set the interfaces in the configuration database as shown below:
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_ag_in[0]*", "dai_vif", dai_ser_ivif);
|
ncelab: *E,TYCMPAT (/.../dai_top.sv,178|122): formal and actual do not have assignment compatible data types (expecting datatype compatible with 'virtual interface dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2))' but found an incompatible 'dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2)) instance' instead).
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_ag_in[1]*", "dai_vif", dai_par_ivif);
|
ncelab: *E,TYCMPAT (/.../dai_top.sv,179|122): formal and actual do not have assignment compatible data types (expecting datatype compatible with 'virtual interface dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2))' but found an incompatible 'dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2)) instance' instead).
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_ag_out[0]*", "dai_vif", dai_par_ovif);
|
ncelab: *E,TYCMPAT (/.../dai_top.sv,180|122): formal and actual do not have assignment compatible data types (expecting datatype compatible with 'virtual interface dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2))' but found an incompatible 'dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2)) instance' instead).
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_sb[0]*", "dai_vif", dai_ser_ivif);
|
ncelab: *E,TYCMPAT (/.../dai_top.sv,184|118): formal and actual do not have assignment compatible data types (expecting datatype compatible with 'virtual interface dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2))' but found an incompatible 'dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2)) instance' instead).
uvm_config_db#(virtual dai_if)::set(uvm_root::get(), "uvm_test_top.dai_env.dai_sb[1]*", "dai_vif", dai_ser_ivif);
|
ncelab: *E,TYCMPAT (/.../dai_top.sv,185|118): formal and actual do not have assignment compatible data types (expecting datatype compatible with 'virtual interface dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2))' but found an incompatible 'dai_if#(.P_WD_DATA(24),.P_WD_OFFSET(11),.P_CH_NUM_MAX(8),.P_WD_CH_NUM(3),.P_WD_FMT(2),.P_WD_WL(2)) instance' instead).
I had some issues formatting the error messages. The pointer '|' should be underneath each interface instance, e.g dai_ser_ivif. If I remove the bind statements, the simulation runs fine with no similar errors to above. So I assume that this issue is related to the binding process, however, the errors seem to be complaining about the fact that i'm setting a virtual interface in the configuration database with an interface (not a virtual interface)?
Any suggestions or pointers are greatly apprecited.
Thanks.