有没有办法修复与工厂支持基于字符串的查找相关的警告?
Is there a way to fix the warning related to the support of string-based lookup for the factory?
我经常收到这条警告信息:
UVM_WARNING @ 0: reporter [TPRGED] Type name 'packet2mem_comp_Str' already registered with factory. No string-based lookup support for multiple types with the same type name.
我没有用相同的名字注册任何 class,除非我认为父代没有任何问题。
我的class是继承的参数化class声明如下:
class packet2mem_comp #(string S = "MEM") extends mem_comp;
typedef packet2mem_comp #(S) packet2mem_comp_Str;
`uvm_object_utils(packet2mem_comp_Str)
function new (string name = "packet2mem_comp");
super.new(name);
endfunction : new
... //rest of my code
endclass: packet2mem_comp
有谁知道如何解决这个警告?
参数化的宏有特殊版本 类。而不是
`uvm_object_utils(packet2mem_comp_Str)
尝试
`uvm_object_param_utils(packet2mem_comp_Str)
或者也许
`uvm_object_param_utils(packet2mem_comp #(S))
你没有发布MCVE,所以我没有测试过。
我经常收到这条警告信息:
UVM_WARNING @ 0: reporter [TPRGED] Type name 'packet2mem_comp_Str' already registered with factory. No string-based lookup support for multiple types with the same type name.
我没有用相同的名字注册任何 class,除非我认为父代没有任何问题。
我的class是继承的参数化class声明如下:
class packet2mem_comp #(string S = "MEM") extends mem_comp;
typedef packet2mem_comp #(S) packet2mem_comp_Str;
`uvm_object_utils(packet2mem_comp_Str)
function new (string name = "packet2mem_comp");
super.new(name);
endfunction : new
... //rest of my code
endclass: packet2mem_comp
有谁知道如何解决这个警告?
参数化的宏有特殊版本 类。而不是
`uvm_object_utils(packet2mem_comp_Str)
尝试
`uvm_object_param_utils(packet2mem_comp_Str)
或者也许
`uvm_object_param_utils(packet2mem_comp #(S))
你没有发布MCVE,所以我没有测试过。