配置中的虚拟接口 class

Virtual Interface in Config class

如何在不使用 uvm_config_db 的情况下使用虚拟接口从我的配置 class 中指出 TB_top 中的接口?

这道题考查你对uvm_config_db的了解,它只是uvm_pkg内部的一个全局变量数据库。您所要做的就是在您定义配置 class 的包内创建一个虚拟接口变量,然后在调用 run_test()

之前设置它
package my_config_pkg;

virtual my_interface vif;
class my_configuration;
...
endclass
endpackage



module TB_top;

my_interface ifinst();

initial begin
        my_config_pkg::vif = ifinst;
        run_test("my_test");
end
endmodule