z86 is an Apache-2.0 open-source, out-of-order IA-32 processor designed for FPGA, intended both to preserve 1990s PC software and to provide a real x86 implementation for learning about processor design. Developed over three months using Intel P6 documentation and a Pentium Pro as references, it targets the Xilinx ZCU104 and Kria KV260. The resulting system boots MS-DOS, Windows 95, 98 SE and NT 4.0, as well as 32-bit Linux; at 150 MHz it runs DOOM at 85 FPS and Quake at 35 FPS. Its central advantage over the earlier in-order z486 is that it can run independent instructions while an earlier operation waits on memory or arithmetic. Register renaming removes false dependencies, while a reorder buffer preserves in-order commitment and precise recovery from faults.
The full design has an in-order front end that decodes variable-length x86 instructions into micro-ops, an out-of-order execution core, and an in-order retirement engine. It includes three-wide decoding, a 40-entry reorder buffer, a 16-entry reservation station, five execution ports, 16 KiB instruction and data L1 caches, and a 512 KiB FPGA-URAM L2 cache. The author reports roughly three times z486’s performance per MHz, while emphasizing the extra complexity of x86 features such as partial-register writes, x87, self-modifying code and precise exceptions. FPGA-specific choices include BRAM-based branch prediction and DSP-assisted division. To reduce debugging risk, the project first built a sequential C simulator that executed the same micro-ops; it validated system and instruction semantics before those operations were integrated into the speculative RTL.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.