LIME: The Liquid Metal Programming Language; Language Reference Manual

Lime is a general-purpose programming language that extends the Java programming language in several ways. The Lime extensions are designed to make it feasible to realize implementations of large portions of a program in hardware via direct synthesis into a programmable or reconfigurable logic fabric such as a Field Programmable Gate Array (FPGA). Residual portions of the program doing hard-to-synthesize (and usually infrequent) operations such as dynamic class loading continue to run as bytecodes in a hosting JVM. For rapid iteration during development, the entire language will always run as bytecodes.

The increasing availability of systems with FPGAs offers an opportunity to customize processing architectures according to the applications they run. An application-customized architecture can offer extremely high performance with very low power compared to more general purpose designs. However, FPGAs are notoriously difficult to program, and are generally programmed using hardware description languages like VHDL and Verilog. Such languages lack many of the software engineering and abstraction facilities that are taken for granted in modern Object-Oriented (OO) languages. In hybrid architectures which couple conventional CPUs to programmable (e.g., FPGA) or fixed-function accelerators (e.g., cryptography engine), additional complexity is introduced by the fact that the CPU and accelerators are programmed in completely different languages with very different semantics.

Lime allows hybrid systems (e.g., CPU+FPGA architectures) to be programmed in a single high-level OO language that maps well to both architectures. While at first glance it may seem that conflicting requirements for programming these different kinds of systems create an inevitable tension that will result in a hodgepodge language design, it is our belief that when the features are provided at a sufficiently high level of abstraction, many of them turn out to be highly beneficial in both environments.

By using a single language we open up the opportunity to hide the complexity of domain crossing between CPUs and accelerators. Furthermore, we can fluidly move computations back and forth between the types of computational devices, choosing to execute them where they are most efficient or where we have the most available resources.

Our long-term goal is to “JIT the hardware”—to dynamically select methods for compilation and synthesis to hardware, potentially taking advantage of dynamic information in the same way that multi-level JIT compilers do today for software.

An early version of Lime, focusing on the value types, was first described in [3]. The current language (as of June, 2010) is described in [1], including new features for streaming, bounded types, local/global modifiers, and so on. That paper provides motivations, examples, related work, and a good introduction to the language. This manual is designed more as a reference.

By: Joshua Auerbach; David F. Bacon; Perry Cheng; Rodric Rabbah

Published in: RC25004 in 2010

LIMITED DISTRIBUTION NOTICE:

This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.

rc25004.pdf

Questions about this service can be mailed to reports@us.ibm.com .