1
我的測試平臺中有4個DAI接口實例。我一直在用我創建的環境運行一些模擬,並且沒有發生錯誤。但是,當我嘗試將我的斷言綁定到接口實例時,出現與在配置數據庫中設置接口有關的錯誤。如下所示綁定接口聲明時UVM配置數據庫錯誤
//------------------------------------------------------------------------------------------------------
//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
我結合頂層模塊中endmodule現有接口的斷言:下面示出了代碼,我的接口添加到配置數據庫
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);
`
我從此收到的錯誤指向我在配置數據庫中設置接口的行,如下所示:
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).
我有一些格式錯誤信息的問題。指針'|'應該位於每個接口實例的下面,例如dai_ser_ivif。如果我刪除綁定語句,模擬運行良好,沒有類似的錯誤到上面。所以我認爲這個問題與綁定過程有關,但是,這些錯誤似乎是在抱怨我在配置數據庫中使用接口(而不是虛擬接口)設置虛擬接口?
任何建議或指針都非常感謝。
謝謝。
聽起來像是一個工具問題。 –
獲取更多信息:'nchelp ncelab TYCMPAT' – toolic
'nchelp ncelab TYCMPAT'除了告訴我錯誤與數據類型不匹配有關外,並沒有提供額外的信息。另外,我運行了一些額外的測試,並注意到如果我爲代碼編譯的所有四個接口綁定相同的接口(例如dai_ser_in_checkers)和相同的實例名稱(例如ast_dai_ser_in_checkers)(例如ast_dai_ser_in_checkers)。但是,每當我更改這些值時,我都會得到相同的錯誤。任何想法爲什麼這可能是? –