51Testing软件测试论坛
标题:
关于#模块测试#的问题:无论改成module还是program都不行
[打印本页]
作者:
测试积点老人
时间:
2022-6-13 10:33
标题:
关于#模块测试#的问题:无论改成module还是program都不行
一直报错,无论改成module还是program都不行,一直编译错误
[attach]138406[/attach]
[attach]138407[/attach]
vlab4/factory_overide
1ho 日 module factory override;
1h1 Regi...In import uvm pkg::*;
@mC... mcd... include "uvm macros.svh"
AsS...
ECLASS COML EXTEND UVMCOMPONENT:
String IN mcdf... uvm component utils(coml)
FUNCTION NEW(STRIN NAME ="COML" UVM COMPONENT PARENTNULL):
MPARENT):
Sdisplay(SSformAtf("*s is created"NAME)):
endfunction
10 VIRTUAL fUNCTION VOID HELLO (STRING nAmE):
11 Sdisplay(Ssformatf("compl:: *s said hello",name)):
la endfunction
13 CLASS COM2 EXTENDS COML:
14 uvm_ component utils(com2)
155
FUNCTION NEW(STRIN NAME-"COM2".UVM COMPONENT PARENT NULL):
17
WM.PARENT):
Sdisplay(gformatt("#s is created".name));
endfunction
function void hello(string name):
edisplay(8formatt("com2:: *s said hello",name))
endfunction
2 endclass
endmodule
复制代码
RSTN ih1 Regl...In import uvm pkg::*;
tl @MC. include "uvm macros.svh"
tests Cmc Unsuccessful Compile
name mcdf
Vlog -work Work -VOPT -sV -stAts=NONE D:/software/questasim/examples/sylab4/fact
OrY_overide.sV
QUESTASIM-64 VLOG 10.6C COMPILER 2017.07 JUL 26 2017
COMPILING moDuLE factory_overriDE
IMPORTING PACKAGE MTIUVM.UVM PKG (UVM-L.1D BUILT-IN)
AX NOTE: (VLOG-2286) D:/SOfWARE/UESTASIM/EXAMPLES/SVLAB4/fACTORY OVERIDE.3V(3)
: USIN MPLIC D:-1/VERILOGRC/UM-L.1D/
SRC FROM IMPORT UVM PKG
** ERROR: (VLOG-13069) D:/software/questasim/examples/svlab4/factory_overide.(
25): nEar "EndmOdulE": sytx error unexpected endmodule expecting function or
TASK OR*SSTEMVERILOGKEYWORD'PURE!".
复制代码
作者:
kallinr
时间:
2022-6-14 10:25
那就不知道了
作者:
bellas
时间:
2022-6-14 10:57
打个短点看下输出
作者:
qqq911
时间:
2022-6-14 11:02
代码写错了
作者:
jingzizx
时间:
2022-6-14 14:19
写的语法错误
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2