VGA

FPGA VGA Graphics in Verilog Part 3

FPGA VGA Graphics in Verilog Part 3

Welcome back to my FPGA graphics tutorial series using the Digilent Arty or Basys3 boards. In part 2 we introduced bitmapped displays and loaded graphics files into memory. In this third part we animate sprites using bitmaps and double buffering: this classic technique is a staple of 2D games. By the end of this tutorial you'll be able to control a sprite using the switches on your FPGA board.

The principle of double buffering is simple: you draw on one buffer while driving the monitor from the other. This gives you an entire frame time (1/60th second) to create your image, whilst avoiding any screen tearing. There are two downsides: you need twice the memory and you increase latency by one frame.

Read More

FPGA VGA Graphics in Verilog Part 2

FPGA VGA Graphics in Verilog Part 2

Welcome back to my FPGA graphics tutorial series using the Digilent Arty or Basys3 boards. In part 1 we created a VGA module and used it to animate squares on screen. In this second part, we introduce bitmapped displays. By the end of this tutorial, you'll be able to load your own image into FPGA memory and display it on your monitor.

Bitmaps
A bitmapped display is backed by a memory array: each pixel corresponds to a location in memory. To create the display we read out the value of the current pixel from its memory location. To set the colour of a pixel, we  modify the contents of its associated memory location. Bitmaps provides two significant benefits: we're free to create sophisticated graphics using whatever technique we like, and the setting of pixel colour is separated from the actual screen drawing process. The big downside of a bitmapped display is we need significant memory to store our pixel data.

Read More

Video Timings: VGA, SVGA, 720P, 1080P

Video Timings: VGA, SVGA, 720P, 1080P

You Need Video Timings

To work with standard monitors and TVs you need to use the correct video timings. This recipe includes the timings for four common modes using analogue VGA, DVI or HDMI: 640x480, 1280x720, and 1920x1080 all at 60 Hz.

Video Signals in Brief
Video signals have two phases: drawing pixels and the blanking interval. The sync signals occur within blanking intervals; separated from pixel drawing by the front porch and back porch. Horizontal sync demarcates a line and vertical sync a frame. The following diagram illustrates the different parts of the display signal for 640x480 at 60Hz; the HD resolutions work in a similar way.

Read More

FPGA VGA Graphics in Verilog Part 1

FPGA VGA Graphics in Verilog Part 1

This tutorial series introduces video graphics programming using FPGAs, starting with creating a VGA driver and moving onto more advanced features including bitmaps, sprites and effects. FPGAs excel at high-speed I/O and custom logic: you'll be surprised how much you can achieve with a few lines of Verilog.

This series is designed around the Digilent Arty and Basys 3 boards. If you're using the Arty you also need the VGA Pmod (the Basys3 has VGA output built-in). Detailed requirements are given below.

Read More