skip to main content
article

Hardware software co-design in Haskell

Published:07 September 2017Publication History
Skip Abstract Section

Abstract

We present a library in Haskell for programming Field Programmable Gate Arrays (FPGAs), including hardware software co-design. Code for software (in C) and hardware (in VHDL) is generated from a single program, along with the code to support communication between hardware and software. We present type-based techniques for the simultaneous implementation of more than one embedded domain specific language (EDSL). We build upon a generic representation of imperative programs that is loosely coupled to instruction and expression types, allowing the individual parts to be developed and improved separately. Code generation is implemented as a series of translations between progressively smaller, typed EDSLs, safeguarding against errors that arise in untyped translations. Initial case studies show promising performance.

References

  1. H. Apfelmus. 2017. The Operational Monad Tutorial (Blog Post). http://apfelmus.nfshost.com/articles/operational-monad.html. (2017).Google ScholarGoogle Scholar
  2. Markus Aronsson, Emil Axelsson, and Mary Sheeran. 2015. Stream Processing for Embedded Domain Specific Languages. In Revised Selected Papers from 26th Int. Symp. on Implementation and Application of Functional Languages (IFL). ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Joshua Auerbach et al. 2012. A Compiler and Runtime for Heterogeneous Computing. In Proc. 49th Design Automation Conference (DAC). ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. E. Axelsson. 2016. Compilation as a Typed EDSL-to-EDSL Transformation (Blog post). http://fun-discoveries.blogspot.se/2016/03/ . (2016).Google ScholarGoogle Scholar
  5. E. Axelsson and A. Persson. 2015. Programmable Signatures. In Trends in Functional Programming, Revised Selected Papers. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Christiaan Baaij, Matthijs Kooijman, Jan Kuper, Arjan Boeijink, and Marco Gerards. 2010. C λaSH: structural descriptions of synchronous hardware using Haskell. In Proc. 13th Euromicro Conference on Digital System Design: Architectures, Methods and Tools (DSD). IEEE. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Jonathan Bachrach et al. 2012. Chisel: Constructing Hardware in a Scala Embedded Language. In Proc. 49th Design Automation Conference (DAC). ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Bjesse, K. Claessen, M. Sheeran, and S. Singh. 1998. Lava: Hardware Design in Haskell. In Proc. Third Int. Conf. on Functional Programming (ICFP). ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jan Bracker and Andy Gill. 2014. Sunroof: A Monadic DSL for Generating JavaScript. In Proc. 16th Int. Symp. on Practical Aspects of Declarative Languages. Springer International Publishing, 65–80. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Sally Browning and Philip Weaver. 2010. Designing tunable, verifiable cryptographic hardware using Cryptol. In Design and Verification of Microprocessor Systems for High-Assurance Applications. Springer, 89–143.Google ScholarGoogle Scholar
  11. K. Claessen, M. Sheeran, and S. Singh. 2003. Using Lava to design and verify recursive and periodic sorters. IJSTTT 4, 3 (2003).Google ScholarGoogle Scholar
  12. Nirav Dave. 2011. A Unified Model for Hardware/Software Codesign. Ph.D. Dissertation. EECS Dept., MIT. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Peter Gammie. 2013. Synchronous Digital Circuits As Functional Programs. ACM Comput. Surv. 46, 2, Article 21 (Nov. 2013), 27 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. N. George, D. Novo, T. Rompf, M. Odersky, and P. Ienne. 2013. Making domainspecific hardware synthesis tools cost-efficient. In 2013 International Conference on Field-Programmable Technology (FPT). 120–127.Google ScholarGoogle Scholar
  15. Dan R. Ghica, Alex Smith, and Satnam Singh. 2011. Geometry of Synthesis IV: Compiling Affine Recursion into Static Hardware. In Proc. 16th Int. Conf. on Functional Programming (ICFP). ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Andy Gill et al. 2010. Introducing Kansas Lava. In Proc. 21st Int. Conf. on Implementation and Application of Functional Languages (IFL). Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Patrick C. Hickey, Lee Pike, Trevor Elliott, James Bielman, and John Launchbury. 2014. Building Embedded Systems with Embedded DSLs (Experience Report). In Proc. 19th Int. Conf. on Functional Programming (ICFP). ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Myron King. 2013. A Methodology for Hardware-Software Codesign. Ph.D. Dissertation. EECS Dept., MIT. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. K. Moriarty. 2017. Password-Based Cryptography Specification Version 2.1. (2017). https://tools.ietf.org/html/rfc2898Google ScholarGoogle Scholar
  20. Robert Morris and Ken Thompson. 1979. Password Security: A Case History. Commun. ACM 22, 11 (Nov. 1979), 594–597. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Alan Mycroft and Richard Sharp. 2001. Hardware/Software Co-design Using Functional Languages. Springer-Verlag, 236–251. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Naylor and S. Moore. 2015. A generic synthesisable test bench. In ACM/IEEE Int. Conf. on Formal Methods and Models for Codesign (MEMOCODE). 128–137. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Matthew Naylor, Colin Runciman, and Jason Reich. 2009. The Reduceron home page, fetched May 2017. (2009). https://www.cs.york.ac.uk/fp/reduceron/Google ScholarGoogle Scholar
  24. Rishiyur Nikhil. 2004. Bluespec System Verilog: efficient, correct RTL from high level specifications. In ACM/IEEE Int. Conf. on Formal Methods and Models for Co-Design (MEMOCODE). IEEE, 69–70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Puschel et al. 2005. SPIRAL: Code Generation for DSP Transforms. In Proc. IEEE, Vol. 93. Issue 2.Google ScholarGoogle ScholarCross RefCross Ref
  26. Josef David Svenningsson and Bo Joel Svensson. 2013. Simple and Compositional Reification of Monadic Embedded Languages. Proc. 18th Int. Conf. on Functional Programming (ICFP) (2013). Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Bo Joel Svensson. 2017. OpenCL Reduction on the ZYNQ. (2017). http://svenssonjoel. github.io/writing/zynqreduce.pdfGoogle ScholarGoogle Scholar
  28. Wouter Swierstra. 2008. Data Types à La Carte. J. Funct. Program. 18, 4 (July 2008). Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. David Tarditi, Sidd Puri, and Jose Oglesby. 2006. Accelerator: Using Data Parallelism to Program GPUs for General-purpose Uses. SIGPLAN Not. 41, 11 (Oct. 2006), 325–335. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J Teich. 2012. Hardware Software Codesign: the Past, the Present, and Predicting the Future. Proc. of the IEEE 100 (2012).Google ScholarGoogle ScholarCross RefCross Ref
  31. The OpenSSL Project. 2003. OpenSSL: The Open Source toolkit for SSL/TLS. (April 2003). www.openssl.org .Google ScholarGoogle Scholar
  32. Michael Vollmer, Bo Joel Svensson, Eric Holk, and Ryan R. Newton. 2015. Metaprogramming and Auto-tuning in the Search for High Performance GPU Code. In Proc. 4th Int. Workshop on Functional High-Performance Computing (FHPC). ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J.J. Vossen. 2016. Offloading Haskell functions onto an FPGA. Master’s thesis. Univ. Twente.Google ScholarGoogle Scholar
  34. Kuangya Zhai, Richard Townsend, Lianne Lairmore, Martha A. Kim, and Stephen A. Edwards. 2015. Hardware Synthesis from a Recursive Functional Language. In Proc. 10th Int. Conf. on Hardware/Software Codesign and System Synthesis (CODES). IEEE. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Hamid Reza Zohouri, Naoya Maruyama, Satoshi Matsuoka, and Aaron Smith. 2016. Evaluating and Optimizing OpenCL Kernels for High Performance Computing with FPGAs. In Proc. SuperComputing Conference. IEEE. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Hardware software co-design in Haskell

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 52, Issue 10
          Haskell '17
          October 2017
          211 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/3156695
          • Editor:
          • Andy Gill
          Issue’s Table of Contents
          • cover image ACM Conferences
            Haskell 2017: Proceedings of the 10th ACM SIGPLAN International Symposium on Haskell
            September 2017
            211 pages
            ISBN:9781450351829
            DOI:10.1145/3122955

          Copyright © 2017 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 7 September 2017

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!