什么算作虚拟接口的非法层次引用?

What counts as an illegal hierarchical reference for a virtual interface?

IEEE 1800-2017 LRM 在 25.9 虚拟接口 部分指出:

Although an interface may contain hierarchical references to objects outside its body or ports that reference other interfaces, it shall be illegal to use an interface containing those references in the declaration of a virtual interface.

下面是这种不允许的分层引用的示例吗?

interface some_other_intf();
  bit some_signal;
endinterface


interface some_intf();

  some_other_intf intf();

  task foo();
    intf.some_signal <= 0;
  endtask

endinterface


virtual some_intf some_vif;

我有一个工具会抱怨包含 intf.some_signal <= 0 的行。虽然 intf.some_signal 是分层引用,但它是相对引用,所以我不明白为什么这会被禁止。

intf 是界面主体的一部分。我不确定如何解释引用其他接口 部分的 端口。

这是引用另一个接口的端口示例

interface some_other_intf();
  bit some_signal;
  parameter T = int;
endinterface

interface some_intf(some_other_interface intf);    
  task foo();
    intf.some_signal <= 0;
  endtask
typefef intf.T myT;
myT another_signal;
endinterface
virtual some_intf some_vif;

问题来自对 some_vif.another_signal 的引用,它的类型可能会根据 T 的参数化连接到 intf 而改变。

对于大多数用例,这不是问题,但 SystemVerilog 委员会从未花时间澄清可以允许的特定情况;刚刚制定了广泛的禁令。