/fletcher

A framework to integrate FPGA accelerators with Apache Arrow

Primary LanguageVHDLApache License 2.0Apache-2.0

Fletcher: A framework to integrate FPGA accelerators with Apache Arrow

Build Status pipeline status

Fletcher is a framework that helps to integrate FPGA accelerators with tools and frameworks that use Apache Arrow in their back-ends.

Apache Arrow specifies an in-memory format for data and provides libraries to various languages to interface with the data in that format. The format prevents the need for serialization and through the libraries Arrow, zero-copy interprocess communication is possible. Languages that have Arrow libraries (under development) include C, C++, Go, Java, JavaScript, Python, Ruby and Rust.

While many software projects can benefit from these advantages, also hardware accelerated applications have seen serious serialization bottlenecks. Fletcher focuses on FPGA accelerators. Through Fletcher and Arrow, interfacing efficiently between FPGA and language runtime is made available to all the supported languages.

Given an Arrow Schema (description of a tabular datastructure), Fletcher generates the following:

  • An easy-to-use hardware interface for the functional part of the accelerator:
    • You provide a range of Arrow RecordBatch indices (rather than byte address)
    • You receive streams of the datatype specified by the schema (rather than bus words)
    • No pointer arithmetic, reordering, buffering, etc.. required - Fletcher does this for you.
  • A template for the functional part of accelerator (to be implemented manually or using high-level synthesis)
    • You connect directly to streams of data from/to your RecordBatch rather than some memory bus interface.
    • This allows you to immediately work with stream arguments (in e.g. Vivado HLS hls::stream<type>) to HLS functions, without the need to pre-process the data.

Current state

Our framework is functional, but in early stages of development. It currently supports the following features:

Apache Arrow support

  • Fletcher currently supports:

    • Reading/writing an Arrow Schema created from any combination of:
      • Fixed-width primitives
      • Lists
      • Structs
  • Validity bitmaps:

  • We are working on support for:

    • Sparse and dense unions
    • Dictionaries
    • Chunked tabular structures (Arrow::Table)

Platform support

  • Our core hardware descriptions are vendor independent; we don't use any vendor IP.
    • You can simulate a Fletcher based design without a specific target platform.
    • Tested simulators include Questa/Modelsim, GHDL and XSIM.
  • We provide top-level wrappers for the following platforms:

Further reading

  • Fletcher wrapper generator - The wrapper generator converts Arrow schema's to wrappers around ColumnReaders/ColumnWriters. It also provides instantiation templates for your hardware accelerator implementation for a HDL or HLS design flow.
  • Host-side run-time libraries - How to integrate host-side software with Fletcher.
  • Array Readers/Writers - The workhorses of Fletcher, that implement the actual hardware interface for reading and writing from/to Arrow Arrays. Read this if you want to go in depth.

Example projects

External projects using Fletcher: