Recursion flattening

  • Authors:
  • Greg Stitt;Jason Villarreal

  • Affiliations:
  • University of Florida, Gaineville, FL, USA;University of California, Riverside, Riverside, CA, USA

  • Venue:
  • Proceedings of the 18th ACM Great Lakes symposium on VLSI
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

High-level synthesis tools automatically generate custom hardware circuits from high-level languages, including popular programming languages like standard ANSI C, but are unable to handle recursive functions. The convenience of recursive algorithms has made recursion a widespread programming practice, therefore limiting the applicability of high-level synthesis tools. We introduce a new synthesis technique, recursion flattening, that reduces the limitations caused by recursion for high-level synthesis. Recursion flattening can eliminate many instances of recursion by determining recursion depth, and then inlining recursive calls. Recursion flattening cannot eliminate all recursion, but we show that the technique succeeds for many common recursive algorithms. We applied the technique to seven recursive benchmarks that previously would not have been synthesizable, resulting in FPGA hardware circuits that run 75x faster on average than if the benchmark were run as microprocessor software. Furthermore, we compared those hardware circuits to circuits synthesized from the same benchmarks coded using non-recursive algorithms, and show nearly identical performance and area for many examples, and significantly increased performance for several examples.