Differences
This shows you the differences between two versions of the page.
| programmable-logic:genesys-zu:getting-started [2022/09/08 20:37] – changed forum.digilentinc.com to forum.digilent.com jeff.greenberg_ni.com | programmable-logic:genesys-zu:getting-started [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Getting Started with the Genesys ZU ====== | ||
| + | |||
| + | |||
| + | ===== Unboxing ===== | ||
| + | {{: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | <WRAP group> <WRAP column half> | ||
| + | Upon opening the box, the MIPI CSI-2 IP Voucher can be found on top of the Genesys ZU, which is placed in an anti-static bag. | ||
| + | |||
| + | The IEC cables, USB cables, JTAG HS1 product kit, and microSD card case can be found underneath the piece of cardboard placed underneath the board **(1)**. | ||
| + | |||
| + | The power supply can be found in the box next to the board **(2)**. | ||
| + | |||
| + | The microSD card can be found in the Genesys ZU's microSD card slot. | ||
| + | For more details about the board check the reference manual: | ||
| + | [[programmable-logic/ | ||
| + | </ | ||
| + | {{: | ||
| + | </ | ||
| + | |||
| + | <WRAP group> <WRAP column half> | ||
| + | == What comes in the box? == | ||
| + | * Genesys ZU-3EG (or -5EV) **(4)** | ||
| + | * 12V, 8A power supply **(8)** | ||
| + | * IEC cable with European plug **(1)** | ||
| + | * IEC cable with US plug **(5)** | ||
| + | * USB A to micro B programming cable **(2)** | ||
| + | * USB A to Type C cable **(3)** | ||
| + | * JTAG HS1 programmer and cable **(6)** * | ||
| + | * microSD card (loaded into the Genesys ZU's microSD card slot), with a case **(7)** | ||
| + | * Voucher for license for Xilinx' | ||
| + | </ | ||
| + | {{: | ||
| + | </ | ||
| + | * From version 2020.1 Vivado supports the board, and it can be used via the mini-USB port so the JTAG HS1 is removed from the box. (In older versions of Vivado the board was accessible with this.)</ | ||
| + | ---- | ||
| + | ===== Using the Out-of-Box Image ===== | ||
| + | |||
| + | Sources for the Out of Box demo can be found on Github: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | |||
| + | ==== First Boot ==== | ||
| + | |||
| + | **Note:** //At time of manufacturing, | ||
| + | |||
| + | **Note:** //Some boards may contain an empty SD card due to a manufacturing error. If after the 4.-th instruction the boot sequence doesn' | ||
| + | |||
| + | **Note:** //For more information about the board, please check the [[programmable-logic/ | ||
| + | |||
| + | - Connect the power supply. | ||
| + | - Connect a computer to the USB/PROG port via the provided MicroUSB cable. | ||
| + | - Connect a serial terminal to the serial port associated with the board with a baud rate of 115200. (There will be two serial ports associated with the board, connect to the first one. The second one is for debugging.) | ||
| + | - Flip the POWER switch to the ON position. | ||
| + | - Wait for the boot sequence to complete. | ||
| + | - Log into the board with the username " | ||
| + | |||
| + | At this point, a command shell with root privileges has been opened into the Out-of-Box demo's PetaLinux OS. | ||
| + | |||
| + | **Note:** //If desired, an SSH connection can be established with the board by connecting it to a router via an ethernet cable. The IP address of the board can be determined by using the command 'ip a' in the serial terminal.// | ||
| + | |||
| + | <WRAP round important 660px> | ||
| + | ==Important== | ||
| + | When finished using the Genesys ZU, make sure to safely shut down the OS through the shell. The following command can be used: | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | ==== Running Test Scripts ==== | ||
| + | |||
| + | Several test scripts are built into the OS. These can be found in the /usr/bin directory, and are listed below: | ||
| + | |||
| + | //Table 1. Test Scripts// | ||
| + | |<75% 20% 80%>| | ||
| + | ^ Test Name ^ Description | ||
| + | | DP-bist | ||
| + | | DP-bist-wrapper | ||
| + | | network-bist | ||
| + | | pci-bist | ||
| + | | rtc-test | ||
| + | | sim-bist | ||
| + | | sysmon | ||
| + | | type-c-dir | ||
| + | | uio-test | ||
| + | | usb-bist | ||
| + | | usb-reset | ||
| + | | wifi-bist | ||
| + | | zuca-test-suite | ||
| + | |||
| + | Further information on these tests can be found by reviewing the test scripts on the board with a built-in text editor and by viewing their sources on GitHub: [[https:// | ||
| + | |||
| + | ---- | ||
| + | === UIO Test Example === | ||
| + | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| + | The image to the right is the result of running the following command in the serial terminal, which turns on each of the five PL LEDs in sequence: | ||
| + | |||
| + | < | ||
| + | </ | ||
| + | {{: | ||
| + | </ | ||
| + | ---- | ||
| + | ==== Rebuilding the Out-of-Box Image ==== | ||
| + | |||
| + | In order to get access to bugfixes or changes made to the Out-of-Box demo and test scripts, or to view or change the demo, the corresponding repositories must be cloned and rebuilt. | ||
| + | |||
| + | **Note:** //This guide does not discuss the details involved in making changes to the out-of-box projects. Users should refer to the appropriate documentation for the tools and IP used in these designs.// | ||
| + | |||
| + | === Inventory === | ||
| + | * Computer running Linux with the following software installed: | ||
| + | * Vivado 2020.1 with Digilent Board Files: | ||
| + | * // | ||
| + | * Make sure that the installation includes support for Zynq Ultrascale parts. | ||
| + | * Petalinux 2020.1: | ||
| + | * // | ||
| + | * Github repositories for the Hardware and Software components of the Out-of-Box demo. \\ **Note:** //How to clone these repositories is discussed in further detail below.// | ||
| + | * [[https:// | ||
| + | **Important: | ||
| + | |||
| + | * The original sources used to produce the image found on the SD card shipped with the Genesys ZU-3EG rev B can be found in the commits tagged " | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * The original sources used to produce the image found on the SD card shipped with the Genesys ZU (both variants) rev D can be found under tag "< | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ---- | ||
| + | === Building the Hardware Design === | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 1. Clone the Vivado Project == | ||
| + | Using a terminal, or your git application of choice, clone the Hardware repository (linked in the Inventory section, above) from Digilent' | ||
| + | < | ||
| + | Change directory into the cloned repository' | ||
| + | < | ||
| + | Next, find and check out the oob/master < | ||
| + | < | ||
| + | git checkout < | ||
| + | git submodule update --init --recursive | ||
| + | </ | ||
| + | **Note:** //Digilent uses submodules to bring in additional scripts, sources, and libraries for our repositories. The --recursive switch can be specified when cloning to bring in these submodules, however, if the submodules differ between branches, they must be recursively updated whenever switching branches.// | ||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 2. Launch Vivado == | ||
| + | Launch the Vivado GUI. On Linux, this requires using the terminal to source the settings64.sh script, found in Vivado' | ||
| + | < | ||
| + | source <vivado install directory>/ | ||
| + | vivado | ||
| + | </ | ||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 3. Create the Vivado Project == | ||
| + | In the TCL console at the bottom of the Vivado window, use the following command to recreate the Vivado project from its sources, where <repo path> represents the full path to the cloned repository: | ||
| + | < | ||
| + | source <repo path>/ | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 4. Build the Vivado Project == | ||
| + | With the project created and open, the Vivado IP Integrator design that defines the hardware can be explored. | ||
| + | |||
| + | To rebuild the design, click the **Generate Bitstream** button, found at the bottom of the Flow Navigator. | ||
| + | |||
| + | In the //No Implementation Results Available// dialog, click **Yes** to launch Synthesis and Implementation. | ||
| + | |||
| + | In the //Launch Runs// dialog, choose a number of jobs to use, and click **OK**. | ||
| + | |||
| + | **Note:** //The number of jobs specifies how much of the system' | ||
| + | |||
| + | Wait for the runs to be completed. When finished, the indicator at the top right corner of the window will display " | ||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 5. Export Build Outputs == | ||
| + | Lastly, the build outputs must be exported from Vivado for use by Petalinux. In the menu at the top of the window, select **File -> Export -> Export Hardware**. | ||
| + | |||
| + | In the dialog that pops up, choose a directory to export the Hardware Definition File (HDF) to, make sure to include the bitstream, then click **OK**. Take note of the directory the HDF has been placed within, as it can optionally be imported into the Petalinux project. | ||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | === Configuring and Building the Petalinux Project === | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 1. Clone the Petalinux Project == | ||
| + | Using a terminal, or your git application of choice, clone the Petalinux project repository linked in the Inventory section above, from Digilent' | ||
| + | < | ||
| + | Change directory into the cloned repository' | ||
| + | < | ||
| + | Check out the oob/master < | ||
| + | < | ||
| + | git submodule update --init --recursive</ | ||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 2. Initialize Petalinux == | ||
| + | In the terminal, set up Petalinux using the command below, where < | ||
| + | < | ||
| + | **Note:** //Running this command is required in any terminal session where Petalinux will be used. If desired, it is possible to add this command to the system' | ||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 3. Petalinux Project Configuration (Optional) == | ||
| + | **Important: | ||
| + | |||
| + | A newly generated HDF file can be loaded into the project with this command, where <hdf directory> | ||
| + | < | ||
| + | |||
| + | While building, the Petalinux project writes the necessary files into the tftpboot directory. This allows tftp (Trivial File Transfer Protocol) to be used to boot the board over a UART connection with minimal user effort. It should be noted that if TFTP is not installed on the system, some warning messages may be generated during the build process. | ||
| + | |||
| + | Any changes in Vivado to the set of IP connected to the processor over AXI require that the system-user.dtsi file be edited to associate the connected IP with compatible drivers. | ||
| + | |||
| + | Additional information on what can be changed and how can be found in Xilinx' | ||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 4. Build the Petalinux Project == | ||
| + | Once any necessary changes have been made, run the following command to build the project: | ||
| + | < | ||
| + | |||
| + | This process may take some time; 15-60 minutes depending on the computer used. | ||
| + | </ | ||
| + | {{: | ||
| + | </ | ||
| + | ---- | ||
| + | <WRAP group> <WRAP column half> | ||
| + | == 5. Package the Build Outputs == | ||
| + | Once the project has been built, the FSBL, FPGA bitstream, PMU firmware, and U-Boot must be packaged into a single binary which can be used to boot the board. This binary is named “BOOT.bin” and can be generated with the following command: | ||
| + | < | ||
| + | |||
| + | BOOT.bin is placed within the project' | ||
| + | </ | ||
| + | {{ : | ||
| + | </ | ||
| + | ---- | ||
| + | === Running the Rebuilt Image on the Board === | ||
| + | <WRAP group> <WRAP column half> | ||
| + | A microSD card used to boot Petalinux must first be formatted with a FAT32 filesystem, and the build outputs BOOT.bin and image.ub must be placed within the first partition. A variety of techniques can be used to accomplish this, for example, the dd command command can be used to format the card. | ||
| + | |||
| + | Once the SD card has been installed, the board can be booted as seen in the [[# | ||
| + | </ | ||
| + | {{: | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | ===== Getting the Out-of-Box Image ===== | ||
| + | * The Out-of-box image files can be found under tag "< | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * Instructions for Windows: | ||
| + | - Click on the link corresponding to your board version, and download the genesys-zu-version.img.gz file, and uncompress it. | ||
| + | - Download a tool, like [[https:// | ||
| + | - Plug in the SD card into your PC (for example via SD card adapter). The SD card is located in the SD card slot, which can be opened by pulling it slightly in the direction of the cooler. | ||
| + | - Select your SD card as SD drive, your uncompressed image file as Image file, and click on the Write button. | ||
| + | - Wait for the SD Imager to terminate the write, then click on the Exit button. | ||
| + | - Eject the SD card, unplug it, and put it back into the SD card slot of the board. | ||
| + | * Instructions for Linux: | ||
| + | - Click on the link corresponding to your board version, and download the genesys-zu-version.img.gz file, and uncompress it. | ||
| + | - Plug in the SD card into your PC (for example via SD card adapter). The SD card is located in the SD card slot, which can be opened by pulling it slightly in the direction of the cooler. | ||
| + | - Your card must appear in the /dev/ folder. | ||
| + | - Copy the uncompressed image file with the dd command:< | ||
| + | - Eject the SD card, unplug it, and put it back into the SD card slot of the board. | ||
| + | ---- | ||
| + | ===== Final Thoughts ===== | ||
| + | More information on the Genesys ZU can be found in its [[start|Resource Center]], on this wiki. | ||
| + | |||
| + | For technical support, please visit the [[https:// | ||

