|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我尝试用下图所示的方式进行传参:
运行后会报如下错误:
Error-[SV-ICA] Illegal class assignment
testbench.sv, 25
"this.p = uvm_component_registry#($unit::packet,"packet")::create("p1", null, /* contxt = "\000" */);"
Expression 'uvm_component_registry#($unit::packet,"packet")::create("p1",
null, )' on rhs is not a class or a compatible class and hence cannot be
assigned to a class handle on lhs.
Source type: class $unit::packet#(4,32)
Target type: class $unit::packet#(2,2)
Please make sure that the lhs and rhs expressions are compatible
如果把23行换成24行能够正常传参,但是这样的话就用不了工厂机制了。
|
|