Neodrop
Create
FeedDiscoverMy ChannelsAuto-publishJoin Our Discord
Neodrop
A smoother experience in the app
FeedDiscoverCreateMy Channels
No kernel underneath: a deep read of a Haskell processor on an FPGA
2026-11-09

No kernel underneath: a deep read of a Haskell processor on an FPGA

Yukang Xie's 30 October write-up runs a Haskell program on Ouros, a combinator graph-reduction processor he put on an FPGA, and is unusually exact about what the machine still cannot do.

Functional Programming Deep Dives
Functional Programming Deep Dives@Gidon Kaminer
Yukang Xie published A Specialised Haskell Processor on FPGA on 30 October 2026, a write-up of his PhD work on hardware for non-strict functional languages. 1
Haskell Weekly featured it on 5 November. 2
The post opens with a demo instead of an argument: a serial terminal at 115200 baud, running a Haskell program hosted on an FPGA. 1
Xie learned the framing from Lennart Augustsson's MicroHs talks, where the demo comes first. His claim is about what sits under it: no software runtime, no kernel trap, everything handled by the hardware processor. 1
The processor is called Ouros, and it runs a Haskell program by reducing combinator graphs. 1

A 1980s idea, tried again

Specialised hardware for functional languages has a long history, with a burst of work in the 1980s. The idea was largely dropped in the 1990s, as software implementations improved and ordinary processors kept getting faster. 1
Xie's argument for returning to it is the same one behind domain-specific architectures generally, and Ouros is his attempt to see what the old idea yields with current tools. 1

A machine that reduces instead of executing

Ouros has no instruction sequence. A program is compiled into combinator graphs, and running it means repeatedly reducing function applications. 1
One application, an App, is a fixed-size word holding a function and its arguments. A larger expression lives in the heap as several Apps connected by pointers. 1
Three components do the work. The dereference heap follows pointers and manages threads; the reducer performs combinator reduction; the ALU handles arithmetic. Apps move between them as data tokens, and each component processes one when its input is ready. Xie calls the arrangement dataflow-driven, as against instruction-driven. 1
The combinators are larger than the classical handful, which cuts the number of reduction steps a program needs. The architecture is described in a 2026 paper at ASAP, the International Conference on Application-specific Systems, Architectures and Processors, and the combinators in a 2025 paper at the Symposium on Trends in Functional Programming; the post links both. 1 Xie's earlier paper covers the structured combinators, and the Haskell front end is a fork of MicroHs, a compiler whose runtime is combinator-based and small enough to target microcontrollers. 3
Two features fall out of the dataflow organisation. When an arithmetic operation needs two independent values, Ouros evaluates them in separate threads without any threading code in the program, and those threads share one hardware pipeline. A concurrent garbage collector reclaims unused heap cells alongside normal execution. 1
Architecture diagram of the Ouros processor, with a dereference heap, a reducer and an arithmetic logic unit as large blue blocks joined by black token paths through yellow triangular arbiters, a purple garbage collector block with red arrows into the heap and the reducer, a routing examples panel listing token patterns against destinations, and a signal definition panel giving the record layouts for an application word and its payload.
Xie's own architecture diagram, re-rendered at double resolution from the vector original he published. The routing panel on the right shows which token goes where: an application token whose arguments still need dereferencing goes to the heap, a reduced one goes to the reducer, and a primitive over two integers goes to the ALU. The red arrows are garbage-collector signals.1

The problem of side effects

Adding IO turns Ouros from an expression evaluator into a standalone computer, and the design question is how to add effects without breaking graph reduction. 1
Xie uses the state-passing reading of the IO monad, the one from Peyton Jones and Wadler's 1993 paper on imperative functional programming. type World = Int, and IO a is World -> (a, World). 1
World is a dummy Int with no relation to the real world. Its job is to be consumed by one operation and produced by it, so the next operation has to wait for it, which orders effects inside a lazy evaluator. 1
The primitive interface stays narrow: writeAXIReg and readAXIReg, written as primitive "IO.Write" and primitive "IO.Read". The compiler turns those into hardware operations, and a dedicated IO unit carries out an AXI4-Lite transaction when one becomes ready. 1
AXI4-Lite is ARM's cut-down version of the AXI4 on-chip bus, meant for simple register-style interfaces. 4 Ouros hides it: the Haskell program reads and writes registers, some of which reach the outside world, and an operation finishes only once its bus transaction has. 1
The demo attaches a UART and polls its registers. The same interface could reach GPIO pins, timers or a hardware random number generator. 1

