原先在modlsim中仿真都没问题,但是在把文件添加到VIVADO中对于task的调用都提示了错误,(使用include的形式把task所在的文件包含在顶层测试文件中)
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2testbe
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../..
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2tes
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2tes
错误位置都为task开头。
task USB_CheckSusp;(错误指向这一行)
input exp;
begin
if (USB_SUSPEND === ~exp) begin
$display ("%10.0f",Vector,," **ERROR: USB_SUSPEND unexpectedly %b", USB_SUSPEND);
Errors = Errors + 1;
end
else if (USB_SUSPEND !== exp) begin
$display ("%10.0f",Vector,," **ERROR: USB_SUSPEND in unknown state");
Errors = Errors + 1;
end
`ifdef VERBOSE
else
$display ("%10.0f",Vector,," USB_SUSPEND = %b", USB_SUSPEND);
`endif
end
endtask
还有就是不止是task,别的文件include,进来也是报这种错误
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2testbench/musbfsfc_mod_ahb.v:55]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2testbench/musbfsfc_mod_ahb.v:56]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2testbench/musbfsfc_mod_ahb.v:57]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2testbench/musbfsfc_mod_ahb.v:58]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../T2testbench/musbfsfc_mod_ahb.v:59]
错误地方:
reg FClkEn, FCLK, NRST;
reg DPIN, DNIN, DPIN_Samp, DNIN_Samp, NDINE;
wire DPIN_1, DNIN_1;
wire DP, DN;
reg HOSTCLK;
reg EnabFSDev, EnabLSDev;
有没有谁知道怎么解决这种问题,改怎么解决 |