====== Genesys ZU-5EV HDMI Demo ======
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:genesys_zu_5ev_hdmi_setup_two_cables.png?400 |}}
----
==== Description ====
The Genesys ZU-5EV HDMI Demo project demonstrates usage of the Genesys ZU-5EV's HDMI in and HDMI out ports. The behavior is as follows:
* A menu is displayed over UART at 115200 baud rate.
* Information about the HDMI RX/TX Stream along with the settings for the GT transceivers and PLL can be accessed from the menu.
* When only the HDMI TX port is connected, the project enters in standalone mode, generating a color bar on the display.
* From the menu, the color bar can be forced to re-appear on the display.
* The resolution can be changed on the fly, but the user needs to make sure that he is using the correct pixel clock. More information on how to calculate the correct clock for the desired resolution can be found in the [[https://docs.xilinx.com/r/3.1-English/pg235-v-hdmi-tx-ss/Clocking|Clocking section of the HDMI TX Subsytem Product guide]].
* After calculating the resolution, the IC46 (SI5342A-D-GM) needs to be reprogrammed accordingly. More information, together with two different example projects can be found in chapter [[programmable-logic:genesys-zu:reference-manual#5.1 GTH Reference Clocks*|5.1 GTH Reference Clocks*]] from the product reference manual.
* The frame rate can be changed. The default value is 60 Hz.
* The color depth can be changed. The default value is 8bpp.
* The color space can be changed. The default color space is RGB.
* When both HDMI ports are connected, and there is a valid HDMI source, the project will automatically enter in pass-through mode and the Si5342A-D-GM will generate a jitter-attenuated reference clock to drive the HDMI Transmitter Subsystem with a phase-aligned version of the HDMI RX Subsystem HDMI RX TMDS Clock. Thus, the image from the HDMI source will be outputted on the display.
* The pass-trough mode can be forced from the menu.
* There is a GT & HDMI TX/RX log option that can be used for debugging. For example, for the HDMI TX log, each message is bonded to a specific interrupt. Thus, for debugging, the entire chain of events can be reiterated and compared with the one listed in [[https://docs.xilinx.com/r/3.1-English/pg235-v-hdmi-tx-ss/Application-Software-Development| HDMI TX Subsytem Product Guide, Appendix D: Application Software Development]].
* The EDID can be set and displayed.
* The audio can be muted/unmuted and each audio channel can be reconfigured.
* The output video pattern can be changed. The default setting is for color bar.
* The TX mode can be forced in HDMI or DVI.
----
===== Inventory =====
* Genesys ZU-5EV FPGA board
* 1 Micro-USB cables
* Genesys ZU-5EV Power Supply
* 1 or 2 HDMI-HDMI or HDMI-DVI Cables
* 1 HDMI Display
* 1 HDMI Source (Used only in pass-through mode)
----
===== Download/Cloning and Usage Instructions =====
First and foremost, any user can access this demo using two different approaches. The first one is by importing the release archive through Vitis GUI. This method doesn't have great portability, and for that, the user needs to go through extra steps and workarounds to build the project. The second one is by cloning the project. This is a fast and reliable method for running this demo, with only one downside for Windows systems. And that is the need to install a bash emulation tool to run all the specific commands. This document provides support for both methods.
**Note:** //Releases - consisting of a set of files for download - are only compatible with a specific version of the Xilinx tools, as specified in the name of the release (referred to as a //release tag//). In addition, releases are only compatible with the specified variant of the board. For example, a release tagged "20/DMA/2020.1" for the Zybo Z7 is only to be used with the -20 variant of the board and Vivado 2020.1.//
The latest release version for this demo is highlighted in green.
**Important:** //Releases for FPGA demos from before 2020.1 used a different git structure, and used a different release tag naming scheme.//
^ Board Variant ^ Release Tag ^ Release Downloads ^ Setup Instructions ^
| Genesys ZU-5EV | @#C0EEBD: 5EV/HDMI/2020.1-2 | [[https://github.com/Digilent/Genesys-ZU/releases/tag/5EV/HDMI/2020.1-2|Release ZIP Downloads]] | See //Using the Latest Release//, below |
----
Instructions on the use of the latest release can be found in this dropdown:
--> Using the Latest Release #
{{page>programmable-logic:guides:using-github-releases#baremetal_release_before_programming&noheader}}
--> Set up the Genesys ZU-5EV #
--> Set up the Genesys ZU-5EV for Standalone Mode#
Plug the HDMI cable into the HDMI TX port of the Genesys ZU. Connect one end of the cable to the HDMI TX port, and the other one to a DVI or HDMI port of your monitor. This cable does not need to be connected until the demo is running, but it is recommended to set it up now. Please see image bellow.
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:genesys_zu_5ev_hdmi_setup_single_cable.png?400 |}}
//Figure 1: HDMI Cable Connections in standalone mode //
Plug the microUSB programming cable into the Genesys ZU-5EV's PROG/UART port.
<--
--> Set up the Genesys ZU-5EV for Pass-Through Mode#
Connect the HDMI cables to the HDMI ports of the Genesys ZU. Connect one end of the first cable to the HDMI TX port, and the other one to a DVI or HDMI port of your monitor. Then, connect one end of the second cable to the HDMI RX port, and the other end to your HDMI source. These cables do not need to be connected until the demo is running, but it is recommended to set them up now. Please see image bellow.
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:genesys_zu_5ev_hdmi_setup_two_cables.png?400 |}}
//Figure 2: HDMI Cable Connections in pass-through mode //
Plug the microUSB programming cable into the Genesys ZU-5EV's PROG/UART port.
<--
<--
--> Launch the Vitis Baremetal Software Application#
First, many applications require that a serial console is connected to the board, so that standard output (from print statements) can be viewed. For this purpose, a serial terminal should be used. Use a serial terminal application to connect to the board's serial port. Unless otherwise stated, Zynq designs use a baud rate of 115200 and Microblaze designs with an AXI UART Lite IP use a baud rate of 9600.
**Note:** //While Vitis has a built in serial terminal included in its Debug view, it sends characters to a board on a line-by-line basis. Some software examples require the use of character-by-character reception of data. [[https://ttssh2.osdn.jp/index.html.en|Tera Term]] or [[https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html|PuTTY]] are recommended if you are not sure what will work.//
{{ :learn:programmable-logic:tutorials:2020.1:launch-vitis-application:set-baud.png?600 |}}
----
Browse for the //5ev_fsbl.elf// file. The hw platform comes without generating its boot components, so the user needs to manually select a valid boot elf file. Double Click on //platform.spr// → Browse to the project workspace folder that was previously selected, and double click on //5ev_fsbl// → //Release// → //5ev_fsbl.elf// → and then click //Open//.
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:zu_5ev_browse_fsbl_vitis_project.png|}}
----
Click on //Project// and select //Build Project//, or simply press //CTRL+B//. The build should take a couple of seconds.
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:zu_5ev_build_vitis_project.png|}}
----
In the //Explorer// pane at the left side of the screen, right click on the application or system project that is to be run, and select //Run as -> 1 Launch on Hardware //. The FPGA will be programmed with the bitstream, the ELF file previously selected is loaded into system memory, and the application project will begin to run. You will need to click back over to the //Vitis Serial Terminal// from the //Console// tab.
**Note:** //Once the project has been run at least once, you can use the green run button ({{:learn:programmable-logic:tutorials:2020.1:launch-vitis-application:run-button.png?nolink|}}) in the toolbar at the top of the screen to program the board instead.//
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:zu_5ev_launch_hardware_vitis_projects.png|}}
<--
----
At this point, the demo is now running on your board. Refer to the [[#description|Description]] section of this document for more information on what it does.
----
Additional steps beyond here present how you can use the other archive provided in the release, containing the hardware project, to rebuild the Vivado project, and use a newly exported XSA file to update the platform in Vitis.
----
In order to modify and switch out the hardware platform for a baremetal demo, you should first open the Vivado project from the release. Extract the previously downloaded '*.xpr.zip' file.
----
{{page>programmable-logic:guides:using-github-releases#baremetal_update_specification&noheader}}
<--
----
Instructions on the cloning and the use of the latest git project can be found in this dropdown:
--> Using the Genesys ZU repository#
**Important:** //These steps are only to be used with Xilinx tools versions 2020.1 and newer.//
**Note for Advanced Users:** //Further documentation on the structure of the [[https://github.com/Digilent/Genesys-ZU|Genesys ZU]] repository can be found on this wiki's [[programmable-logic:documents:git]] page.//
----
--> Git for Windows#
For Windows OS we need to emulate Git from command line. For this please download and install [[https://gitforwindows.org|Git SCM for Windows]].
{{ :programmable-logic:genesys-zu:demos:gitbashwindowsos.png?600 |}}
<--
--> Clone the project repository and initialize all the submodules.#
First, copy the https or ssh URL from [[https://github.com/Digilent/Genesys-ZU|Genesys ZU]] repository.
{{ :programmable-logic:genesys-zu:demos:genesyszurepo.png?600|}}
----
Create a folder, in a location of your choice on the computer. Right-click from within and select ''//Git Bash Here//''
{{ :programmable-logic:genesys-zu:demos:gitbashlaunch.png?600|}}
----
First, we have to clone the root repository. For this, please run the fallowing command.
git clone git@github.com:Digilent/Genesys-ZU.git
Navigate inside the repository.
cd Genesys-ZU/
We use se the following commands within the root repository to check out the "5ev/hdmi/demo" branch, and update the submodules to the correct commits:
git checkout 5ev/demo/hdmi
git submodule init
git submodule update
Navigate to the "../sw" folder.
cd sw/
Initialize and update the embeddedsw submodule.
git submodule init
git submodule update
{{ :programmable-logic:genesys-zu:demos:gotogihub_14.png?600|}}
----
<--
--> Recreate a Vitis Workspace from Source #
**Important:** //When selecting a workspace to open Vitis into, the use of the extracted software archive's "ws" folder is recommended. The use of this folder simplifies the process of invoking the script that recreates the projects.//
{{page>programmable-logic:guides:vitis-launch&noheader}}
With Vitis open, in the menu bar at the top of the window, use the **Xilinx -> XSCT Console** option to launch the Xilinx Software Command-line Tool.
{{ :reference:programmable-logic:guides:using-releases:open-xsct.png?600 |}}
----
In the XSCT Console, if you used the software archive's ws folder, enter the command below to run a script that recreates each of the projects and platforms associated with the demo from their sources.
source [getws]/../src/checkout.tcl
If you did not use the ws folder, find the path to the extracted archive, and enter the commands below. Note that all slashes in the path must be forward slashes ("/") or the entire path must be enclosed in curly braces ("{}").
source (path to software)/src/checkout.tcl
The checkout process may some time, though not more than a few minutes, as the projects are recreated and built. When complete, the "xsct%" prompt will reappear.
{{ :reference:programmable-logic:guides:source-checkout.png?600 |}}
----
<--
--> Set up the Genesys ZU-5EV #
--> Set up the Genesys ZU-5EV for Standalone Mode#
Plug the HDMI cable into the HDMI TX port of the Genesys ZU. Connect one end of the cable to the HDMI TX port, and the other one to a DVI or HDMI port of your monitor. This cable does not need to be connected until the demo is running, but it is recommended to set it up now. Please see image bellow.
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:genesys_zu_5ev_hdmi_setup_single_cable.png?400 |}}
//Figure 1: HDMI Cable Connections in standalone mode //
Plug the microUSB programming cable into the Genesys ZU-5EV's PROG/UART port.
<--
--> Set up the Genesys ZU-5EV for Pass-Through Mode#
Connect the HDMI cables to the HDMI ports of the Genesys ZU. Connect one end of the first cable to the HDMI TX port, and the other one to a DVI or HDMI port of your monitor. Then, connect one end of the second cable to the HDMI RX port, and the other end to your HDMI source. These cables do not need to be connected until the demo is running, but it is recommended to set them up now. Please see image bellow.
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:genesys_zu_5ev_hdmi_setup_two_cables.png?400 |}}
//Figure 2: HDMI Cable Connections in pass-through mode //
Plug the microUSB programming cable into the Genesys ZU-5EV's PROG/UART port.
<--
<--
--> Launch the Vitis Baremetal Software Application#
First, many applications require that a serial console is connected to the board, so that standard output (from print statements) can be viewed. For this purpose, a serial terminal should be used. Use a serial terminal application to connect to the board's serial port. Unless otherwise stated, Zynq designs use a baud rate of 115200 and Microblaze designs with an AXI UART Lite IP use a baud rate of 9600.
**Note:** //While Vitis has a built in serial terminal included in its Debug view, it sends characters to a board on a line-by-line basis. Some software examples require the use of character-by-character reception of data. [[https://ttssh2.osdn.jp/index.html.en|Tera Term]] or [[https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html|PuTTY]] are recommended if you are not sure what will work.//
{{ :learn:programmable-logic:tutorials:2020.1:launch-vitis-application:set-baud.png?600 |}}
----
Browse for the //5ev_fsbl.elf// file. The hw platform comes without generating its boot components, so the user needs to manually select a valid boot elf file. Double Click on //platform.spr// → Browse to the project workspace folder that was previously selected, and double click on //5ev_fsbl// → //Release// → //5ev_fsbl.elf// → and then click //Open//.
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:zu_5ev_browse_fsbl_vitis_project.png|}}
----
Click on //Project// and select //Build Project//, or simply press //CTRL+B//. The build should take a couple of seconds.
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:zu_5ev_build_vitis_project.png|}}
----
In the //Explorer// pane at the left side of the screen, right click on the application or system project that is to be run, and select //Run as -> 1 Launch on Hardware //. The FPGA will be programmed with the bitstream, the ELF file previously selected is loaded into system memory, and the application project will begin to run. You will need to click back over to the //Vitis Serial Terminal// from the //Console// tab.
**Note:** //Once the project has been run at least once, you can use the green run button ({{:learn:programmable-logic:tutorials:2020.1:launch-vitis-application:run-button.png?nolink|}}) in the toolbar at the top of the screen to program the board instead.//
{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:zu_5ev_launch_hardware_vitis_projects.png|}}
<--
----
At this point, the demo is now running on your board. Refer to the [[#description|Description]] section of this document for more information on what it does.
----
Additional steps beyond here present how you can use the other archive provided in the release, containing the hardware project, to rebuild the Vivado project, and use a newly exported XSA file to update the platform in Vitis.
----
In order to modify and switch out the hardware platform for a baremetal demo, you should first open the Vivado project from the release. Extract the previously downloaded '*.xpr.zip' file.
----
{{page>programmable-logic:guides:using-github-releases#baremetal_update_specification&noheader}}
<--
----
===== Functionality =====
==== 1. Standalone mode ====
> In standalone mode you should see the fallowing color bar.
>
>{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:genesys_zu_5ev_color_bar.jpeg?400 |}}
==== 2. Pass-through mode ====
> In pass-through mode, you should see the HDMI image generated by the HDMI Source. For example, in cases in which the HDMI source is a laptop, you should see, depending on the case, the laptop display being duplicated or extended.
>
==== 3. View the Menu ====
>If your serial monitor (Tera Term, etc.) was open and it was correctly configured to work with a baud rate of 115200, you should see the following menu when the program starts up.
>
>{{ :learn:programmable-logic:tutorials:genesys-zu-5ev-demo-hdmi:teraterm_genesys_zu_demo_menu.jpg |}}
>**Note:** //You can connect your serial terminal to your board before the board is programmed, this will make sure that you don't miss any startup messages. If the demo is already running, and you cannot see the startup messages, press "ENTER". This will refresh the menu messages.//
>
==== 4. Going through all the menu options ====
>You can select each individual option by clicking on its corresponding letter.
>
===== Additional Resources =====
All materials related to the use of the Genesys ZU can be found on its [[/programmable-logic/genesys-zu/start|Resource Center]].
For a walkthrough of the process of creating a simple baremetal software project in Vivado and Vitis, see [[programmable-logic:guides:getting-started-with-ipi]]. Information on important parts of the GUIs, and indirect discussion of the steps required to modify, rebuild, and run this demo in hardware can also be found here.
For technical support, please visit the [[https://forum.digilentinc.com/forum/4-fpga/|FPGA]] section of the Digilent Forum.
{{tag>learn programmable-logic project genesys-zu}}