z80replacement · a Z80 CPU replacement with an FPGA

The schematic

the KiCad schematic of the full version: how it is made and checked, and what to check

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/schematic.md

hardware/schematic holds the KiCad 10 schematic of the full version (LFE5U-85F and a 2 MB SRAM). A Python program writes the schematic from a model of the circuit. Do not edit the .kicad_sch files by hand: change the model in make_sch.py, and write the files again.

STATUS: REVIEWED, ROUTED, NOT BUILT. pcb.md describes the routed board of the third board round of 11 November 2026, but no board exists yet.

Five reviews by AI models examined the schematic and the board on 10 and 11 November 2026. The fifth review found no blocker. Then a verification of the second board round of 11 November 2026 found no blocker, but found other problems. The third board round of the same day corrected the board problems.

The schematic passes ERC with no errors, and the netlist agrees with the pin assignment of the FPGA and of the RP2354A (check_sch.py gave PASS on 29 November 2026). Items 2 and 6 in "Items to check" below have no result yet. Items 4 and 7 ask for one more check before the order.

Files

File Function
make_lib.py Writes z80r.kicad_sym: the ECP5 in csfBGA285, the 74LVC4245A in DHVQFN24, the TPS259470, the IS61WV20488FBLL (SRAM, ball map SRAM_BALLS), and the power symbols of the rails
make_fp.py Writes z80r.pretty: the footprints of the csfBGA285, the DHVQFN24 and the 40 socket pins (the geometry of the placement study; numbered counterclockwise seen from the F.Cu side, pin 1 at the bottom left at the J1 end, as on a DIP-40 seen from the top: mechanical.md, "Socket pins"), of the TPS259470 (TI RPW0010A), and of the SRAM (ISSI_miniBGA-48_6x8mm_P0.75mm)
make_sch.py Writes the project, the root sheet and five sheets, and model.json
check_sch.py Runs ERC and compares the netlist with the model and with the other sources
ecp5_csfbga285.csv The 285 balls of the csfBGA285: function, bank, dual function, pair. Made from the Lattice pinout file.
kisexp.py, kilib.py Read and write KiCad s-expressions, and load library symbols

Make and check the schematic

KiCad 10 must be installed. The programs find KiCad in the folder of a user install on Windows, or in the folder of the KICAD_DIR variable.

cd hardware/schematic
python make_lib.py
python make_fp.py
python make_sch.py
python check_sch.py

check_sch.py examines these items:

  1. ERC gives no errors. The 12 warnings are spare translator inputs on GND.
  2. Each pin of each part is on the net of the model, and each pin with no net in the model has a no-connect flag.
  3. Each signal of gateware/top/make_lpf.py is on its ECP5 ball.
  4. For each row of the isolator table in board_pins.md, the RP2354A pin, the isolator pins and the ECP5 ball are on the same nets.
  5. No net has only one pin.

The last line is PASS or FAIL. A swap of two RP2354A GPIOs in the model makes item 4 fail.

How the sheets connect

Each pin gets a global label with the name of its net, a power symbol, or a no-connect flag. The sheets have no wires and no sheet pins: a global label connects to each label of the same name on each sheet. Net names come from the LPF names: a[0] becomes A0, and mreq_n becomes MREQ_N. The nets on the bus side of the translators start with Z_, for example Z_A0. The nets on the USB side of the isolators end with _U, for example JTAG_TCK_U.

Sheet Contents
Power The two buck converters (3.3 V and 1.1 V), the 2.5 V LDO, the PWR_FLAGs
Bus interface The 40 socket pins, the six 74LVC4245A, the CLK buffer, the pull-ups
FPGA The nine units of the ECP5, the configuration flash, the 25 MHz oscillator, the LEDs, the decoupling
SRAM U5 (IS61WV20488FBLL-10BLI), the two pull-ups, the decoupling
USB side The USB-C connector, the RP2354A, the 12 MHz oscillator, the isolators, the eFuse and the jumpers of the USB power option

