In the following example, Vivado HLS reports a warning message and less than expected II and pipeline results.
Pseudo code:
If (condition)
R = M[ax] ;
Else
R = M[ay];
@W [SCHED-69] Unable to schedule 'load' operation on array 'M' due to limited resources (II = 1).
@I [SCHED-61] Pipelining result: Target II: 1, Final II: 2, Depth: 3.
To ensure Vivado HLS can optimize HDL outputs, modify the code as shown below.
If (condition)
A = ax ;
Else
A = ay;
// next do the actual read
R=M[A];
This issue is fixed from release 2012.2 on.