|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
刚开始接触fpga 一个简单的计数器一直提示语法错误 希望各位能不吝赐教Error (10170): Verilog HDL syntax error at cnt_num.v(21) near text: a. Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Altera Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/s ... ge-base/search.html and search for this specific error message number.
- module cnt_num
- (clk,
- rst_n,
- cnt_num_out,
- );
- input clk,rst_n;
- output cnt_num_out;
- reg [27:0]cnt;
- reg cnt_num_out_r;
- always @ (posedge clk,negedge rst_n)
- begin
- if (!rst_n) begin
- cnt<=28'd0;
- cnt_num_out_r<=1'b0;
- end
- else if (cnt == 28'b‭0010111110101111000010000000‬) //此行报错
- begin
- cnt<=1'b0;
- cnt_num_out_r<=1'b1;
- end
- else cnt<=cnt+1'b1;
- end
-
- assign cnt_num_out = cnt_num_out_r;
- endmodule
复制代码 |
|