virtual interface 实用总结:
- ①、interface只能在
module
中声明,在class
中要用virtual interface
; - ②、virtual interface是在仿真运行时才连接到DUT上,如果只是interface,在编译时就必须进行连接。virtual interface在class中是automatic,在运行的时候产生;
- ③、virtual interface主要完成接口的动态分配,只要在top层定义virtual interface,其他层不需要改变,直接通过interface传递参数即可;
- ④、可以消除绝对路径,避免修改的时候改很多东西。