Intel HLS - dynamic scheduling
Hello,
I've been messing with Intel HLS, but I'm struggling to see the performance benefits of dynamic scheduling. I've composed a test component which is meant to vary in performance according to the inputs I supply to it:
using namespace ihc; typedef ihc::mm_host<int, ihc::dwidth<256>, ihc::awidth<32>, ihc::aspace<1>, ihc::latency<1> > mem_1; typedef ihc::mm_host<int, ihc::dwidth<256>, ihc::awidth<32>, ihc::aspace<4>, ihc::latency<1> > mem_2; component int if_loop_3(mem_1 &a, mem_2 &b, int n) { int i; int dist; int sum = 1000; for (i=0; i<n; i++) { dist = a[i] - b[i]; if (dist >= 0) { sum = (sum /dist); } } return sum; }
In this instance, I am comparing best-case against worst-case, meaning the case where the if is never true against the one where it is always true, with an integer division as a long-latency event to make the difference clear.
However, when running the co-simulation with Intel HLS, in the report I always get the same latency, no matter if the test-bench supplies the best or worst case inputs to the component, suggesting that there is no dynamic scheduling taking place.
Is this correct? Do I need to specify to the compiler that it needs to use dynamic scheduling to optimize the runtime?
Thanks in advance. Also feel free to give me any suggestions concerning improving my code.
-Mopplikus