|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
module count(clk, rst, ld);
input clk, rst;
output ld;
reg ld;
reg [25:0] cnt;
always @(posedge clk)
begin
if(rst)
cnt <= 26'b0000_0000_0000_0000_0000_0000_00;
ld<=0;
else if(cnt == 26'b1110_0100_1110_0001_1100_0000_00)
cnt <= 26'b0000_0000_0000_0000_0000_0000_00;
ld <= ~ld;
else
cnt <= cnt+1;
end
endmodule
错误:expecting statement
之前用的是VHDL,现在开始学习verilog。 |
|