Modelsim编译报错“(vlog-2401) Extra semicolon found. This is permitted in SystemVerilog, but not permitt”

Modelsim编译报错“(vlog-2401) Extra semicolon found. This is permitted in SystemVerilog, but not permitted in Verilog.”

今天在进行使用modelsim进行仿真,在编译过程中遇见了报错“(vlog-2401) Extra semicolon found. This is permitted in SystemVerilog, but not permitted in Verilog.”
在这里插入图片描述

在经过查询资料之后发现了错误出现的原因:endtask后边不能添加;
更改过程如下图所示:
Modelsim编译报错“(vlog-2401) Extra semicolon found. This is permitted in SystemVerilog, but not permitt”_第1张图片
更改后结果如下图所示:
Modelsim编译报错“(vlog-2401) Extra semicolon found. This is permitted in SystemVerilog, but not permitt”_第2张图片
将分号;去掉之后就编译成功了。

你可能感兴趣的:(fpga开发)