Forum Discussion
Altera_Forum
Honored Contributor
8 years agoUnless you are overwriting some indexes in the local buffer, or you are reusing some index from the buffer which has been updated in a previous iteration (resulting in a load/store dependency), I do not see any problem with the outer loop being pipelined here. the compiler follows a very conservative approach when it comes to detecting dependencies; rest assured that there is no way the compiler might miss an actual dependency in your code.
Note that sometimes, the compiler says the II of the outer loop is 2 because it includes a terminating a sub-loop, but further in the report it says the outer loop executes serially over the inner loop due to some dependency, which basically means the outer loop is NOT pipelined. This is one of the few cases where the compiler will actually waste some area on the outer loop to support a minimum II of 2, while in practice the loop will be always running sequentially. I think this behavior has been improved/fixed in v17.0+.