Syntax:
for
(reg_initialisation
;
conditional
;
reg_update)
statement
The for loop is the same as the for loop in C. It has three parts: the first part is executed once, before the loop is entered; the second part is the test which (when true causes the loop to re-iterate); and the third part is executed at the end of each iteration.
integer list [31:0]; integer index; initial begin for(index = 0; index < 32; index = index + 1) list[index] = index + index; end
reg [15:0] memory16_256 [255:0];