I have tried looking at different posts related to for loop inside an always block but my problem looks different. Here's the part of my code of interest :
always@(posedge clk) begin
for(i=2;i<UP_SPACES+2;i=i+1) begin //Ram_out
if(up_addr_d2[3:0]==i)
begin
up_dout_t2 <= ram_out[(i+1)*32-1:i*32];
end
end// for loop
end
I have declared i as an integer. Here the compiler gives the error 'i is not a constant'. I was not sure if one can code this way and was expecting a multidriver error but this error i dont understand. Please throw light.