请教 system verilog 一个问题
时间:10-02
整理:3721RD
点击:
class ts;
int cmd,
function new();
cmd=10;
endfunction
task disp();
$display ("CMD %0d",cmd);
endtask
endclass
task case_001;
ts u_test;
u_test=new;
endtaks
module
initial begin
case_001;
end
endmodule
以上代码用NC 编译的时候,报错为 unrecognized declaration 'u_test'. 以上代码都在一个文件 test.sv中
编译命令是:
irun -access rw +ncv93 +sv test.sv
为什么找不到class呢,都定义的一个文件里了呀
int cmd,
function new();
cmd=10;
endfunction
task disp();
$display ("CMD %0d",cmd);
endtask
endclass
task case_001;
ts u_test;
u_test=new;
endtaks
module
initial begin
case_001;
end
endmodule
以上代码用NC 编译的时候,报错为 unrecognized declaration 'u_test'. 以上代码都在一个文件 test.sv中
编译命令是:
irun -access rw +ncv93 +sv test.sv
为什么找不到class呢,都定义的一个文件里了呀
int cmd,---> int cmd; ?
endtaks --> endtask ?
module ---> module xxxx?