Decisions in the model

  • Translator direction. DIR low sends B to A (toward the bus). U13 and U14 have DIR on GND. U15 has DIR on 5 V and /OE on GND. U10 and U11 take ADIR from the FPGA, and U12 takes DDIR. The spare inputs of U13 to U15 are on GND.
  • Configuration. CFG[2:0] = 010 (master SPI). CFG0 and CFG2 have 470 Ω resistors to GND (R17 and R19), and CFG1 has a 10 kΩ resistor to 3.3 V (R18). PROGRAMN, INITN and DONE have 10 kΩ pull-ups to 3.3 V. FLASH_CS_N has a 10 kΩ pull-up (R27). FLASH_CLK has a 1 kΩ pull-up to 3.3 V (R47, new in the third board round of 11 November 2026). todo.md, item 5, lists the pull-ups of the Lattice guide FPGA-TN-02039 that the board does not have.
  • SRAM. U5 is the ISSI IS61WV20488FBLL-10BLI (Mouser 870-61W20488FBLL10BI): 2M x 8, 3.3 V, 10 ns, 48-ball mini BGA, one chip select. (History: until 10 November 2026 U5 was the IS62WV20488FBLL-45BLI with CS2 on +3V3.) The model connects these parts:
    • A0 to A20 and I/O0 to I/O7 to the 32 SRAM balls of the FPGA (SRAM_A0 to SRAM_A20, SRAM_D0 to SRAM_D7)
    • CS# (SRAM_CE_N), OE# (SRAM_OE_N) and WE# (SRAM_WE_N) to the FPGA
    • ball A6 has no connection (NC)
    • 10 kΩ pull-ups to +3V3 on SRAM_CE_N and SRAM_WE_N. The pull-ups hold the SRAM off while the FPGA configures.
    • decoupling: 2 × 100 nF and 1 µF on +3V3
  • ECP5 decoupling. As on the OrangeCrab (DECOUPLING.sch): pairs of 10 nF and 100 nF. Five pairs are on VCC and two are on VCCAUX. One pair is on each of the seven 3.3 V banks. Each rail has one bulk capacitor.
  • Size of the bulk capacitors (10 November 2026). A 10 µF or 22 µF capacitor is 0402 where both of its nets are 3.3 V or less (+3V3, +1V1, +2V5, +3V3_USB, +1V1_USB, VREG_AVDD, GND, GND_USB). It is 0603 where one net is +5V, VBUS or +5V_EFUSE, because a 0402 capacitor at 5 V loses most of its capacitance. make_sch.py sets the footprint (Model.c(), the set LOW_V). Five capacitors changed from 0603 to 0402: C15 and C31 (10 µF, U1), C53 (22 µF, +3V3 output of U18), C56 and C57 (22 µF, +1V1 output of U19). C14, C52, C55 (+5V) and C62 to C64 (4.7 µF) stay 0603. The BOM has "Capacitor, ceramic, 10uF or 22uF, 6.3V, X5R, 0402" for the new parts (make_fab.py: the voltage rating comes from the highest net voltage).
  • Supplies. The TLV62569 has a 0.6 V reference: 453 kΩ / 100 kΩ gives 3.32 V, 100 kΩ / 120 kΩ gives 1.10 V.
  • RP2354A. The GPIOs of board_pins.md. CC1 and CC2 go to GPIO 26 and 27 (ADC). GPIO 12 enables the eFuse, and GPIO 13 reads its fault output. USB D+ and D- have 27 Ω series resistors.
  • eFuse. RILM 2.21 kΩ gives a current limit of about 1.5 A. The OVLO divider (383 kΩ / 100 kΩ) turns the eFuse off above about 5.8 V. A 100 kΩ pull-down keeps the eFuse off until the RP2354A turns it on.

Items to check

