|  | 
 
| 
问题如下:
×
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册  
 先定义了个interface:
 interface Iff(..);
 clocking ck;
 ...
 endclocking
 modport recv(clocking ck);
 ...
 endinterface
 
 typedef virtual Iff.recv VrecvIff;
 
 class A_CLASS;
 VrecvIff pif;
 function new(VrecvIff pif);
 this.pif = pif;
 endfunction
 endclass
 
 class B_CLASS;
 A_CLASS a;
 function new(VrecvIff pif);
 a = new(pif);
 endfunction
 endclass
 
 class C_CLASS;
 B_CLASS b;
 function new(VrecvIff pif);
 b = new(pif);
 endfunction
 endclass
 
 在top.sv中会例化interface: top_iff(此处省略)
 
 在test.sv中代码:
 program test;
 
 VrecvIff vr_if;
 C_CLASS c;
 
 vr_if = top.top;
 c = new(vr_if);
 
 end
 我的问题是:当调用new()创建类c的时候,类A,B,C的new(pif)是按怎样的顺序执行的,以及其interface参数是如何传递的???。
 | 
 |