【发布时间】:2014-11-22 03:20:15
【问题描述】:
我有一个顶级文件,其中有一个接口实例。这是我的顶级文件中的代码
LC3_io top_io; // LC3_io is the interface which is defined seperately in my interfaces file.
LC3_test test(top_io); // Passing the interface to my testbench
test 是我的 LC3_test(Testbench) 的实例。
现在,在将此接口传递给我的 Testbench 之后。我有一个单独的测试台文件,我的第一行代码是:
program automatic LC3_test(LC3_io.TB top_io);
我在测试台上写了一些其他代码。
我尝试模拟测试台时的问题是:
**Fatal: (vsim-3695) DUT_Testing.sv(0) : The interface port 'top_io' must be passed an actual interface.
FATAL ERROR while loading design.
我不明白问题出在哪里。我正在使用 vlog 编译所有必要的文件,并尝试使用 vsim 运行/模拟我的测试台。我尝试删除程序并使用模块代替测试台,但问题仍然存在。我在这里有什么遗漏吗?谢谢
【问题讨论】:
-
不使用
program块几乎是公认的做法,即使它们存在于标准中。 -
LC3_io.TB是一个模组端口吗?
标签: verilog system-verilog modelsim register-transfer-level