Check these items against the data sheets before the order:

  1. CFG[2:0]. Done: 010 is master SPI. The OrangeCrab r0.2.1, which boots from its SPI flash, ties CFG_1 to 3.3 V and CFG_0 and CFG_2 to GND (FPGA.sch). The table of the ECP5-5G Versa board manual agrees.

  2. ECP5 decoupling and supplies. The decoupling copies the OrangeCrab. Check it, the power-up order and VCCAUX against the ECP5 hardware checklist (TN1269). The csfBGA285 pinout file has no VCCJ ball. The ECP5 sysIO usage guide (TN1262) gives VCCIO8 as the supply of the JTAG balls, and VCCIO8 is 3.3 V. The model has the JTAG resistors of TN1269: 4.7 kΩ pull-ups on TDI, TMS and TDO, and a 4.7 kΩ pull-down on TCK.

  3. 74LVC4245A in DHVQFN24. The pin numbers come from the TI data sheet (SCAS375) for the 24-pin packages. Check them, and the footprint, against the Nexperia data sheet and the SOT815-1 drawing. TI marks pin 23 as "NC, VCCB". The model puts pin 23 on 3.3 V. Done on 10 November 2026: the Nexperia data sheet (Rev. 15) and the SOT815-1 drawing agree with the pin functions. They did not agree with the footprint. make_fp.py now draws the land pattern of the package drawing (pcb.md, "The DHVQFN24 footprint (10 November 2026)"). Until then, every pad was one place off and the short-side pads were 0.5 mm apart.

  4. TPS259470 footprint. Done: make_fp.py draws z80r:TI_VQFN-HR-10_2x2mm_P0.5mm from the land pattern example of TI drawing 4225183/A (RPW0010A) in the TPS25947 data sheet (SLVSFC9C). The corner pads 1, 4, 7 and 10 are L-shaped. Compare the footprint with the drawing once more before the order.

  5. RP2354A support parts. "Hardware design with RP2350" (8 November 2026) agrees with these parts of the model:

    • 33 Ω and 4.7 µF on VREG_AVDD
    • 4.7 µF on VREG_VIN and on the core supply
    • the Abracon AOTA-B201610S3R3 (3.3 µH)
    • 27 Ω on USB D+ and D-, and 100 nF at each IOVDD
    • 1 kΩ from QSPI_SS to the BOOTSEL contact (the button SW1)

    The guide has no pull-up on RUN. The 10 kΩ pull-up of the model does no harm. The layout of the regulator must copy the layout of the guide, with the inductor in the correct direction.

  6. Buck converters. The TLV62569 data sheet (SLVSDG1C) agrees with the model: 2.2 µH, 10 µF at the input, 6.8 pF across the upper feedback resistor, and from table 4 two 22 µF on the 1.1 V output and one 22 µF on the 3.3 V output. Check the saturation current of the 2016 inductors against the load of each rail.

  7. SRAM ball map and footprint. SRAM_BALLS in make_lib.py has the ball map of the IS61WV20488FBLL (U5 since 10 November 2026). On 10 November 2026 one reader took the map from the ISSI data sheet "IS61WV20488FALL, IS61/64WV20488FBLL" (August 2019, see sram.md). The fourth review (11 November 2026) could not get the data sheet and did not check the map. Before the order, compare all 48 balls with page 2 of the data sheet. Check the stock of U5 again before the order (bom_stock.md). The footprint z80r:ISSI_miniBGA-48_6x8mm_P0.75mm (0.35 mm round pads, make_fp.py) did not change with the part.

    History: until 10 November 2026 U5 was the IS62WV20488FBLL-45BLI. A text extract of the ISSI IS62/65WV20488 data sheet gave its ball map (Rev A5, ball G2 = A20). On 10 November 2026 a check compared that map and the footprint with the official PDF (May 2020), and they agreed (sram.md, "The ball map").

  8. Inductor footprints. L1 and L2 use L_Murata_DFE201610P (KiCad), the 2.0 × 1.6 mm body of the Murata DFE201610E. L4 (the Abracon AOTA-B201610S3R3) has its own footprint z80r:L_Abracon_AOTA-B201610S since the third board round of 11 November 2026 (make_fp.py, aota2016()): pads of 0.8 mm × 1.6 mm at a pitch of 1.7 mm. The data sheet shows pads of 1.0 mm × 1.6 mm. The comparison with the data sheet is done: acceptable with note (todo.md, item 5). L3 was the inductor of the 1.35 V buck. The schematic does not have it now.

  9. The USB-C shield. The shield connects to GND_USB with no filter.

History: the DDR3L (before 9 November 2026)

On 9 November 2026 the user replaced the DDR3L with the SRAM (memory.md, ddr3.md). The schematic had these DDR3L parts. All are removed:

  • the DDR3L U5 (IS43TR16128DL)
  • the 1.35 V buck U20 with L3, its divider, feed-forward and capacitors
  • the VREF divider R1/R2 and the ZQ resistor
  • the RESET and CKE pull-downs and the CK termination
  • the two ferrite beads FB1 and FB2
  • the DDR3L decoupling and the +1V35 decoupling of the FPGA

The support parts followed the OrangeCrab r0.2.1 (orangecrab-hardware, DRAM.sch):

  • VREF from two 1 kΩ 1 % resistors from 1.35 V, with 100 nF and 1 µF (VREFCA, VREFDQ and the VREF ball J1 of bank 3)
  • ZQ: 240 Ω 1 % to GND
  • CK and /CK: 51 Ω each to a 100 nF capacitor
  • VDD and VDDQ: each through a 600 Ω ferrite bead from 1.35 V. VDD and VDDQ each had 2 × 100 nF and 2 × 1 µF after the bead. The 1.35 V side of the beads had 2 × 22 µF and 2 × 1 µF.
  • 10 kΩ pull-downs on RESET# and CKE. Ball T7 (A14) had no connection on a 2 Gbit part.
  • ECP5 decoupling: two pairs on the 1.35 V banks. The 1.35 V divider was 100 kΩ / 80.6 kΩ (1.344 V).
  • The check list had the item "DDR3L. The support parts copy the OrangeCrab r0.2.1, which has a 1 Gbit part. Check them against the data sheet of the selected 2 Gbit part."

Not in the schematic yet

  • The lite version (LFE5U-12F, no SRAM).
  • Mounting holes, fiducials and logos.
  • A connector for SWD. The RP2354A has test pads for SWCLK, SWDIO and RUN. BOOTSEL has the button SW1 (recovery.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.