Using Rewriting to Synthesize Functional Languages to Digital Circuits

  • Christiaan Baaij
  • Jan Kuper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8322)

Abstract

A straightforward synthesis from functional languages to digital circuits transforms variables to wires. The types of these variables determine the bit-width of the wires. Assigning a bit-width to polymorphic and function-type variables within this direct synthesis scheme is impossible. Using a term rewrite system, polymorphic and function-type binders can be completely eliminated from a circuit description, given only minor and reasonable restrictions on the input. The presented term rewrite system is used in the compiler for CλaSH: a polymorphic, higher-order, functional hardware description language.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Baaij, C.P.R., Kooijman, M., Kuper, J., Boeijink, W.A., Gerards, M.E.T.: CλaSH: Structural Descriptions of Synchronous Hardware using Haskell. In: Proceedings of the 13th Conference on Digital System Design, USA, pp. 714–721. IEEE Computer Society (September 2010)Google Scholar
  2. 2.
    Gerards, M.E.T., Baaij, C.P.R., Kuper, J., Kooijman, M.: Higher-Order Abstraction in Hardware Descriptions with CλaSH. In: Proceedings of the 14th Conference on Digital System Design, USA, pp. 495–502. IEEE Computer Society (August 2011)Google Scholar
  3. 3.
    Mitchell, N., Runciman, C.: Losing Functions without Gaining Data. In: Proceedings of the Second Symposium on Haskell, pp. 13–24. ACM (September 2009)Google Scholar
  4. 4.
    Frankau, S.: Hardware Synthesis from a Stream-Processing Functional Language. PhD thesis, University of Cambridge (July 2004)Google Scholar
  5. 5.
    Peyton Jones, S. (ed.): Haskell 98 Language and Libraries. Journal of Functional Programming, vol. 13 (2003)Google Scholar
  6. 6.
    The GHC Team: The GHC Compiler, version 7.6.1 (January 2013), http://haskell.org/ghc
  7. 7.
    Mycroft, A., Sharp, R.: A Statically Allocated Parallel Functional Language. In: Montanari, U., Rolim, J.D.P., Welzl, E. (eds.) ICALP 2000. LNCS, vol. 1853, pp. 37–48. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  8. 8.
    Nikhil, R.S.: Bluespec: A General-Purpose Approach to High-Level Synthesis Based on Parallel Atomic Transactions. In: Coussy, P., Morawiec, A. (eds.) High-Level Synthesis - From Algorithm to Digital Circuit, pp. 129–146. Springer, Netherlands (2008)Google Scholar
  9. 9.
    Hoe, J.C., Arvind.: Hardware Synthesis from Term Rewriting Systems. In: Proceedings of the tenth International Conference on VLSI, pp. 595–619 (1999)Google Scholar
  10. 10.
    Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: Hardware Design in Haskell. In: Proceedings of the Third International Conference on Functional Programming (ICFP), pp. 174–184. ACM (1998)Google Scholar
  11. 11.
    Gill, A.: Type-Safe Observable Sharing in Haskell. In: Proceedings of the Second Haskell Symposium, pp. 117–128. ACM (September 2009)Google Scholar
  12. 12.
    Ghica, D.R.: Geometry of Synthesis: A structured approach to VLSI design. In: Proceedings of the 34th Annual Symposium on Principles of Programming Languages (POPL), pp. 363–375. ACM (2007)Google Scholar
  13. 13.
    Reynolds, J.C.: Definitional Interpreters for Higher-Order Programming Languages. In: Proceedings of the 25th ACM National Conference, pp. 717–740. ACM Press (1972)Google Scholar
  14. 14.
    Pottier, F., Gauthier, N.: Polymorphic Typed Defunctionalization. In: Proceedings of the 31st Symposium on Principles of Programming Languages (POPL), pp. 89–98. ACM (2004)Google Scholar
  15. 15.
    Bell, J.M., Bellegarde, F., Hook, J.: Type-Driven Defunctionalization. In: Proceedings of the Second International Conference on Functional Programming (ICFP), pp. 25–37 (1997)Google Scholar
  16. 16.
    Peyton Jones, S., Santos, A.: Compilation by Transformation in the Glasgow Haskell Compiler. In: Functional Programming Workshops in Computing, pp. 184–204. Springer (1994)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Christiaan Baaij
    • 1
  • Jan Kuper
    • 1
  1. 1.Department of Electrical Engineering, Mathematics, and Computer ScienceUniversity of TwenteEnschedeThe Netherlands

Personalised recommendations