VCS编译报错如下时:
"xxx"
The port 'xxx' of top-level module 'xxxxxxxxx' whose type is interface 'xxxxxxxxxxxx' is left unconnected. It is illegal to leave the interface ports unconnected. Please make sure that all the interface ports are connected.
此时是因为该模块的接口中有interface,而interface是不能作为顶层模块的接口的,必须有一个实例化的interface inst与之进行连接。当然,更可能的情况是因为VCS编译时并没有指定顶层,因此工具认为每一个module都是单独的顶层。
综上,解决方式为在VCS编译选项中加入-top YYYY指定顶层即可。