只是试图为所有寄存器和索引创建一个finished
真正的 iff线。data == dataNew
我能想到的唯一方法是使用一堆finishedAgg
电线作为中间值;我很想摆脱它们,但我不知道该怎么做。似乎必须有比这更简单的方法!
reg[24:0] data[0:24];
reg[24:0] dataNew[0:24];
wire finished;
genvar i;
generate
wire finishedAgg[-1:24];
assign finishedAgg[-1] = 1;
for (i=0; i<25; i=i+1) begin :b1
assign finishedAgg[i] = finishedAgg[i-1] & (data[i]==dataNew[i]);
end
assign finished = finishedAgg[24];
endgenerate