Kiwi is a compiler and library and infrastructure for hardware accelerator synthesis and general support for high-performance scientific computing. The output is intended for execution of on FPGA or in custom silicon on ASIC.
We aim to compile a fairly broad subset of the concurrent C# language subject to some
For Kiwi 1, the current version, we have the following aims:
- Works with the Linux/mono infrastructure but should also work on Windows.
- Program can freely instantiate classes but not at run time - a fixed number of instantiation operations
must be detectable at compile time.
- Array and heap structure sizes must all be statically determinable (i.e. at compile time).
- Program can use recursion but the maximum calling depth must be statically determined in Kiwi 1.
- Stack and heap must have same shape at each run-time iteration of non-unwound loops. In other words, every allocation made in the outer loop of your algorithm must be matched with an equivalent, manifestly-implicit garbage generation event or explicit
Kiwi.Dispose(Object obj) in the same loop.
- Program can freely create new threads but creation sites statically determined too.
In Kiwi 2 we will relax the static restrictions and allow the size of data structures in DRAM to be determined at runtime.
Kiwi 2, planned to be available in the middle of 2017, supports three major compilation modes. These can be mixed
in a single design, at a subsystem granularity, with the new incremental compilation support based on IP-XACT.
- The Sequencer major mode is `classical HLS'. It will generate a custom datapath made up of RAMs, ALUs and external DRAM
connections and folds the program onto this structure using some small
number of clock cycles for each iteration of the inner loops.
- The Fully-Pipelined Accelerator major mode will run the whole subsystem every clock tick, accepting new data every
clock cycle, allbeit with some number of clock cycles latency between a particular input appearing at the output.
- The SoC Render major mode provides C# access to an -driven wiring generator with support for automatic glue logic insertion. The invoked subsystem is called HPR System Integrator (§39).
This can target multi-FPGA designs and provides a clean mechanism to wrap up third-party IP blocks, such as CAMs.
Kiwi has been open source since early 2017 and is downloadable (perhaps on completion of a web form).
The download page is
Neither the authors nor their employers warrant that the Kiwi system is correct, usable or noninfringing. It is an academic prototype. We accept no responsibility for direct or indirect loss or consequential loss to the maximum amount allowable in UK law.