打印
[ISE]

vivado仿真时候task全部报错root scope declaration

[复制链接]
4575|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
t851018986|  楼主 | 2016-1-30 20:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
原先在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;
有没有谁知道怎么解决这种问题,改怎么解决

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

6

帖子

0

粉丝