High-Level Synthesis Oriented Restructuring of Functions with While Loops

The usage of high-level synthesis (HLS) tools for FPGAs has increased significantly over the last years since they matured and allow software programmers to take advantage of reconfigurable hardware technology. Most HLS tools employ methods to optimize for loops, e. g. by unrolling or pipelining them. But there is hardly any work on the optimization of while loops. This comes at no surprise since most while loops have loop-carried dependences involving the loop condition which result in large recurrence cycles in the dataflow graphs. Therefore typical while loops cannot be parallelized or pipelined. We propose a novel transformation which allows to optimize while loops nested within a for loop. By interchanging the two loops, it is possible to pipeline (and thereby parallelize) the inner loop, resulting in a reduced execution time. We present two case studies on different hardware platforms and show the speedup factors - compared to a host processor and to an unoptimized hardware implementation - achieved by our while loop optimization method.

[1]  Monica S. Lam,et al.  A Loop Transformation Theory and an Algorithm to Maximize Parallelism , 1991, IEEE Trans. Parallel Distributed Syst..

[2]  Minh N. Do,et al.  Youn-Long Steve Lin , 1992 .

[3]  J.-F. Collard Space-time transformation of while-loops using speculative execution , 1994, Proceedings of IEEE Scalable High Performance Computing Conference.

[4]  David F. Bacon,et al.  Compiler transformations for high-performance computing , 1994, CSUR.

[5]  Michael Wolfe,et al.  High performance compilers for parallel computing , 1995 .

[6]  Wayne Luk,et al.  Pipeline vectorization , 2001, IEEE Trans. Comput. Aided Des. Integr. Circuits Syst..

[7]  Benoit B. Mandelbrot,et al.  Fractals and chaos : the Mandelbrot set and beyond : selecta volume C , 2004 .

[8]  Wilhelm Burger,et al.  Digital Image Processing - An Algorithmic Introduction using Java , 2016, Texts in Computer Science.

[9]  Henk Corporaal,et al.  Parallelization of while loops in nested loop programs for shared-memory multiprocessor systems , 2011, 2011 Design, Automation & Test in Europe.

[10]  Jason Cong,et al.  High-Level Synthesis for FPGAs: From Prototyping to Deployment , 2011, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[11]  David A. Patterson,et al.  Computer Organization and Design - The Hardware / Software Interface (Revised 4th Edition) , 2012, The Morgan Kaufmann Series in Computer Architecture and Design.

[12]  Jason Cong,et al.  Improving high level synthesis optimization opportunity through polyhedral transformations , 2013, FPGA '13.

[13]  Markus Weinhardt,et al.  High-Level Synthesis , 2016, FPGAs for Software Programmers.

[14]  Mandy Eberhart High Level Synthesis Introduction To Chip And System Design , 2016 .

[15]  B. Ramakrishna Rau,et al.  Iterative Modulo Scheduling , 1996, International Journal of Parallel Programming.