Skip to content

P32W — a 32-bit homebrew computer and its Unix

P32W is a 32-bit computer built from discrete 74-series logic, GALs, SRAM and flash, on 9U × 340 mm cards with three 96-pin bus connectors each, in a 10-slot backplane. The ALU is an FPGA module (a Tang Nano 20K, in sockets: every part is through-hole). It runs a custom load/store instruction set with traps, interrupts and virtual memory, and P32W Unix, a multi-user V6-style Unix written in C, with a native C compiler, assembler and linker, MicroPython, Lua, SQL, BASIC and networking.

The cards are designed and laid out in KiCad; the software runs today on two emulators, one of them at the level of the microcode.

I'm Ken Rother. I designed P32W. Claude, Anthropic's AI, has been directly involved in its design, coding and documentation.

My other projects

At a glance

Word 32-bit, load/store, fixed 32-bit instructions, byte addressing, little-endian; no condition flags (branches compare two registers)
Modes supervisor and user; each user program has a 2 GiB virtual address space through a software-managed TLB
Memory a 1 MiB boot ROM at address 0, RAM above it on one to four 16 MiB memory cards (up to 64 MiB), the I/O page at the top
Speed a 3 MHz microcycle (4 MHz with the clock jumper), about 6–7 microcycles per instruction: roughly 0.5 MIPS
Bus synchronous, one clock, stretched by -WAIT; physical memory cycles, interrupts and arbitration only. The CPU and MMU / data cards have a private link of their own
Disk 2 CompactFlash sockets and 2 IDE ports
I/O 4 serial ports, timer, real-time clock, 2 USB, Ethernet and Wi-Fi
Video VGA 640 × 480, drawn by an HD63484 ACRTC; an 80 × 25 console; PS/2 keyboard and mouse

The cards

  • CPU card, KiCad render

    CPU — the sequencer and microcode, the register file, the ALU in its FPGA module, the clock.

  • MMU / data card, KiCad render

    MMU / data — address translation, the bus master interface and the arbiter.

  • Memory card, KiCad render

    Memory — 16 MiB of SRAM and the boot ROM; one to four of them.

  • Disk card, KiCad render

    Disk — two CompactFlash sockets and two IDE ports.

  • I/O card, KiCad render

    I/O — serial ports, timer, clock, USB, Ethernet and Wi-Fi.

  • Video card, KiCad render

    Video — VGA from an HD63484 ACRTC, and the PS/2 keyboard and mouse.

  • Debug card, KiCad render

    Debug — a logic analyzer on every bus line, or the bus master that tests each card alone.

  • Backplane, KiCad render

    Backplane — the ten slots the cards plug into.

The pictures are KiCad renders of the boards as laid out, turned so the bus connectors are at the bottom.

Where to start