Code Agents and FPGA Development: A 97-Round Experiment Log
Three CPU systems built from scratch on a 6,272-logic-element entry-level FPGA. This post records the whole process, quantifies the efficiency gains, and — most importantly — the traps the agent actually fell into. 1. Experimental Setup Hardware Item Value Board Entry-level Cyclone IV dev board Device EP4CE6F17C8 — 6,272 LE / 392 LAB / 30×M9K (276,480 bit) Clock 50 MHz Peripherals VGA (640×480@60), 32MB SDRAM, USB-UART, 4×LED, 4×buttons Programmer USB-Blaster compatible Toolchain (final form) Stage Tool Config / Role Synthesis & place-and-route Quartus Prime Lite 20.1.1 Running in a QEMU full-system x86-64 VM (Ubuntu 22.04); one build takes 230–530 s Logic simulation Verilator 5.052 --cc --exe --build --public; 2M cycles in about 0.5 s Flashing openFPGALoader ≥ 1.1.1 Over SSH on a separate Linux host; -c usb-blaster 6502 assembly cc65 2.19 (ca65 / ld65) -t none + custom NROM-128 linker script RISC-V build xPack riscv-none-elf-gcc 15.2.0 newlib included, builds NEORV32 firmware Version control git 14 commits, 5 hardware-verified bitstreams Three key choices and what they cost: ...