FPGA仿真 modelsim error ?

#**Error:E:/program/FPGA/TheFirstLed/Led.v(18):Abegin/endblockwasfoundwithanemptybody... # ** Error: E:/program/FPGA/The First Led/Led.v(18): A begin/end block was found with an empty body. This is permitted in SystemVerilog, but not permitted in Verilog. Please look for any stray semicolons.
# ** Error: C:/altera/11.0/modelsim_ae/win32aloem/vlog failed.

`timescale 1 ns/ 1 ps
module Led_vlg_tst();
// constants
// general purpose registers
reg clk;
reg rst_n;
// wires
wire led_d1;
// assign statements (if any)
Led i1 (
// port map - connection between master ports and signals/registers
.clk(clk),
.led_d1(led_d1),
.rst_n(rst_n)
);
initial begin
clk = 0;
forever
#10 clk = ~clk;
end

initial begin
rst_n = 0;
#100;
rst_n = 1;
#5000;
$stop;
end

endmodule
////////////////////////////////////////////////////////////////////////////
module Led(
clk,rst_n,led_d1
);
input clk;
input rst_n;
output led_d1;
reg led;
reg[15:0] cnt;
parameter COUNT = 49;
always @(posedge clk or negedge rst_n)
begin
if(!rst_n)
cnt <= 16'd0;
else if(cnt == COUNT)
begin
led <= !led;;
cnt <= 16'b0;
end
else cnt <= cnt + 16'd1;
end
assign led_d1 = led;

endmodule
展开
 我来答
网友12138L6Q4
2014-07-02 · TA获得超过508个赞
知道小有建树答主
回答量:125
采纳率:0%
帮助的人:171万
展开全部
“led <= !led;;”多了个分号
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式