reg [7:0] test_in;
reg [31:0] test_in_cnt[7:0];
genvar i;
generate
for(i=0; i<8; i=i+1) begin
always @(posedge clk) begin
if (test_in[i])
test_in_cnt[i] <= test_in_cnt[i] + 1;
else
test_in_cnt[i] <= test_in_cnt[i];
end
end
endgenerate
reg [7:0] test_in;
reg [31:0] test_in_cnt[7:0];
genvar i;
generate
for(i=0; i<8; i=i+1) begin
always @(posedge clk) begin
if (test_in[i])
test_in_cnt[i] <= test_in_cnt[i] + 1;
else
test_in_cnt[i] <= test_in_cnt[i];
end
end
endgenerate