初学SystemVerilog,用VCS,不太明白如下错误
时间:10-02
整理:3721RD
点击:
小弟,刚刚接触Systemverilog,遇到如下问题在a.sv文件中,定义了一个接口 a_interface 然后又定义了一个module 交a,这个模块的port使用了,我定义的interface,但是在用VCS对这个模块进行编译,发现一下错误:
“VCS_IUC interface a is unconnected ”,然后我查了书,书上的原话是“A port that is declared as an interface ,whether generic or explicit,must be connected to an interface instance or another interface port”
这里,我不明白,为什么这个module a的port必须要接一个例化的interface呢?
并且我在端口声明的时候,使用了 a_interface a_pins 这样的语句了呀,为什么还是报错了?
“VCS_IUC interface a is unconnected ”,然后我查了书,书上的原话是“A port that is declared as an interface ,whether generic or explicit,must be connected to an interface instance or another interface port”
这里,我不明白,为什么这个module a的port必须要接一个例化的interface呢?
并且我在端口声明的时候,使用了 a_interface a_pins 这样的语句了呀,为什么还是报错了?
这个你得把代码作为附件加上来吧。
后来我折腾了一下,加了一个测试module,并且在里面例化了自己设计的module和interface,两个以connect,编译就没有问题了,
后来在VCS的document文件夹下翻看了几个例子,然后把它文件里面的测试module都去掉,仅仅剩下设计的话,也会出现相同的错误。
估计真的可能是systemverilog在VCS里面的就这样的,必须要顶层例化interface并且连上module才对,在quartus 中编译相同的文件,不会报错,我猜想VCS针对验证和仿真,所以仿真器的解释不一样吧
vcs有只编译(不load,建立hierarchy)的option.我想加上这个option也不会报错的。
请问这个option是什么,刚刚找了半天也没有找到......
哦,不懂systemverilog。
使用vlogan而不要使用VCS
学习一下
