【问题标题】:The interface port must be passed an actual interface : system verilog接口端口必须传递一个实际的接口:system verilog
【发布时间】: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


【解决方案1】:

在我看来,类型不匹配。你期望你的程序块有一个LC3_io.TB 类型的参数,但是你传入了一个LC3_io 类型的接口。尝试将您的代码更改为:

// pass the TB modport from 'top_io'
LC3_test test(top_io.TB);

【讨论】:

  • 谢谢,我已经解决了这个问题 - 我在测试台而不是顶部文件中生成时钟,然后将时钟传递给测试台和 DUT。很抱歉回复得太晚了。不过,在参数中包含 modports 似乎没有任何效果。
  • @MojoJojo58 听起来有点像工具错误。无论如何,Modports 和其他东西都感觉像是未知领域。它们在纸面上听起来不错,但很多时候它们并没有真正正确实施。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-04-19
  • 2018-08-04
  • 1970-01-01
相关资源
最近更新 更多