请帮助解决我面临的与禁用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