請幫助解決我面臨的與禁用DUT實例相關的一個問題。 我的DUT頂層模塊有很多實例,但我的測試不需要它們。 有什麼辦法可以從測試臺上禁用這些實例。從測試平臺中禁用DUT的實例
例如,這是我的DUT模塊的原型:
module top (…….);
// instances needs to be disabled
module1 #(16) inst1 (.CLK(clk_100),.PAD_RSTN(ext_reset_n),.RSTN(global_reset_n));
module2 #(16) inst2 (.CLK(clk_100),.PAD_RSTN(ext_reset_n),.RSTN(pcie_reset_n));
pcie_module #(…) inst_pci (…..);
// main test target instances
target_testmodule #(…) test_inst(…);
child1_of_target_testmodule #(…) test_inst_child1(…);
child2_of_target_testmodule #(…) test_inst_child2(…);
endmodule
所以我的測試臺將只測試target_testmodule及其子模塊。 我正在使用bind將接口連接到target_testmodule,然後開始驅動target_testmodule的引腳。並且target_testmodule驅動其子模塊引腳。
所以對於這個測試,我不需要pci_module instace或其他instaces,因爲它們是大實例需要很多時間,提供了很多警告,並且它們還驅動了一些我不需要的target_testmodule端口。
我的問題是有一些機制來禁用測試臺上的pci模塊。我沒有對頂層模塊的寫入權限來評論這些實例,或將它們放在`ifdefs中。
非常感謝Dave。 我希望系統verilog在這裏給出了一些選項,比如綁定我不需要NULL的實例或強制整個實例清空。 目前我使用'ifndef SIM_REMOVE方法頂部 – haykp