Forum Discussion
Altera_Forum
Honored Contributor
14 years agoIf the compiler doesn't know how many times the loop is going to iterate then I wouldn't expect it to unroll the loop for you. So by not specifying an initial value for 'idx' the compiler has no clue if it should unroll the loop 2, 3, 4, 5, ...100, etc.... times. Loop unrolling is a static optimization so all the unknowns need to be.... known for the optimization to occur.