A Simple VGA Interface for the XuLA FPGA Board

XESS Boards have had built-in VGA interfaces since 1997 (and I stole the idea from others who were doing it before that). But the new XuLA FPGA board doesn't have any extraneous parts (just an FPGA, SDRAM, configuration flash and a USB interface), so how do you display graphics with it?

A simple VGA interface can be built on a breadboard with some resistors and a connector. The red, green and blue VGA signals are each driven by a simple DAC like the one shown below. Each color input presents a 75-ohm load to the DAC. The DAC resistors combine with the load resistor to divide the 3.3V digital logic outputs so the total stays below the maximum 0.7V expected by the VGA input. A set of five resistors that scale upwards by a factor of two will implement a single five-bit, 32-level DAC, so fifteen resistors are needed to drive the RGB inputs to create a total of 32 x 32 x 32 = 32,768 colors. Two additional digital outputs are needed to drive the active-low horizontal and vertical sync signals. So a total of 17 outputs are needed from the FPGA to drive a VGA monitor. (Of course, you can reduce the number of FPGA pins by reducing the number of color levels. For example, a simple black/white VGA display only needs a single resistor and three output pins.)

That's all good in theory, but the practical result is messy. Shown below is what a smaller 8 x 8 x 8 = 512-color VGA interface looks like. Only three resistors are needed in each DAC, and a total of eleven wires connect the VGA interface to a XuLA board. Then the DAC outputs, sync outputs and signal ground have to be soldered to a VGA connector (which I sawed off of an old XSA-3S1000 board). It's not that bad to build this once, but you wouldn't want to develop VGA apps if you had to rig this up every time.

To reduce the drudgery, I designed a small, two-layer, 8/8-mil trace/space PCB that integrates the resistors and VGA connector into a form that can be plugged into a breadboard with 0.3" spacing. I submitted the Gerber files to ITEADstudio and I received the following PCBs eighteen days later (five days for fabrication, thirteen days by mail to North Carolina, USA). Total cost for ten PCBs + shipping: $16.

Here's an assembled VGA board and what it looks like connected to a XuLA board.

And here's a photo of some VGA output generated by this board. I loaded the SDRAM on the XuLA board with an 800 x 600 image that the FPGA continuously reads and displays on a monitor through the VGA interface. I couldn't use the exact DAC resistance values when I assembled the board because the resistor arrays only come in a limited number of values, but this doesn't seem to cause noticeable distortions in the displayed colors. (The Moire pattern you see in the picture doesn't appear when viewing the actual image on the monitor. It's caused by aliasing between the monitor's spatial screen resolution and the image resolution of my camera.) 

Overall, I'm happy with the results I can get with this low-cost board. The only change I plan to make is to widen the board from 0.3" to 0.5" so the resistor arrays can be placed on the top side of the PCB while still leaving room to label the pins.

Below, I attached a ZIP file with the Eagle 5 design files for this board including the CAM and DRC files for the ITEADstudio PCB service.

Taxonomy upgrade extras:

Comments

Hello, Great board! How do you program it? The tools are free? I think I will buy one to start learning FPGA's. 

Regards,

Deian,

The XuLA Board is programmed using the free XSTOOLs software. The FPGA bitstreams and SDRAM data are sent through the USB port.

The FPGA bitstreams are created using the Xilinx ISE software. You can download a free version called WebPACK from www.xilinx.com. Be prepared for a 3 GB download.

 

check out an R-2R resistor dac instead.  You can get these prefabbed in R-packs

Yeah, I looked at some of those. They were much larger and more expensive than the resistor arrays, and the output impedance of the R2R didn't match with the 75-ohm input resistance of the VGA inputs so I would need to add a buffer. Do you have a particular R2R that doesn't have these drawbacks?

Hi,Are the diodes necessary for xilinx or altera fpgas? If so, do you have any recomendations on a non-smd diode?best -Magnus 

Diodes? There aren't any diodes in the VGA interface, just resistors.