【发布时间】:2021-04-04 06:06:13
【问题描述】:
我在 Xilinx ISE verilog 编码方面相对较新(只有几个小时)。这是我的 uni 项目中的代码。它在 count = 0 行上显示语法错误。运行检查语法时,我在这里没有看到任何错误。我该如何解决这个问题?
module syncdown(clk,rst,count);
input clk,rst;
output reg [3:0] count = 1;
always @(posedge clk);
begin
if(rst)
count = 0; // wrong here
else
count = count-1;
end
endmodule
错误
ERROR:HDLCompiler:806 - "/home/bossman/mux/syncdown.v" Line 8: Syntax error near "=".
【问题讨论】:
标签: verilog xilinx xilinx-ise