Skip to main content
Top
Published in: International Journal of Parallel Programming 2-3/2023

24-01-2023

Accelerating OCaml Programs on FPGA

Authors: Loïc Sylvestre, Emmanuel Chailloux, Jocelyn Sérot

Published in: International Journal of Parallel Programming | Issue 2-3/2023

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

This paper aims to exploit the massive parallelism of Field-Programmable Gate Arrays (FPGAs) by programming them in OCaml, a multiparadigm and statically typed language. It first presents O2B, an implementation of the OCaml virtual machine using a softcore processor to run the entire OCaml language on an FPGA. It then introduces Macle, a language to express, in ML-style, hardware-accelerated user-defined functions, implemented as gates and registers on the same FPGA. Macle allows to implement pure computations and compose them in parallel. It also supports processing of dynamic data structures such as arrays, matrices and trees allocated by the OCaml runtime in the memory of the softcore processor. Macle functions can then be called, as hardware accelerators, by OCaml programs executed by O2B. This combination of Macle and OCaml codes in a single source program enables to easily prototype FPGA applications mixing numeric and symbolic computations.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Footnotes
2
A softcore processor is a processor implemented in the reconfigurable part of an FPGA.
 
3
Such as AMD Vivado HLS and Intel OpenCL SDK.
 
6
This process is general and can be adapted to target other FPGA families.
 
7
Avalon bus for Intel platforms.
 
8
The FPGA board is connected to a host PC via an UART connection for printing and debugging.
 
9
Each call of these functions is specialized and inlined at compile time.
 
Literature
2.
go back to reference Auerbach, J., Bacon, D.F., Cheng, P., et al.: Lime: a Java-compatible and synthesizable language for heterogeneous architectures. In: ACM International Conference on Object Oriented Programming Systems Languages and Applications, pp. 89–108 (2010). https://doi.org/10.1145/1869459.1869469 Auerbach, J., Bacon, D.F., Cheng, P., et al.: Lime: a Java-compatible and synthesizable language for heterogeneous architectures. In: ACM International Conference on Object Oriented Programming Systems Languages and Applications, pp. 89–108 (2010). https://​doi.​org/​10.​1145/​1869459.​1869469
3.
go back to reference Baaij, C., Kooijman, M., Kuper, J., et al.: Clash: structural descriptions of synchronous hardware using Haskell. In: 2010 13th Euromicro Conference on Digital System Design: Architectures, Methods and Tools, pp. 714–721. IEEE (2010). https://doi.org/10.1109/DSD.2010.21 Baaij, C., Kooijman, M., Kuper, J., et al.: Clash: structural descriptions of synchronous hardware using Haskell. In: 2010 13th Euromicro Conference on Digital System Design: Architectures, Methods and Tools, pp. 714–721. IEEE (2010). https://​doi.​org/​10.​1109/​DSD.​2010.​21
5.
go back to reference Canis, A., Choi, J., Aldham, M., et al.: LegUp: high-level synthesis for FPGA-based processor/accelerator systems. In: Proceedings of the 19th ACM/SIGDA International Symposium on Field Programmable Gate Arrays (FPGA), pp. 33–36 (2011). https://doi.org/10.1145/1950413.1950423 Canis, A., Choi, J., Aldham, M., et al.: LegUp: high-level synthesis for FPGA-based processor/accelerator systems. In: Proceedings of the 19th ACM/SIGDA International Symposium on Field Programmable Gate Arrays (FPGA), pp. 33–36 (2011). https://​doi.​org/​10.​1145/​1950413.​1950423
7.
10.
go back to reference Decaluwe, J.: MyHDL: a Python-based hardware description language. Linux J. 2004, 84–87 (2004) Decaluwe, J.: MyHDL: a Python-based hardware description language. Linux J. 2004, 84–87 (2004)
14.
16.
go back to reference Ito, Y., Nakano, K.: A hardware-software cooperative approach for the exhaustive verification of the Collatz conjecture. In: 2009 IEEE International Symposium on Parallel and Distributed Processing with Applications, pp. 63–70. IEEE (2009). https://doi.org/10.1109/ISPA.2009.35 Ito, Y., Nakano, K.: A hardware-software cooperative approach for the exhaustive verification of the Collatz conjecture. In: 2009 IEEE International Symposium on Parallel and Distributed Processing with Applications, pp. 63–70. IEEE (2009). https://​doi.​org/​10.​1109/​ISPA.​2009.​35
23.
go back to reference Saint-Mleux, X., Feeley, M., David, J.-P.: SHard: a Scheme to hardware compiler. In: Workshop on Scheme and Functional Programming (2006) Saint-Mleux, X., Feeley, M., David, J.-P.: SHard: a Scheme to hardware compiler. In: Workshop on Scheme and Functional Programming (2006)
29.
go back to reference Varoumas, S., Vaugon, B., Chailloux, E.: A generic virtual machine approach for programming microcontrollers: the OMicroB project. In: 9th European Congress on Embedded Real Time Software and Systems (ERTS 2018) (2018) Varoumas, S., Vaugon, B., Chailloux, E.: A generic virtual machine approach for programming microcontrollers: the OMicroB project. In: 9th European Congress on Embedded Real Time Software and Systems (ERTS 2018) (2018)
Metadata
Title
Accelerating OCaml Programs on FPGA
Authors
Loïc Sylvestre
Emmanuel Chailloux
Jocelyn Sérot
Publication date
24-01-2023
Publisher
Springer US
Published in
International Journal of Parallel Programming / Issue 2-3/2023
Print ISSN: 0885-7458
Electronic ISSN: 1573-7640
DOI
https://doi.org/10.1007/s10766-022-00748-z

Other articles of this Issue 2-3/2023

International Journal of Parallel Programming 2-3/2023 Go to the issue

Premium Partner