10-17-2018 02:42 AM - edited 11-13-2018 08:06 AM
Video timing is the heart beat of a video system. Thus, its understanding is important for a good foundation to video system development. In this Video Beginner Series 16, we will use the Xilinx Video Timing Controller (VTC) IP configured as generator. This Video Beginner Series is intended to complete the Video Beginner Series 1 on the timing part.
For documentation on the Xilinx Video Timing Controller IP refer to its product guide PG016.
The table below is an example of timing parameters you can get for a specific resolution. In this case, it is the timing parameters for 640x480p @60 Hz.
To understand how this parameter are used, we can use an example: An image with 480 lines and 640 pixels per line. Each pixel will be name by its line and its column Pline,column. For example, the first pixel of the first line will be P1,1 and the last pixel of the first line P1,640.
Each active video line is enclosed by horizontal blanking periods during which horizontal sync signals will happen. The time between the beginning of the blanking period and the start of the sync is call front porch and the time between the end of the sync signals and the end of the blanking period is call back porch. The horizontal active time is the time between two horizontal blanking periods (excluding the time of the blanking period).
For example, this is how the second line would be transmitted:
Each frame is enclosed in vertical blanking periods during which vertical sync signals will happen. The vertical active time is the time between two vertical blanking periods.
In the name of the 640x480p @60Hz resolution you might have noticed two other elements in addition to the frame size:
The @60Hz can easily be found in the resolution table. This is the refresh rate. This means that there will be a new image at a 60Hz rate so 1 image per second. Note that in many case the refresh rate is not mentioned for 60Hz as it is a common case.
The letter p means that the video is sent as progressive or non-interlaced. Interlaced video sent only 1 line every 2 lines for each frame. We will see interlaced video in a future Video Series. In progressive mode, all the lines are sent to the monitor (or receiver).
Note 1: This tutorial is intended to be used only with Vivado 2018.1
In the block design there is only the Video Timing Controller (VTC) connected. We can check how it is configured
We can see that we can find some of the timing parameters for 640x480p from the previous table. Some other can be find by calculus:
Note that there are no settings for the tome of the blanking signals. This is because the VTC will set them at the end of an active period and unset them at the beginning of the next active period.
We can see that the Vsync happens after 10 lines, which match the timing parameters for 640*480p@60Hz, but this is not what we were expecting from the VTC configuration. This is because there is one part of the configuration we haven’t looked at yet: The Horizontal Fine Adjustment.
We can see that the Vsync now happens after 9 lines (was 10 with the default configuration).
The Vertical parameters are usually defined in lines count. Thus, if you want to vary the time when vsync happens (same thing applies to the vblank) with a pixel clock precision, you will need use the Horizontal Fine Adjustment. The times start at the falling edge of hsync.
This small nuance can be spotted in the wording of PG016:
These settings can be useful when a receiver is requiring specific timing parameters.