Part 24 - Create a cascading Video TPG design for HDMI output
Introduction
This tutorial details the steps required to create an overlaying video TPG design using Vivado. The video output will be delivered via the HDMI port on the Zedboard. The tutorial covers quite a range of activities and includes the use of numerous languages; TCL, Verilog, System Verilog & shell scripting. TCL will be used extensively to add elements to an existing Block Design and wire them up.
Note: Everywhere there is a text edit command (subl) there will be a wget below it to fast track the process.
Starting from this point is possible but requires a few pre-requisites.
Vivado 2022.2 & PetaLinux 2021.2 are installed & set-up (ideally in /opt/Xilinx).
The other support applications are installed and set-up; minicom, git, sublime-text & sshpass. See Part 1 for more information.
The (remote) SpaceWire UK Tutorial repository is present on your server at say git@192.168.2.20:swuk_tutorial.git or at say ${HOME}/repos/swuk_tutorial.git.
Note: Only perform the following if not continuing from the previous tutorial.
Example: Setup the remote repository (on the local machine). This is required to perform GIT push commands.
The (global) shell initialisation script has been sourced (so it sources the SWUK local SIS).
steve@Desktop:~$ source ~/.bashrc
Vivado & Vitis are setup to use the 2022.2 version (due to an end-of-year bug in the Video IP generation of 2021.2). PetaLinux is setup to use the (existing) 2021.2 version (due to later versions not being backwards compatible).
steve@Desktop:~$ swuk_xilinx 2022.2 2021.2
Tools are as follows :-
Vivado @ /opt/Xilinx/Vivado/2022.2/bin/vivadoSDK @ Not available!Vitis @ /opt/Xilinx/Vitis/2024.2/bin/vitisPetaLinux-build @ /opt/Xilinx/PetaLinux/2021.2/tool/tools/common/petalinux/bin/petalinux-build
Plugged into the ZedBoard is a FAT32 formatted SD card containing the PetaLinux v14.0 (or higher) boot files (generated in Part 20).
The Zedboard boot mode jumpers are configured for SD Card boot.
The Zedboard hardware is connected up for comms, internet & HMDI video.
1. Xubuntu PC USB ⇄ Zedboard USB JTAG/Debug.
2. Xubuntu PC USB ⇄ Zedboard USB UART.
3. Zedboard Ethernet ⇄ Router.
4. Xubuntu PC Ethenet ⇄ Router.
5. Router ⇄ Internet.
6. Zedboard ⇄ Monitor (HDMI).
The Zedboard is now powered-up & present on the LAN.
steve@Desktop:~$ ping -c 1 ${swuk_zedboard_ip}
PING 192.168.2.87 (192.168.2.87) 56(84) bytes of data.
64 bytes from 192.168.2.87: icmp_seq=1 ttl=64 time=0.149 ms
--- 192.168.2.87 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.149/0.149/0.149/0.000 ms
The debug terminal emulator is up and running (optional).
steve@Desktop:~$ swuk_terminal
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyACM0, 06:34:25
Press CTRL-A Z for help on special keys
PetaLinux 2021.2 petalinux /dev/ttyPS0
petalinux login:
#### Part 2 - Firmware Development - 1 ####
2. Create a new firmware project
Create a brand new baseline project that can be expanded upon to include the new features required.
steve@Desktop:~$ cd ${swuk_tutorial}
steve@Desktop:~/swuk_tutorial$ swuk_create_project zedboard_video_tpg_hdmi --baseline
Enter details for the header blocks...
File .......... zedboard_video_tpg_hdmi
Author ........ Steve Haywood
Company ....... SpaceWire UK
Website ....... http://www.spacewire.co.uk
Project ....... Zedboard Video TPG HDMI
Tutorial ...... SpaceWire UK Tutorial
Date .......... 9 Feb 2026
Version ....... 1.0
Creating project directory structure...
Creating baseline project...
steve@Desktop:~/swuk_tutorial$ cd zedboard_video_tpg_hdmi
steve@Desktop:~/swuk_tutorial/zedboard_video_tpg_hdmi$ swuk_create_vivado_project
steve@Desktop:~/swuk_tutorial/zedboard_video_tpg_hdmi$ cd ..
3. Open block design
Take a peek at the baseline block design by clicking on Open Block Design under IP INTEGRATOR.
Get a better view of the Block Design by clicking on its Float icon. Resize the canvas to obtain a better view of the design and click on the Regenerate Layout icon to obtain a better layout.
4. Add video logic to block design
Instead of poking around on the Block Design a TCL script will be used to make the changes required. The commands used in the script are simply the ones Vivado displays in the Tcl Console when things are changed in the GUI.
If it is more desirable to edit the Block Design manually then use the comments in the script to assist with the process.
Check GIT status to make sure all is well and there are no spurious elements.
steve@Desktop:~/swuk_tutorial$ git status -u
On branch my_master
Your branch is behind 'origin/my_master' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Untracked files:
(use "git add <file>..." to include in what will be committed)
zedboard_video_tpg_hdmi/.gitignore zedboard_video_tpg_hdmi/fw/project.txt zedboard_video_tpg_hdmi/fw/src/constraint/zedboard_video_tpg_hdmi.xdc zedboard_video_tpg_hdmi/fw/src/design/zedboard_video_tpg_hdmi.sv zedboard_video_tpg_hdmi/fw/src/script/user_update_system_bd.tcl
nothing added to commit but untracked files present (use "git add" to track)
Looks good! Commit the updates, create an annotated tag and push the commit & tag up to the remote repository.
steve@Desktop:~/swuk_tutorial$ git add -A
steve@Desktop:~/swuk_tutorial$ git commit -a -m "Basic Zedboard design consisting of a ZYNQ7 Processing System controlling a pair of cascading Test Pattern Generators that output video via HDMI."
steve@Desktop:~/swuk_tutorial$ git push
steve@Desktop:~/swuk_tutorial$ git tag -a my_zedboard_video_tpg_hdmi_v1.0 -m "ZYNQ & Cascading TPG's with HDMI output"
steve@Desktop:~/swuk_tutorial$ git push origin my_zedboard_video_tpg_hdmi_v1.0
#### Part 4 - Firmware Development - 2 ####
9. Create production release
Create a potential production release for the Zedboard Video TPG HDMI (v1.0) project using pure repository source.
Close Vivado.
Clear out all the superfluous files from the project area (non-tracked files).
steve@Desktop:~/swuk_tutorial$ cd zedboard_video_tpg_hdmi
steve@Desktop:~/swuk_tutorial/zedboard_video_tpg_hdmi$ rm -rf fw/vivado
Double check GIT status.
steve@Desktop:~/swuk_tutorial/zedboard_video_tpg_hdmi$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Change the version (or revision) number for this new development, this prevents ghost (post-release, same version) builds from appearing. Also remove Example Design from the Project line.
Select Save to save the configuration.Select Ok to confirm the save.Select Exit to continue.Select Exit to exit the menu.Check the config file (line 117) to ensure the PS i2c has been enabled.
Check GIT status to make sure all is well and there are no spurious elements.
steve@Desktop:~/swuk_tutorial$ git status -u
On branch my_master
Your branch is up-to-date with 'origin/my_master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: zedboard_linux/os/petalinux/.petalinux/metadata modified: zedboard_linux/os/petalinux/project-spec/configs/config modified: zedboard_linux/os/petalinux/project-spec/configs/rootfs_config modified: zedboard_linux/os/petalinux/project-spec/hw-description/ps7_init.c modified: zedboard_linux/os/petalinux/project-spec/hw-description/ps7_init.h modified: zedboard_linux/os/petalinux/project-spec/hw-description/ps7_init.html modified: zedboard_linux/os/petalinux/project-spec/hw-description/ps7_init.tcl modified: zedboard_linux/os/petalinux/project-spec/hw-description/ps7_init_gpl.c modified: zedboard_linux/os/petalinux/project-spec/hw-description/ps7_init_gpl.h modified: zedboard_linux/os/petalinux/project-spec/hw-description/system.xsa modified: zedboard_linux/os/petalinux/project-spec/hw-description/system_wrapper.bit modified: zedboard_linux/os/petalinux/project-spec/meta-user/conf/user-rootfsconfig modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/project.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/adv7511-config/.gdbinit zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/adv7511-config/README zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/adv7511-config/adv7511-config.bb zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/adv7511-config/files/adv7511-config
no changes added to commit (use "git add" and/or "git commit -a")
Looks good!
Commit the updates, create an annotated tag and push the commit & tag up to the remote repository.
steve@Desktop:~/swuk_tutorial$ git add -A
steve@Desktop:~/swuk_tutorial$ git commit -a -m "Added ADV7511 configuration auto-start application. This version of PetaLinux includes the XSA from zedboard_video_tpg_hdmi v1.0."
steve@Desktop:~/swuk_tutorial$ git push
steve@Desktop:~/swuk_tutorial$ git tag -a my_zedboard_linux_v15.0 -m "PetaLinux, Peek/Poke, LED Runner, LAMP (Apache, SQLite, PHP & myLiteAdmin), Peek/Poke CGI, Load Firmware CGI, PL Access, Style Sheet, Register Bank, ID Strings & ADV5711 configuration with XSA from zedboard_video_tpg_hdmi v1.0"
steve@Desktop:~/swuk_tutorial$ git push origin my_zedboard_linux_v15.0
16. Create production release
Create a potential production release for the PetaLinux (v15.0) project using pure repository source. .
This new release will include the Zedboard Video TPG HDMI files and also the ADV7511 configuration.
(optional) Clear out all the superfluous files from the project area (non-tracked files).
steve@Desktop:~/swuk_tutorial$ cd zedboard_linux/os/petalinux
steve@Desktop:~/swuk_tutorial/zedboard_linux/os/petalinux$ git clean -fdx
steve@Desktop:~/swuk_tutorial/zedboard_linux/os/petalinux$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Note: A fresh build of PetaLinux takes a long time to complete and can be prone to failure due to internet downloads. If the build process fails, firstly check the GIT status & difftool for any noddy file changes, restore these file changes and then execute the build command again until it finally completes. Example below :-
::
::
ERROR: Failed to build project. Check the ~/swuk_tutorial/zedboard_linux/os/petalinux/build/build.log file for more details...
steve@Desktop:~/swuk_tutorial/zedboard_linux/os/petalinux$ git status -u
On branch my_master
Your branch is up-to-date with 'origin/my_master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .petalinux/metadata modified: project-spec/configs/config
no changes added to commit (use "git add" and/or "git commit -a")
steve@Desktop:~/swuk_tutorial/zedboard_linux/os/petalinux$ git difftool
steve@Desktop:~/swuk_tutorial/zedboard_linux/os/petalinux$ git restore .petalinux/metadata project-spec/configs/config
steve@Desktop:~/swuk_tutorial/zedboard_linux/os/petalinux$ swuk_petalinux-build
::
::
INFO: Successfully copied built images to tftp dir: /tftpboot
[INFO] Successfully built project
Package PetaLinux to produce the boot image BOOT.BIN, this will include the first stage boot loader zynq_fsbl.elf, the programmable logic system.bit, the Linux boot loader u-boot.elf and the device tree blob system.dtb.
#### Part 8 - Check everything is working as expected ####
18. OS boot & Firmware load
Access the webserver running on the Zedboard using a browser pointing at the Zedboard's IP address (192.168.2.87).
Select System from the menu bar (refresh page if already open).
The Operating System Information table should show Zedboard PetaLinux description along with a version of 15.0.
The Firmare Information table should now show Zedboard Video TPG HDMI description along with a version of 1.0.
There should be no unsavoury comments after the version numbers!
The Timestamp & Hash shown from GIT (first entry) should marry up perfectly with the displayed Operating System Information. All being well the second GIT entry should marry up perfectly with the displayed Firmware Information.
steve@Desktop:~/swuk_tutorial/zedboard_video_tpg_hdmi$ git log -2
commit 8e3e56bf4c1a60533cf96186c94650db98839ac9(HEAD -> my_master, tag: my_zedboard_linux_v15.0,origin/my_master)
Author: Steve Haywood <steve@spacewire.co.uk>
Date: Sat Feb 7 09:00:38 2026 +0000
Added ADV7511 configuration auto-start application. This version of PetaLinux includes the XSA from zedboard_video_tpg_hdmi v1.0.
commit 404c5ae2ca1015d767fcde2cf00aa8bb24a11ef6(tag: my_zedboard_video_tpg_hdmi_v1.0)
Author: Steve Haywood <steve@spacewire.co.uk>
Date: Sat Feb 7 08:40:30 2026 +0000
Basic Zedboard design consisting of a ZYNQ7 Processing System controlling a pair of cascading Test Pattern Generators that output video via HDMI.
Looks good!
19. Firmware register setup & TPG operation
To get some video out of the Zedboard's HDMI connector the two TPG's need to be configured and enabled. Lets aim for a combined V & H ramp background with two moving box overlays, one green and one blue.
Test Pattern Generator 1
Set Resolution to 1920 x 1080
Set Colour Format to YUV 422
Set Background Pattern to Combined V & H ramp
Set Box Colour to green, Box Size to 256 & Motion Speed to 10
Set Foreground Pattern to Moving Box
Start the TPG with auto-restart (continuous frames)
Test Pattern Generator 2
Set Resolution to 1920 x 1080
Set Colour Format to YUV 422
Set Background Pattern to Pass through
Set Box Colour to blue, Box Size to 175 & Motion Speed to 8
Set Foreground Pattern to Moving Box
Start the TPG with auto-restart (continuous frames)
Enable video input
There are quite a lot of registers that need to be configured for the above setup to work. Many ways to go about this, a shell script or compiled C running on PetaLinux for example. As an opening gambit a simple set of Peek & Poke Addresses configuration file will be created. Although this looks a little involved it is simply a list of address locations with default values associated. The widgets add a little complication but the effort is worth it in the end as it makes the bit-bashing very much more user friendly.
sec|Test Pattern Generator 0
reg|0x40030010|false|true|1080|true|Active Height
reg|0x40030018|false|true|1920|true|Active Width
select|0x40030040|false|true|2#0^RGB#1^YUV 444#2^YUV 422#3^YUV 420|true|Color Format
select|0x40030020|false|true|14#0^Pass through#1^Horizontal Ramp#2^Vertical Ramp#3^Temporal Ramp#4^Solid red#5^Solid green#6^Solid blue#7^Solid black#8^Solid white#9^Color bars#10^Zone Plate#11^Tartan Color Bars#12^Cross hatch pattern#13^Color sweep pattern#14^Combined V & H ramp#15^B & W checker board#16^Pseudorandom pattern#17^DP color ramp#18^DP B & W vertical lines#19^DP color square|true|Background Pattern ID
reg|0x40030000|true|true|0x81|true|Control
range|0x40030078|false|true|256#0#511|true|Box Size
range|0x40030080|false|true|105#0#255|true|Box Color (Y)
range|0x40030088|false|true|68#0#255|true|Box Color (U)
range|0x40030090|false|true|52#0#255|true|Box Color (V)
range|0x40030038|false|true|10#0#31|true|Motion Speed
select|0x40030028|false|true|1#0^No overlay#1^Moving box#2^Cross hairs|true|Forground Pattern ID
range|0x40030048|false|true|960#0#1919|true|Cross hair horizontal
range|0x40030050|false|true|540#0#1079|true|Cross hair vertical
sec|Test Pattern Generator 1
reg|0x40040010|false|true|1080|true|Active Height
reg|0x40040018|false|true|1920|true|Active Width
select|0x40040040|false|true|2#0^RGB#1^YUV 444#2^YUV 422#3^YUV 420|true|Color Format
select|0x40040020|false|true|0#0^Pass through#1^Horizontal Ramp#2^Vertical Ramp#3^Temporal Ramp#4^Solid red#5^Solid green#6^Solid blue#7^Solid black#8^Solid white#9^Color bars#10^Zone Plate#11^Tartan Color Bars#12^Cross hatch pattern#13^Color sweep pattern#14^Combined V & H ramp#15^B & W checker board#16^Pseudorandom pattern#17^DP color ramp#18^DP B & W vertical lines#19^DP color square|true|Background Pattern ID
reg|0x40040000|true|true|0x81|true|Control
range|0x40040078|false|true|175#0#511|true|Box Size
range|0x40040080|false|true|18#0#255|true|Box Color (Y)
range|0x40040088|false|true|208#0#255|true|Box Color (U)
range|0x40040090|false|true|114#0#255|true|Box Color (V)
range|0x40040038|false|true|8#0#31|true|Motion Speed
select|0x40040028|false|true|1#0^No overlay#1^Moving box#2^Cross hairs|true|Forground Pattern ID
range|0x40040048|false|true|960#0#1919|true|Cross hair horizontal
range|0x40040050|false|true|540#0#1079|true|Cross hair vertical
reg|0x40040098|false|true|1|true|Enable input
sec|VTC - Set timings for 1080p
reg|0x40050060|true|true|0x04380780|false|Horizontal and Vertical Frame Size (without blanking) for field 0
reg|0x40050070|true|true|0x00000898|false|Horizontal Frame Size (with blanking)
reg|0x40050074|true|true|0x04650465|false|Vertical Frame Size (with blanking)
reg|0x40050078|true|true|0x080407D8|false|Start and end cycle index of HSync
reg|0x4005007C|true|true|0x07D807D8|false|Start and end cycle index of VBlank for field 0
reg|0x40050080|true|true|0x0440043B|false|Start and end line index of VSync for field 0
reg|0x40050084|true|true|0x07D807D8|false|Start and end cycle index of VSync for field 0
reg|0x40050088|true|true|0x07D807D8|false|Start and end cycle index of VBlank for field 1
reg|0x4005008C|true|true|0x0440043B|false|Start and end line index of VSync for field 1
reg|0x40050090|true|true|0x07D807D8|false|Start and end cycle index of VSync for field 1
reg|0x40050094|true|true|0x04380780|false|Horizontal and Vertical Frame size for field 1
reg|0x40050000|true|true|0x00000004|true|General Control
sec|CW - Set clock to 148.5MHz for 1080p@60Hz (Full HD)
reg|0x40060200|true|true|0x047D2504|false|Clock Configuration Register 0
reg|0x40060208|true|true|0x0004FA06|false|Clock Configuration Register 2
reg|0x4006025C|true|true|0x00000003|false|Clock Configuration Register 23
Access the webserver running on the Zedboard using a browser pointing at the Zedboard's IP address (192.168.2.87). Select Peek & Poke from the menu bar.
Browse for the above configuration file and open it. Although this looks complicated in reality it isn't. With the register values defined all that is now required is to click on Poke All to fire up both TPG's and output video via the HDMI connector.
LED 7 should illuminate to indicate video lock & the following should be seen on the screen attached to the HDMI port of the Zedboard. The combined V & H ramp is provided from TPG 0 along with the larger green moving box. This video is then passed through TPG 1 and overlaid with the second smaller blue moving box.
The hardware used for the following video captures was the Zedboard's HDMI output connected to a HDMI to USB video capture card.
The software used to display the video from the HDMI to USB video capture card was Guvcview (Frame Rate: 60fps & Resolution: 1280x720). The window/screen area capture was done using Kazam (Frame rate: 60, Record with: VP8 (WEBM)).
Note: The video looks much better on a HDMI monitor!
Various elements of the TPG's can easily be controlled on-the-fly using the webpage widgets.
The configuration file above can be split into smaller configurations that perform more specific actions.
sec|Test Pattern Generator 0 - Set resolution for 1080p
reg|0x40030010|false|true|1080|true|Active Height
reg|0x40030018|false|true|1920|true|Active Width
sec|Test Pattern Generator 1 - Set resolution for 1080p
reg|0x40040010|false|true|1080|true|Active Height
reg|0x40040018|false|true|1920|true|Active Width
sec|Video Timing Controller - Set timings for 1080p
reg|0x40050060|true|true|0x04380780|true|Horizontal and Vertical Frame Size (without blanking) for field 0
reg|0x40050064|true|true|0x00000898|false|Generator Timing Status Register
reg|0x40050068|true|true|0x00000898|true|Generator Encoding
reg|0x4005006C|true|true|0x00000898|true|Generator Polarity
reg|0x40050070|true|true|0x00000898|true|Horizontal Frame Size (with blanking)
reg|0x40050074|true|true|0x04650465|true|Vertical Frame Size (with blanking)
reg|0x40050078|true|true|0x080407D8|true|Start and end cycle index of HSync
reg|0x4005007C|true|true|0x07D807D8|true|Start and end cycle index of VBlank for field 0
reg|0x40050080|true|true|0x0440043B|true|Start and end line index of VSync for field 0
reg|0x40050084|true|true|0x07D807D8|true|Start and end cycle index of VSync for field 0
reg|0x40050088|true|true|0x07D807D8|true|Start and end cycle index of VBlank for field 1
reg|0x4005008C|true|true|0x0440043B|true|Start and end line index of VSync for field 1
reg|0x40050090|true|true|0x07D807D8|true|Start and end cycle index of VSync for field 1
reg|0x40050094|true|true|0x04380780|true|Horizontal and Vertical Frame size for field 1
reg|0x40050000|true|true|0x00000006|true|General Control
sec|Clocking Wizard - Set clock to 148.5MHz for 1080p@60Hz
reg|0x40060200|true|true|0x047D2504|true|Clock Configuration Register 0
reg|0x40060208|true|true|0x0004FA06|true|Clock Configuration Register 2
reg|0x4006025C|true|true|0x00000003|true|Clock Configuration Register 23
sec|Test Pattern Generator 0 - Set resolution for 1080p
reg|0x40030010|false|true|1080|true|Active Height
reg|0x40030018|false|true|1920|true|Active Width
sec|Test Pattern Generator 1 - Set resolution for 1080p
reg|0x40040010|false|true|1080|true|Active Height
reg|0x40040018|false|true|1920|true|Active Width
sec|Video Timing Controller - Set timings for 1080p
reg|0x40050060|true|true|0x04380780|true|Horizontal and Vertical Frame Size (without blanking) for field 0
reg|0x40050064|true|true|0x00000898|false|Generator Timing Status Register
reg|0x40050068|true|true|0x00000898|true|Generator Encoding
reg|0x4005006C|true|true|0x00000898|true|Generator Polarity
reg|0x40050070|true|true|0x00000898|true|Horizontal Frame Size (with blanking)
reg|0x40050074|true|true|0x04650465|true|Vertical Frame Size (with blanking)
reg|0x40050078|true|true|0x080407D8|true|Start and end cycle index of HSync
reg|0x4005007C|true|true|0x07D807D8|true|Start and end cycle index of VBlank for field 0
reg|0x40050080|true|true|0x0440043B|true|Start and end line index of VSync for field 0
reg|0x40050084|true|true|0x07D807D8|true|Start and end cycle index of VSync for field 0
reg|0x40050088|true|true|0x07D807D8|true|Start and end cycle index of VBlank for field 1
reg|0x4005008C|true|true|0x0440043B|true|Start and end line index of VSync for field 1
reg|0x40050090|true|true|0x07D807D8|true|Start and end cycle index of VSync for field 1
reg|0x40050094|true|true|0x04380780|true|Horizontal and Vertical Frame size for field 1
reg|0x40050000|true|true|0x00000006|true|General Control
sec|Clocking Wizard - Set clock to 74.25MHz for 1080p@30Hz
reg|0x40060200|true|true|0x047D2504|true|Clock Configuration Register 0
reg|0x40060208|true|true|0x0005F40C|true|Clock Configuration Register 2
reg|0x4006025C|true|true|0x00000003|true|Clock Configuration Register 23
sec|Test Pattern Generator 0 - Set resolution for 720p
reg|0x40030010|false|true|720|true|Active Height
reg|0x40030018|false|true|1280|true|Active Width
sec|Test Pattern Generator 1 - Set resolution for 720p
reg|0x40040010|false|true|720|true|Active Height
reg|0x40040018|false|true|1280|true|Active Width
sec|Video Timing Controller - Set timings for 720p
reg|0x40050060|true|true|0x02D00500|true|Horizontal and Vertical Frame Size (without blanking) for field 0
reg|0x40050064|true|true|0x00000898|false|Generator Timing Status Register
reg|0x40050068|true|true|0x00000898|true|Generator Encoding
reg|0x4005006C|true|true|0x00000898|true|Generator Polarity
reg|0x40050070|true|true|0x00000672|true|Horizontal Frame Size (with blanking)
reg|0x40050074|true|true|0x02EE02EE|true|Vertical Frame Size (with blanking)
reg|0x40050078|true|true|0x0596056E|true|Start and end cycle index of HSync
reg|0x4005007C|true|true|0x056E056E|true|Start and end cycle index of VBlank for field 0
reg|0x40050080|true|true|0x02D902D4|true|Start and end line index of VSync for field 0
reg|0x40050084|true|true|0x056E056E|true|Start and end cycle index of VSync for field 0
reg|0x40050088|true|true|0x056E056E|true|Start and end cycle index of VBlank for field 1
reg|0x4005008C|true|true|0x02D902D4|true|Start and end line index of VSync for field 1
reg|0x40050090|true|true|0x056E056E|true|Start and end cycle index of VSync for field 1
reg|0x40050094|true|true|0x02D00500|true|Horizontal and Vertical Frame size for field 1
reg|0x40050000|true|true|0x00000006|true|General Control
sec|Clocking Wizard - Set clock to 74.25MHz for 720p@60Hz
reg|0x40060200|true|true|0x047D2504|true|Clock Configuration Register 0
reg|0x40060208|true|true|0x0005F40C|true|Clock Configuration Register 2
reg|0x4006025C|true|true|0x00000003|true|Clock Configuration Register 23
Access the webserver running on the Zedboard using a browser pointing at the Zedboard's IP address (192.168.2.87). Select Peek & Poke from the menu bar.
Browse for the zedboard_video_tpg_hdmi_720p_60hz.txt configuration file and open it. Simply click on Poke All to change the current video output from 1080p @ 60Hz to 720p @ 60Hz.
Right click on Peek & Poke from the menu bar and select Open Link in New Tab. Browse for the zedboard_video_tpg_hdmi_control.txt configuration file and open it. Simply click on Poke All to configure both of the two TPG's (different setup).
The default configuration setup is as follows.
Test Pattern Generator 1
Set Background Pattern to Vertical Ramp
Set Box Colour to green, Box Size to 125 & Motion Speed to 5
Set Foreground Pattern to Moving Box
Start the TPG with auto-restart (continuous frames)
Test Pattern Generator 2
Set Background Pattern to Pass through
Set Foreground Pattern to Cross hairs
Start the TPG with auto-restart (continuous frames)
Enable video input
Note: The cross hairs are not dead centre (expected), this is due to their coordinates being set for 1080p but the current resolution is 720p.
Use the zedboard_video_tpg_hdmi_1080p_60hz.txt and zedboard_video_tpg_hdmi_1080p_30hz.txt for different screen resolutions and frame rates.
Below is a useful RGB / YUV colour space converter to help ease with any conversion calculations.