前言
IC验证时报错,最后定位在include和import处,改变 import svt_uart_uvm_pkg:😗 和 include “svt_uart.uvm.pkg” 的顺序后,错误消失,问题很是奇怪,include 必须放在import之前?
百度之。
区别
include 将文件中所有文本原样插入包含的文件中。这是一个预处理语句,`include在import之前执行。
import不会复制文本内容。但是import可package中内容引入import语句所在的作用域。
总结下就是
include is equivalent to copy/paste or insertion of whatever is present in that file to wherever you include.
import is used to make all/select variables from a package visible.
暂时没有找到问题原因。
补:import 语句最好放在 “module testbech;”语句之后,否则,极有可能会报错,非常隐蔽!