z80replacement · a Z80 CPU replacement with an FPGA

Toolchain

the open-source tools, and why KiCad

Status, 29 November 2026: nobody has built this module yet. The first sample run of 2 boards comes soon. Wait until the project has tested these boards before you send an order or a build request to a factory.

Repository file: docs/toolchain.md

All tools are open source (R11). The project does not use Vivado or a vendor FPGA IDE.

Task Tool License
Schematic and PCB KiCad 10 GPL-3.0
3D check of the module in a socket KiCad 3D viewer, FreeCAD GPL-3.0, LGPL-2.0
HDL simulation Icarus Verilog, Verilator GPL-2.0, LGPL-3.0 or Artistic-2.0
Synthesis yosys ISC
Place and route nextpnr-ecp5 ISC
Bitstream Project Trellis (ecppack) ISC
FPGA and flash loader openFPGALoader Apache-2.0
USB microcontroller firmware Raspberry Pi pico-sdk, GCC for Arm BSD-3-Clause, GPL-3.0
Z80 software for tests the z80fpga assembler, or any Z80 assembler GPL-3.0

The OSS CAD Suite contains yosys, nextpnr, Project Trellis, Icarus Verilog, Verilator and openFPGALoader in one package for Linux, macOS and Windows.

The CPU core

The core is the microcoded Z80 from z80fpga. z80fpga also has boards that need Vivado (Nexys A7, Arty A7). This project uses only the z80fpga ECP5 flow, which runs with yosys and nextpnr on the Icepi Zero.

Known limits of nextpnr-ecp5, from the z80fpga work:

  • The LPF reader accepts MULTICYCLE and MAXDELAY lines and ignores them. Thus the design cannot rely on multicycle constraints.
  • An internal clock that has no FREQUENCY constraint is not checked. Check nextpnr.log for the line constraining clock net.

Why KiCad

The request asks if a better open-source CAD tool than KiCad exists. For this project, KiCad is the best choice:

Tool Result
KiCad Large user base, libraries for most parts, HDI and microvia rules, a PCBWay plugin, many PCB vendors accept its output.
Horizon EDA Good part and pool management. Much smaller user base. Fewer fabrication plugins.
LibrePCB Simple and clean. Not complete enough for a 6-layer HDI board with a 0.5 mm BGA.
gEDA / Lepton EDA, pcb-rnd Old workflow, small user base for new designs.

Build environment

The repository will contain:

Directory Contents
hardware/ KiCad projects, one per board, with the libraries that the boards use. CERN-OHL-S-2.0, see licensing.md.
gateware/ The top level, the bus interface, the memory modes and the board constraint files
firmware/ RP2354A firmware
tools/ Host tools, for example the ROM image loader
docs/ These documents

The z80fpga core is a separate checkout next to this repository. Each build reads the z80fpga version and stops if the version is older than the build needs. See question 7 in open_questions.md.

Source of this page: web/ and docs/ in the z80replacement repository. Hardware: CERN-OHL-S-2.0. Other files: GPL-3.0-or-later.