Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- nope. if try to use it, it will run out of memory again. Seems like i cant use this method --- Quote End --- Hi, maybe this is what you try to achieve ? module double_loop_input_as_condition (clk, d, q0, q299, count); input clk; input [7:0] d; output [7:0] q0 , q299; output reg [8:0] count; reg [7:0] q [300:0]; reg [8:0] offset; integer i; integer j; integer num_reg; //simulation shows that it cant assign the integer to a register always @ (posedge clk) begin num_reg = 100; q[0] <= d; count <= count +1; for (i=0; i<=2; i= i+1) begin for (j=1; j <=num_reg; j= j+1) q[j+(i*num_reg)] <= q[j-1+(i*num_reg)]; end end assign q0 = q[0]; assign q299 = q[299]; endmodule