Video Timings: VGA, 720P, 1080P

Welcome to the FPGA Cookbook.

This is part of a new series of handy recipes to solve common FPGA development problems. Look out for more FPGA cookbook posts soon.

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 three common modes using analogue VGA, DVI or HDMI: 640x480, 1280x720, and 1920x1080 all at 60 Hz.

Feedback to @WillFlux is most welcome.

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 screen. The following diagram illustrates the different parts of the display signal for 640x480 at 60Hz; the HD resolutions work in a similar way.

Video Timings

Video timings are a complex area with different specifications, for example Coordinated Video Timings includes four timing varients for common HD resolutions. The HD timings presented here are conservative values that should work with most displays.

The sync polarity in the following tables refers to whether sync pulses should be positive or negative. The memory values show how many kilobits (NOT bytes) of memory you need to store a single frame. The data rate is the required bandwidth for 24 bits-per-pixel with the included timings.

VGA 640x480 60Hz

The classic VGA display that works with analogue VGA monitors as well as most modern HD displays. You can usually get away with using 25 MHz as the pixel clock, which can be handy if you're using a simple divider to create the pixel clock. Arty VGA Graphics in Verilog Part 1 includes a Verilog design using this display mode.

EDID Name        DMT0659
Aspect Ratio         4:3
Pixel Clock       25.175 MHz
Pixel Time         39.72 ns
Active Pixels    307,200 total
8-bit Memory       2,400 Kbits
32-bit Memory      9,600 Kbits
Data Rate           0.60 Gbps

Horizontal Timings
Active Pixels        640
Front Porch           16
Sync Width            96
Back Porch            48
Blanking Total       160
Total Pixels         800
Sync Polarity        neg

Vertical Timings
Active Pixels        480
Front Porch           11
Sync Width             2
Back Porch            31
Blanking Total        44
Total Pixels         524
Sync Polarity        neg

VGA timings from Rick Ballantyne via Martin Hinner.

HD 1280x720 60Hz

The lowest of the common HD resolutions, 720P is widely supported and has relatively modest bandwidth requirements: an 8-bit 720P display requires less than 8 Mbits per frame. Note how the pixel clock of 720P is half that of 1080P (below): this simplifies your design if you need to support both resolutions.

EDID Name           720p
Aspect Ratio        16:9
Pixel Clock        74.25 MHz
Pixel Time        13.468 ns
Active Pixels    921,600 total
8-bit Memory       7,200 Kbits
32-bit Memory     28,800 Kbits
Data Rate           1.78 Gbps

Horizontal Timings
Active Pixels       1280
Front Porch           72
Sync Width            80
Back Porch           216
Blanking Total       368
Total Pixels        1648
Sync Polarity        pos

Vertical Timings
Active Pixels        720
Front Porch            3
Sync Width             5
Back Porch            22
Blanking Total        30
Total Pixels         750
Sync Polarity        pos

720P timings from monitor EDID.

HD 1920x1080 60Hz

The 1080P HDMI monitor or television has been the dominant specification for some years. If you're only going to support one resolution then 1920x1080 is a solid choice. A full 32-bit 1080P display requires just under 64 Mbits per frame.

EDID Name          1080p
Aspect Ratio        16:9
Pixel Clock        148.5 MHz
Pixel Time         6.734 ns
Active Pixels  2,073,600 total
8-bit Memory      16,200 Kbits
32-bit Memory     64,800 Kbits
Data Rate           3.56 Gbps

Horizontal Timings
Active Pixels       1920
Front Porch           88
Sync Width            44
Back Porch           148
Blanking Total       280
Total Pixels        2200
Sync Polarity        pos

Vertical Timings
Active Pixels       1080
Front Porch            4
Sync Width             5
Back Porch            36
Blanking Total        45
Total Pixels        1125
Sync Polarity        pos

1080P timings from monitor EDID.

©2018 Will Green.