cbiffle / cfm

A 16-bit CPU and self-hosting Forth system for the Lattice ICE40 FPGA, written in Haskell.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CFM: the Cliffle Forth Machine

This is a Forth-inspired processor targeting the Lattice ICE40 FPGA series, primarily targeting the Icoboard.

The CFM core is designed for high performance (40+ MHz) on the ICE40 HX grade parts. It is written in Haskell and synthesized using Clash. Because the Haskell expression of the circuit is directly executable, we also have a cycle-accurate emulator "for free."

The distribution includes BsForth, a non-ANS Forth implementation that can provide a bare-bones interactive development environment with optimizing compiler in less than 5 kiB. It's interesting in the way that it bootstraps (using the cycle-accurate emulator) and for its machine instruction fusion algorithm.

More reading:

About

A 16-bit CPU and self-hosting Forth system for the Lattice ICE40 FPGA, written in Haskell.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 62.6%Language:Forth 33.0%Language:Verilog 2.4%Language:Makefile 2.0%Language:Shell 0.0%