I want to have sth like this:
generate
for( i=0 ; i<16 ; i=i+1 ) begin:
always @(posedge clk) begin
L[i+1] <= #1 R[i];
R[i+1] <= #1 L[i] ^ out[i];
end
end
endgenerate
I would appreciate it if any one could possibly help me.
You don't need a
generate
here, I think. Just using afor
loop within thealways
block will work.A few questions you'd probably want to think about:
L
andR
buses?[15:0]
?L[0]
andR[0]
?i+1
wheni
hits 15 will be still within the bounds of your bus?You could do