↓ Skip to main content

Building a VGA Card with FPGA: A Hardware Design Guide

Building a VGA Card with FPGA: A Hardware Design Guide

Field-programmable gate arrays (FPGAs) are versatile electronic devices composed of logic blocks interconnected by programmable wires. By configuring these connections, you can build anything from simple XOR gates to complex central processing units (CPUs) or entire system-on-chip (SoC) architectures, depending on the scale of the hardware available.

FPGAs are frequently used to emulate legacy systems, such as the MiSTer project or Jeri Ellsworth’s C-One. Their primary advantages are speed, stability, and adaptability across various applications. This article details the experience of prototyping a custom circuit board to drive a VGA output.

🛠️ Circuit Board Design
#

For this prototype, I selected the Xilinx Spartan 7 series. The XC7S6 is a cost-effective choice, offering 6,000 logic units and 100 I/O pins. I used the FTGB196 package, which features a 1mm pin pitch and a 15mm x 15mm footprint—large enough to be manageable during the soldering process.

FPGAs require multiple voltage rails. In this design, the I/O pins operate at 3.3V, but the core logic requires 5V, 1.8V, and 1.0V. Managing these four distinct voltages is a standard requirement in FPGA design. Each rail needs a dedicated voltage regulator and smoothing capacitors. Once these power stages are designed, they can be reused in future projects.

I used KiCAD for the PCB layout. One advantage of KiCAD is its ability to handle complex components like FPGAs by breaking them down into sub-components. This allows you to display only the relevant pins or sections of the FPGA on different schematic sheets, keeping the design organized and readable.

The first iteration of the board was relatively sparse. I included a solder pad for SRAM and a USB-to-UART chip. While the SRAM circuitry is straightforward, finding chips with the correct footprint can be tedious. I also included a Pmod connector, a standard interface from Digilent, to facilitate peripheral connections.

🌡️ Soldering BGA Components
#

FPGAs typically use Ball Grid Array (BGA) packaging, where the connections are small solder balls underneath the chip rather than visible pins. While industrial manufacturing uses reflow ovens and robotic placement for high-volume production, hobbyists face a significant challenge with BGA.

I opted for a T962A reflow oven, a popular choice for manual BGA work. The process involves applying solder paste—a grey, viscous substance containing tiny solder spheres. When heated, the paste melts and flows via capillary action to form the joints.

To apply the paste, a stencil is required. While metal stencils are expensive, I sourced a supplier in the UK who provided laser-cut polyester film. Although polyester isn’t the premium choice, it works well for single-component projects. To simplify the build, I only reflow-soldered the FPGA, while other components were handled via manual soldering.

A key tip for using coated film: use circular patterns on a mask rather than small, adjacent rectangles. Thin film cannot withstand significant friction, and improper patterns can cause solder paste to splatter.

During the reflow process, I found that plotting an inverted “V” shape on the temperature profile provided the best results for the FPGA. This curve aligns with the manufacturer’s recommended specifications for thermal management.

🔧 Manual Soldering and Troubleshooting
#

Most other components on the board use the 2012 (0805) package. Manual soldering for these involves applying solder to one pad, tacking the component in place, and then soldering the remaining side. For larger components, a three-step process involving solder, flux, and solder wire is more effective.

Alternatively, you can solder all pins first and then trim the excess. This often yields cleaner results. Because some joints can look correct but fail to make electrical contact, a magnifying glass is essential for inspecting every point.

📺 VGA Graphics Processing
#

After completing the soldering and passing initial tests, the FPGA is programmed via a JTAG cable. The first milestone is simply lighting an LED. Using Xilinx Vivido software, you can build and flash small designs to verify the hardware.

The next step is implementing VGA. Although VGA is an older standard, it remains highly reliable. Because it involves analog signals, it requires additional components. To simplify the digital-to-analog conversion, I used a Digilent VGA Pmod. This small board plugs into two Pmod connectors on the main PCB, leaving the FPGA to handle the digital signal generation.

For those interested in the underlying logic, there are extensive resources available regarding FPGA graphics processing. Utilizing existing codebases can significantly accelerate the development of the VGA controller.

🚀 Future Research Directions
#

FPGAs are powerful but hardware debugging is inherently complex. Once a chip is soldered, it is difficult to remove or test directly. While test probes can be used, many signals in FPGA processing are too high-speed and high-bandwidth for standard probing.

This project covers the fundamentals, but there is significant room for expansion. Future work includes optimizing memory management, integrating more peripherals, refining audio paths, and improving image processing. For those working on real-time hardware systems, understanding the underlying architecture is a prerequisite for high-performance computing, as seen in systems like VxWorks.

The effort required to overcome these hardware hurdles is significant, but the results are rewarding when the final display comes to life.

Related