我有一个顶级文件,其中有一个接口的实例。这是我的toplevel文件中的代码
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);
我还在testbench中编写了一些其他代码。
当我试图模拟测试平台时,问题是:
**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运行/模拟我的测试平台。我尝试删除程序并使用模块代替测试平台,但问题仍然存在。我是不是遗漏了什么?谢谢
发布于 2014-11-22 19:23:56
在我看来,类型不匹配。您的程序块需要一个LC3_io.TB
类型的参数,但您传入的却是一个LC3_io
类型的接口。尝试将您的代码更改为:
// pass the TB modport from 'top_io'
LC3_test test(top_io.TB);
https://stackoverflow.com/questions/27073686
复制相似问题