HDMI

Overview: You should learn VGA first!

It's a common pattern to use a rgb-to-dvi ip core to recieve VGA signals and transform them to HDMI signals. So you don't need too much knowledge about HDMI. Remember our design pattern, which is shown below. Our rgb-to-dvi instance just lies in "Video Out".

I don't know the details about HDMI, I just list the key points.

Key points

Connector

A standard HDMI connector has 19 pins. Out of the 19 pins, 8 are of particular interest as they form 4 TMDS differential pairs to transport the actual high-speed video info.

  • TMDS clock+ and clock-

  • TMDS data0+ and data0-

  • TMDS data1+ and data1-

  • TMDS data2+ and data2-

HDMI output enable is occasionally necessary, but most of the time it is not.

Does HDMI needs synchronization signals? If answer is yes, where? If answer is no, why? (answered in later sections)

TMDS

Video data travels on the Transition Minimised Differential Signalling (TMDS) physical layer in HDMI, same as DVI. TMDS signalling standard encodes 8 bits of each colour (RGB) into 10 bits. The information is then transmitted at 10x the speed of the pixel clock. This format is called 8b/10b.

Control data

C0 and C1 are control bits. We map HSYNC and VSYNC signals to the C0 and C1 ports of blue encoder. We set other control bits in green and red encoder 0.

Why we only map the control signals to blue encoder?

Video timings

Similar to VGA.

Source code

TMDS encoder

The code comes from fpga4fun. Thanks to the work of Jean P. Nicolle.

It's will take time to understand what's going on inside the module, but don't worry because we have a formidable weapon: abstraction.

Simple rgb2dvi converter

We often use third-party rgb2dvi IP cores.

Put it all together

generate clock_480p using IP cores

Don't leave it at the default settings. That will not work!

signal_480p.sv

painter_480p.sv

top.sv

Use PLL or MMCM ip cores to generate pixel clock and TMDS clock.

Test

Our test board is ZYNQ7000 AX7020. The pins assignment file is given at ZYNQ7000-AX7020.xdc.

Here is our screen output.

References

Last updated