June – August 2026

Z80 / 68008 FPGA Processor System

Independent study (B EE 498), supervised by Dr. Arnold Berger

An FPGA platform that runs either a Z80-compatible or a 68000-compatible soft core against real EPROM and SRAM on a custom four-layer memory board, with the bus exposed to a logic analyzer.

  • SystemVerilog
  • Quartus Prime
  • DE10-Lite (MAX 10)
  • KiCad
  • Logic analyzer
Assembled memory board with socketed SRAM and EPROM chips, a bus transceiver, debug LEDs, and a 40-pin logic analyzer header
The assembled memory board: socketed SRAM and EPROM, the SN74LVC245 transceiver, debug LEDs, and the LogicPort header on the left.

Overview

The B EE 425 labs at UW Bothell use Z80 and 68000-family processor kits. The goal of this independent study was to prototype an FPGA-based platform that could replace them: a soft processor on a DE10-Lite board, external memory chips that can be programmed and probed, and a direct connection for the LogicPort logic analyzer used in the labs. The result is a working prototype; it hasn't been used in a class.

The processor cores are existing open-source projects: TV80 (Z80-compatible, MIT license) and fx68k (68000-compatible, GPL v3). My work was everything around them: the SystemVerilog bus adapters and memory interface, the memory board, and the verification. The two configurations are separate FPGA builds, and only one runs at a time.

Block diagram: inside the DE10-Lite FPGA, either the fx68k core with a 16-to-8-bit bridge or the TV80 core with a Z80 bus adapter connects to a shared external memory interface; that drives the external memory PCB with a 74LVC245 transceiver, ROM, and SRAM, which a logic analyzer observes passively
System architecture. Both builds converge on the same byte-wide memory interface and board.

Bridging a 16-bit core to an 8-bit bus

The 68008 has an 8-bit data bus, but fx68k implements the 68000's 16-bit bus with separate upper and lower byte strobes. I wrote a bridge, a small state machine, that turns each fx68k bus cycle into one or two byte-wide transactions:

  • Upper strobe only: one transfer at the even address. Lower strobe only: one transfer at the odd address.
  • Both strobes (a word access): two transfers, the upper byte at the even address and then the lower byte at the next address. Read bytes are placed in the matching half of the core's data bus.
  • DTACK is asserted back to the core only after every byte transfer has finished, so the core waits for slow memory on its own.
  • A memory controller in the top-level module performs each byte transfer with conservative fixed waits: 200 ns for EPROM reads and 100 ns for SRAM, then signals the bridge that data is ready.

Z80 side and shared memory interface

TV80 already has an 8-bit data bus, so its adapter mainly decodes addresses: when MREQ is asserted, address bit 15 selects the EPROM ($0000–$7FFF) or the SRAM ($8000–$FFFF).

Both builds feed a common memory interface module that drives the board's chip selects, read and write strobes, and the direction of the SN74LVC245 transceiver, which translates between the FPGA's 3.3 V I/O and the 5 V memory chips. Keeping processor-specific timing out of this module meant the board-level logic only had to be written and tested once.

Memory board

I designed a four-layer board in KiCad: signals on the outer layers, with a ground plane and a power plane split into 3.3 V and 5 V regions on the inner layers. It has sockets for the same EPROM and SRAM chips the existing labs use, the voltage-translating transceiver, test points and debug LEDs, and a 40-pin header that lets the LogicPort observe the bus passively without being in the signal path.

The board is the same width as the DE10-Lite (97.54 mm) and short enough to leave its switches and displays reachable when stacked on top. At assembly, the only 40-pin connector on hand was a right-angle part, so the prototype mounts at 90° to the FPGA board instead.

Routed copper of the memory board: top-layer traces in red running mostly vertically, bottom-layer traces in blue running mostly horizontally
Outer copper layers: top in red (mostly vertical), bottom in blue (mostly horizontal).
Inner power layer of the memory board, a copper plane divided into separate 3.3 V and 5 V regions
Inner power layer, split into 3.3 V and 5 V regions. The other inner layer is a solid ground plane.
3D render of the memory board showing the SRAM and ROM sockets, transceiver, LEDs, and 40-pin logic analyzer connector
3D render of the memory board from KiCad.
Lab bench with a laptop, the DE10-Lite and memory board connected to a LogicPort analyzer, and a monitor showing captured waveforms
Test setup: DE10-Lite with the memory board, the LogicPort analyzer, and its capture software.

Compared with my previous board

The meter board, two months earlier, was a two-layer design. For this one I changed how I approached layout:

  • Four layers instead of two. On the meter, the bottom layer is a ground pour that also carries traces, so the ground is cut up wherever a trace crosses it. Here, ground is a solid plane on its own layer and power has its own layer, split between 3.3 V and 5 V.
  • A routing direction per layer (top mostly vertical, bottom mostly horizontal), which kept the address, data, and control buses, more than 30 signals, manageable.
  • Two trace widths (0.25 mm for signals and 0.6 mm for power) instead of the five different widths on the meter.
  • Board dimensions taken from the DE10-Lite's mechanical drawings and caliper measurements, so it fits the FPGA board it sits on.
  • What carried over: test points and debug LEDs on the signals I'd need to probe during bring-up.
Copper layers of the two-layer capacitance meter PCB
Capacitance meter, April–June 2026: two layers.
Outer copper layers of the four-layer memory board
Memory board, June–August 2026: four layers (outer layers shown).

Verification

Each RTL module has a SystemVerilog testbench. The memory interface was tested for reset, idle, ROM reads, SRAM reads and writes, and an attempted ROM write; the Z80 adapter for ROM and SRAM access; and the bridge for upper-byte, lower-byte, and word reads and writes.

On hardware, I captured the bus with the LogicPort at 500 MHz. The fx68k build comes out of reset, reads its initial stack pointer ($0000FFFF) and program counter ($00001000) from the EPROM, and continues executing from $1000. The Z80 build ran a memory-test ROM that wrote $AA to $818C and read it back, and the captures confirmed its 5 MHz clock.

Logic analyzer capture of the fx68k build reading addresses 0 through 7 from ROM and then fetching from address 1000 hex
fx68k leaving reset: reads of addresses $0–$7 (stack pointer and program counter vectors), then fetches from $1000.
Logic analyzer capture of byte writes to SRAM starting at address 8000 hex, with chip select and write strobes asserted
Byte writes to SRAM starting at $8000.

Limitations and next steps

I prioritized reliable memory access over cycle-accurate timing. The Z80 build runs at 5 MHz rather than a Z80A's 4 MHz and doesn't insert wait states. The fx68k build runs at 25 MHz with conservative fixed delays rather than at 68008-like speeds, and its address strobe comes from the memory controller rather than the original bus sequence. Next steps would be tightening the delays to the actual memory timings, a more cycle-accurate bus, interrupt support, and more test programs.

A side quest: getting Quartus and the USB-Blaster working on an Apple Silicon Mac took a Debian VM in UTM with a patched Rosetta binary. I wrote up the steps and fixes in the report for the next student who tries it.