1、./apb_slv_agt/apb_slv_agt.sv, 30
Incompatible complex type usage in task or function call.
The following expression is incompatible with the formal parameter of the
function. The type of the actual is 'class
uvm_pkg::uvm_seq_item_pull_imp#(class uvm_pkg::uvm_sequence_item,class
uvm_pkg::uvm_sequence_item,class uvm_pkg::uvm_sequencer#(class
uvm_pkg::uvm_sequence_item,class uvm_pkg::uvm_sequence_item))', while the
type of the formal is 'class uvm_pkg::uvm_port_base#(class
uvm_pkg::uvm_sqr_if_base#(class apb_slv_pkg::apb_slv_trans,class
apb_slv_pkg::apb_slv_trans))'. Expression: this.sqr.seq_item_export
Source info: this.drv.seq_item_port.connect(this.sqr.seq_item_export)
该问题出现的原因是driver类 添加了参数(一般是transaction)而sequencer 没有,导致两者之间不匹配
2、
Token 'apb_slv_pkg' is not a package.
Originating module 'ahb2apb_pkg'.
Move package definition before the use of the package.
解决方法:加上编译指令 添加 -ntb_opts uvm参数
3、 Could not find member 'type_id' in class 'apb_slv_agt', at
"./apb_slv_agt/apb_slv_agt.sv",
解决方法:忘记在工厂注册了,加上`uvm_component_utils(apb_slv_agt)即可。
4、
解决方法:此处的object未实例化。
5、在driver中,我们不仅要将信号驱动到virtual interface中,有时候还需要将部分变量保存到类的变量里面,此处切记,对类的变量赋值,采用=,而不是<=,不然会出错。