Building a DIY Computer Based on FPGA
A detailed journey of designing and building a homemade FPGA computer from scratch — from soldering BGA chips at home to booting Linux at 1080p with a custom SoC.
This is the story of my project to build my own computer with an FPGA from scratch. Instead of using off-the-shelf boards, I designed the electronics, laid out PCBs in KiCad, and soldered the components myself. The goal was to create a device capable of running Linux with a connected display and keyboard.
What Was Done
The project includes several stages:
- Hardware — designing the PCB with an FPGA and all necessary peripherals, ordering from China, and soldering at home
- SoC (System on Chip) — using existing IP cores (including the VexiiRiscv processor core) with custom components in Verilog and SpinalHDL
- BIOS — written from scratch, including initialization, memtest, RISC-V SBI implementation, command line, and Linux bootloader
- Linux drivers for custom peripherals
- TTY implementation with ANSI escape code handling for ncurses
All code, schematics, and files are available on GitHub.
Background
I had experience with FPGAs from 10 years ago, when I used a Marsohod2 board and tried to create my own processor. The current project started a year and a half ago when I rediscovered that board and decided to build something more ambitious.
My previous soldering experience was limited to microcontrollers in DIP packages. This time I decided to tackle more complex components.
The First Prototype
Planning
Given my lack of experience with BGA packages, I chose something "as complex as possible but still realistically solderable" — the MAX10 series FPGA (10M50SAE144) with 50K logic elements.
Components:
- Memory — four DDR1 chips AS4C64M16D1 (128 MB each) in parallel
- Keyboard — USB connection via two data lines with 15K resistors to GND
- Display — HDMI output, based on examples from Marsohod3
- Storage — SD card (following the fpga4fun.com schematic)
- Other — LEDs, buttons, DAC for audio, Ethernet jack
Decoupling capacitors were added for power stabilization, along with removable jumpers for connecting voltage regulators (5V → 3.3V → 2.5V).
Soldering and First Problems
I bought a hot air station and started testing. The first attempts revealed many difficulties:
Mistakes:
- Too much solder paste caused bridging (short circuits)
- Forgot to connect CC1 and CC2 resistors in the USB-C connector to GND (5.1K), which prevented charging from working
- DC-DC converter U7 was soldered upside down (the chip had an alternative pinout)
- Linear regulator AP2114HA-2.5TRG1 — the letter "A" indicated an alternative pinout, which I initially missed
- Traces were damaged while soldering the HDMI connector
- Wrong FPGA pins were chosen for video output (Quartus required specific pins with DDR IO support)
Successes:
- The programmer (FTDI) worked on the second attempt
- The FPGA was detected via JTAG after a day of cleaning pins
- SD card reads successfully
- LEDs blink
Failures:
- HDMI display shows "No signal"
- DDR1 memory doesn't work
- Audio was not tested
The first board was lost after six months of use — the memory failed, likely due to improperly functioning power supply capacitors.
Second Board Version
Key improvements:
- One memory chip instead of four (higher probability of success)
- FPGA and memory on opposite sides of the board for shorter traces
- Built-in programmer on a single board (verified working)
- Added two Si5351A frequency generators (configurable via I2C), since a single PLL in the 10M50SAE144 wasn't enough
- Redesigned audio output (stereo 12-bit, 44.1 kHz)
- Reoptimized HDMI routing
- Added a power button
By this point, soldering experience had accumulated and the main issues were resolved.
Second Version Results
- Single-core CPU running at 60 MHz
- Linux boots successfully
- Display works, but green artifacts appear at 1280x720 resolution
- Instability when connecting USB devices
- After six months, the board degraded (memory and video problems after heating)
Third Version (Current)
The decision was made to switch to BGA components for a more powerful system.
Component Selection
- FPGA — Efinix Ti60F256 (256 BGA pins, 0.8 mm pitch)
- Memory — IM8G16D3FFBG DDR3L 1 GB (96 BGA pins)
- Board — 6-layer PCB (approximately $100)
PCB Design
DDR3 requirements:
- Data trace length matching
- Specific impedance requirements
- Numerous power decoupling capacitors (0603 minimum size)
- Separate layer allocation for address/command signals
Additional components:
- TMDS serializer (TFP410) to eliminate video artifacts
- USB current limiter
- SD card voltage switching (3.3V/1.8V for UHS-1)
- RTC with battery backup
- ESP32 module for WiFi
- Second USB-C port with USB Power Delivery support
BGA Soldering
The process of soldering the new components using a bottom heater:
- Applying solder paste through a stencil
- Melting at 221°C to form solder balls
- Soldering the bottom side with hot air at 183°C
- Hand-soldering connectors
The first attempt was successful — all contacts soldered correctly with minimal bridging.
System On Chip
The architecture includes several IP blocks arranged around the processor core and peripherals.
Third Version Results
- Processor runs at 220 MHz (compared to 60 MHz previously)
- Performance — 495 DMIPS (2.25 DMIPS/MHz) on the Dhrystone benchmark
- Display — 1920x1080 at 50 Hz without artifacts
- Memory — 1 GB DDR3, running at 333 MHz (instead of the target 400 MHz)
- Audio — acceptable quality
- SD card — SDR50 mode works stably
- WiFi — not yet tested
Future Plans
I intend to use the remaining 10K logic elements of the FPGA to create a simple GPU and attempt to run DOOM or Quake.
Key Lessons
- Proper power supply planning is critical for stability
- Test firmware should be written before designing the board
- Studying datasheets and standards (DDR3, HDMI, USB) is essential
- BGA soldering during production is simpler than repairs
- Iterative board design refinement yields the best results