Building z86: Lessons from Implementing an Out-of-Order x86 CPU on FPGA nand2mar...
HN Best 200 @best
Building z86: Lessons from Implementing an Out-of-Order x86 CPU on FPGA nand2mario.github.io · 12 points · 1 comments · HN thread
TL;DR The author describes z86, an open-source (Apache-2.0) out-of-order, superscalar IA-32 CPU core for FPGA, and its PC platform z86_pc, which boots MS-DOS, Windows 95/98 SE/NT 4.0 and 32-bit Linux on ZCU104 and Kria KV260 boards. The post covers the architecture (3-wide decode, 40-entry ROB, 512 KiB URAM L2), a sequential C reference simulator, real Pentium Pro measurements, lockstep co-simulation against 86Box, and benchmark comparisons with historical CPUs and other open FPGA cores.
- z86 uses a 4-1-1 decode arrangement, 40-entry ROB, 16-entry reservation station, 5 execution ports and 3 writeback buses; the FULL profile uses about 183.6k LUTs on ZCU104 and reaches 108 MHz worst-case Fmax, running stably at 150 MHz.
- A reduced LITE profile targets the $250 Kria KV260 with 1-decode/2-issue, 8K/8K L1 and 256K L2, using about 94.5k LUTs.
- Reported results: DOOM at 84.8 FPS and Quake at 35.2 FPS at 150 MHz on FULL; Dhrystone 1.03 DMIPS/MHz and CoreMark 2.56/MHz live on i686 Linux.
- A sequential C simulator (p6.c) was built first to validate micro-op semantics before the speculative RTL, and a Pentium Pro was used with a serial monitor to check edge cases on real hardware.
- Verification relies on lockstep co-simulation against 86Box, which also surfaced several emulator bugs, plus an on-chip debugger (z86-dbg, about 470 LUTs) that uses BUFGCE clock gating to freeze the CPU.
- The project is positioned as a teaching artifact and foundation for open-source FPGA/ASIC work, since open out-of-order x86 RTL was previously unavailable.
Discussion The comment thread is essentially empty: the only comment is a short note from the author offering to discuss FPGA development and retro CPU design. There is no community debate or mood to report beyond that single invitation.
#x86 #FPGA #outOfOrder #CPUDesign #retroComputing #openSourceHardware