SPRUI04F july 2015 – april 2023
advice #30009: If you know that this loop will always execute at a
multiple of <2> and at least <2> times, try adding
"#pragma MUST_ITERATE(2, ,2)" just before the loop.
The C6000 architecture is partitioned into two nearly symmetric halves. The resource breakdown displayed in the software pipelining information in the asm file, is computed after the compiler has partitioned instructions to either the A-side or the B-side. If the resources are imbalanced (i.e.; some resources on one side are used more than resources on the other) software pipelining is resource-bound, and the loop cannot be efficiently scheduled. If the compiler has information about the trip-count for the loop, it can unroll the loop to balance resource usage, and get better pipelining. You can give loop trip-count information to the compiler using the "MUST_ITERATE" pragma.
To see more information on using the MUST_ITERATE pragma, refer to Section 7.9.22