|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
class base extends vmm_object ;
function new(vmm_object parent = null , string name = "" , bit insert_disable = 0);
super.new(parent,name,insert_disable);
endfunction
endclass
base A11 , A21 , A22 , A31 , A32 , A33 , A41 , A42 , A43 ;
vmm_log log ;
initial begin
int num_children ;
string str ;
log = new("log","log");
A11 = new(null,"A11",0);
A21 = new(A11,"A21",0);
A22 = new(A11,"A22",0);
A31 = new(A21,"A31",0);
A32 = new(A21,"A32",0);
A33 = new(A22,"A33",0);
A41 = new(A32,"A41",1);
A42 = new(A33,"A42",1);
A43 = new(A33,"A43",1);
$sformat(str,"the hierachy name of the b11 is %s !",A43.get_hier_inst_name());
`vmm_note(log,str);
end
本来的层次结构是 A11.A22.A33.A43 ,当时答应出来的是[unkown].[unkown].[unkown].[unkown]
如果用A43.get_object_hiername(),打印出来的是正确的,为 A11:A22:A33:A43
同样都是用于返回层次结构,为什么get_hier_inst_name结果不对?
在vmm中很多地方的入参都有 string name = “” 和 string inst_name =“” ; 这两个name究竟有什么区别,感觉在vmm中
object和instance有时候是一样的含义有时候又不一样,困惑中............. |
|