我试图在不使用verilog中的循环指令的情况下实现一个循环,所以我制作了一个计数器模块并且模拟进行得很完美,但是当我尝试在FPGA上实现它时,我在映射中遇到了很多错误,比如这个
ERROR:MapLib:979 - LUT4 symbol
"Inst_Count/Mcompar_GND_1105_o_xcount[7]_LessThan_25_o_lut<0>" (output
signal=Inst_Count/Mcompar_GND_1105_o_xcount[7]_LessThan_25_o_lut<0>) has
input signal "Inst_Count/Madd_x[9]_GND_1105_o_add_0_OUT_cy<0>" which will be
trimmed. See Section 5 of the Map Report File for details about why the input
signal will become undriven.
这些错误只发生在我用循环指令模块替换这个模块时,所以没有人知道这个有什么问题吗?
感谢您抽出宝贵的时间 :)
module average( input rst , output reg [7:0]
reg [7:0] count;
reg [7:0] prv_count;
reg clk;
initial
begin
count = 8'd0;
end
always @ (posedge rst)
begin
clk = 1'b0;
end
always @ (clk)
begin
prv_count = count ;
count = prv_count + 1'b1;
end
always @ (count)
begin
if (count == 8'd255)
G_count= count;
else
begin
clk = ~clk;
G_count= count;
end
end
endmodule