Forum Discussion
Altera_Forum
Honored Contributor
8 years agoData dependency caused by conditional global memory read
Hi, When I compile my code, in the loop analysis of the generated report file there's one loop which has iteration interval of 4, which means it's not pipelined well.
for (uint loop...
Altera_Forum
Honored Contributor
8 years agoSince it is a "store" dependency, it is probably the local memory one (data_double_buf). You can try writing the output to a temporary register, and then writing back the value of that register to the local buffer "outside" of the if/else block to see if it removes the dependency.
By the way, why do you need the unrolled for loop here? The statement inside of the loop does not depend on the loop variable. I think you have a typo here.#pragma unroll
for(uint v = 0; v < CVEC; v++) {
data_double_buf = 0.0f;
}