Hardware synthesis from a recursive functional language

Abstraction in hardware description languages stalled at the register-transfer level decades ago, yet few alternatives have had much success, in part because they provide only modest gains in expressivity. We propose to make a much larger jump: a compiler that synthesizes hardware from behavioral functional specifications. Our compiler translates general Haskell programs into a restricted intermediate representation before applying a series of semantics-preserving transformations, concluding with a simple syntax-directed translation to SystemVerilog. Here, we present the overall framework for this compiler, focusing on the intermediate representations involved and our method for translating general recursive functions into equivalent hardware. We conclude with experimental results that depict the performance and resource usage of the circuitry generated with our compiler.

[1]  James C. Hoe,et al.  Synthesis of operation-centric hardware descriptions , 2000, IEEE/ACM International Conference on Computer Aided Design. ICCAD - 2000. IEEE/ACM Digest of Technical Papers (Cat. No.00CH37140).

[2]  M. Felleisen,et al.  Reasoning about programs in continuation-passing style , 1993 .

[3]  Mary Sheeran UpsilonFP : An algebraic VLSI design language , 1983 .

[4]  Tsutomu Maruyama,et al.  Hardware Implementation Techniques for Recursive Calls and Loops , 1999, FPL.

[5]  Stephen A. Edwards,et al.  The Challenges of Synthesizing Hardware from C-Like Languages , 2006, IEEE Design & Test of Computers.

[6]  Andrew Tolmach An External Representation for the GHC Core Language , 2001 .

[7]  Jr. Guy L. Steele,et al.  Rabbit: A Compiler for Scheme , 1978 .

[8]  Ralf Hinze Functional pearl: streams and unique fixed points , 2008, ICFP.

[9]  Thomas Johnsson,et al.  Lambda Lifting: Treansforming Programs to Recursive Equations , 1985, FPCA.

[10]  Jan Kuper,et al.  Using Rewriting to Synthesize Functional Languages to Digital Circuits , 2013, Trends in Functional Programming.

[11]  Mitchell Wand,et al.  Essentials of programming languages , 2008 .

[12]  Olivier Danvy,et al.  Defunctionalization at work , 2001, PPDP '01.

[13]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[14]  Christian Haubelt,et al.  Hardware synthesis of recursive functions through partial stream rewriting , 2012, DAC Design Automation Conference 2012.

[15]  Rajesh Gupta,et al.  High-Level Synthesis: A Retrospective , 2008 .

[16]  André L. M. Santos,et al.  Compilation by Transformation in the Glasgow Haskell Compiler , 1994, Functional Programming.

[17]  Richard Sharp,et al.  Hardware Synthesis Using SAFL and Application to Processor Design , 2001, CHARME.

[18]  Steven D. Johnson Synthesis of digital designs from recursion equations , 1983 .

[19]  Erik Perrins,et al.  Introducing Kansas Lava , 2009, IFL.

[20]  Mary Sheeran,et al.  muFP, a language for VLSI design , 1984, LFP '84.

[21]  Satnam Singh,et al.  Geometry of synthesis iv: compiling affine recursion into static hardware , 2011, ICFP '11.

[22]  Pascal Raymond,et al.  The synchronous data flow programming language LUSTRE , 1991, Proc. IEEE.

[23]  Hai Liu,et al.  The Intel labs Haskell research compiler , 2013, Haskell '13.

[24]  Marc Feeley,et al.  SHard: a Scheme to Hardware Compiler , 2006 .

[25]  Ralf Hinze Functional pearl: streams and unique fixed points , 2008, ICFP 2008.

[26]  Miriam Leeser,et al.  HML, a novel hardware description language and its translation to VHDL , 2000, IEEE Trans. Very Large Scale Integr. Syst..

[27]  Greg Stitt,et al.  Recursion flattening , 2008, GLSVLSI '08.

[28]  Peter Gammie,et al.  Synchronous digital circuits as functional programs , 2013, ACM Comput. Surv..

[29]  Simon L. Peyton Jones,et al.  Secrets of the Glasgow Haskell Compiler inliner , 2002, Journal of Functional Programming.

[30]  Jan Kuper,et al.  C?aSH: Structural Descriptions of Synchronous Hardware Using Haskell , 2010, 2010 13th Euromicro Conference on Digital System Design: Architectures, Methods and Tools.

[31]  Miriam Leeser,et al.  HML: an innovative hardware description language and its translation to VHDL , 1995, Proceedings of ASP-DAC'95/CHDL'95/VLSI'95 with EDA Technofair.

[32]  Mary Sheeran,et al.  Lava: hardware design in Haskell , 1998, ICFP '98.

[33]  Mary Sheeran Hardware Design and Functional Programming: a Perfect Match , 2005, J. Univers. Comput. Sci..