What it costs on the board

The board is Real Digital's AUP-ZU3, donated by people at AMD. 5 The design runs at 100 MHz and takes about 27% of the lookup tables, 7% of the registers and 40% of the block RAM. 1
Most of that block RAM is the heap and the code memory, so the figure moves with their sizes. Xie finds the logic footprint roughly comparable to a small pipelined RISC-V core, and says himself that the comparison is not like for like. 1
The hardware description is written in Chisel, a hardware construction language embedded in Scala, and generated as SystemVerilog. 16

The limitation list

Five limits decide what this machine can currently be used for:
What Ouros does nowWhat it rules out
No Float or Double, and no integer division in the ALUnumeric work of any kind; Float would be easy to add, Double harder because of its encoding 1
An 8K × 288-bit heap and a 4K × 288-bit code memory, both on chipprograms much beyond one or two thousand lines; reaching off-chip memory needs a serious redesign 1
The program is compiled into the memory image before the hardware is generatedloading a new program without rebuilding the FPGA design 1
IO is polled, with no hardware interruptany device that has to interrupt the processor, a question Xie says he has no answer to yet 1
Haskell support comes from the MicroHs front end, untested feature by featureconfidence about language coverage; algebraic data types, list comprehensions and type classes have worked in practice 1
The speed question gets a measured answer. On wall-clock time the FPGA demo is likely several times slower than a modern laptop, and Xie argues a fair comparison is hard to make at all, since the implementation technology, the circuit size and the power budget all differ. 1
He also declines the usual ASIC projection: because the memory organisation is unusual, a 7nm version cannot simply be assumed to run several times faster. 1

What it would be for

The concrete use Xie imagines is a Raspberry Pi with Haskell as its bare-metal programming language. Running a functional language directly on a small embedded processor would help in some settings, and he expects the research openings to matter more. 1
One of those openings is a small operating system written entirely in Haskell, a question a native Haskell processor makes askable. 1

What to take from it

  1. Laziness decides what the machine must do. With no runtime underneath, graph reduction, thunk updates and garbage collection become the processor's work, which is why the block diagram is drawn around a heap rather than around registers.
  2. A dataflow organisation hands you parallelism. Splitting an operation into threads that share one pipeline, and collecting garbage concurrently, follow from processing tokens as they become ready.
  3. Put a register interface in front of the bus. Two primitives, one read and one write, are enough to expose AXI4-Lite to Haskell while keeping the bus invisible to the program.
  4. Say what the comparison does not cover. Xie reports resource usage against a RISC-V core and then declines the like-for-like claim, and refuses the ASIC scaling estimate. That leaves a reader able to trust the numbers he does give.

Verbatim quotes

"There is no software runtime or 'kernel trap' underneath, everything is handled by the hardware processor."
"The important part is the dependency: each IO operation consumes a World token and produces one for the next operation. This gives the operations an order, even though the processor evaluates Haskell lazily."
"What I find quite encouraging is that the logic footprint is roughly in the range of a small pipelined RISC-V core."
"For example, what would a small operating system written entirely in Haskell look like?"
— Yukang Xie, A Specialised Haskell Processor on FPGA

References

  1. 1
    A Specialised Haskell Processor on FPGA

    bathtub-01.github.io

  2. 2
    Issue 549 :: Haskell Weekly Newsletter

    haskellweekly.news

  3. 3
    MicroHs: Haskell implemented with combinators

    github.com

  4. 4
    AMBA AXI and ACE Protocol Specification

    developer.arm.com

  5. 5
    AUP-ZU3

    realdigital.org

  6. 6
    Chisel

    github.com

Functional Programming Deep Dives
Functional Programming Deep Dives@Gidon Kaminer

This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.

Related content

  • A 1980s idea, tried again
  • A machine that reduces instead of executing
  • The problem of side effects
  • What it costs on the board
  • The limitation list
  • What it would be for
  • What to take from it
  • Verbatim quotes