Using Digilent Github Demo Projects

Overview

Digilent provides projects through Github that are designed to demonstrate different uses of our FPGA and Zynq boards. This guide will describe how to download and run these projects in Vivado 2016.

At the end of this tutorial you will have your demo project running on your board.


Prerequisites

Hardware

  • A Digilent 7-Series FPGA or Zynq Board with a Supported Project
  • USB Cables

Software

  • Xilinx Vivado 2016.X
    • Vivado 2016.4 is used in this tutorial
  • Digilent Board Support Files
    • Follow thewiki guideon how to install Board Support Files for Vivado 2016.X
Projects Supported by this Tutorial
Platform Project Name Uses SDK Wiki Page Github Repo Github Release Archive
Arty Pmod VGA Demo No Wiki Link Github Link ZIP Download
Arty GPIODemo No Wiki Link Github Link ZIP Download
Arty XADC Demo No Wiki Link Github Link ZIP Download
Arty Z7-10 HDMI In Demo Yes Wiki Link Github Link ZIP Download
Arty Z7-10 HDMI Out Demo Yes Wiki Link Github Link ZIP Download
Arty Z7-10 XADC Demo No Wiki Link Github Link ZIP Download
Arty Z7-20 HDMI In Demo Yes Wiki Link Github Link ZIP Download
Arty Z7-20 HDMI Out Demo Yes Wiki Link Github Link ZIP Download
Arty Z7-20 XADC Demo No Wiki Link Github Link ZIP Download
Basys 3 Abacus Demo No Wiki Link Github Link ZIP Download
Basys 3 GPIODemo No Wiki Link Github Link ZIP Download
Basys 3 Keyboard Demo No Wiki Link Github Link ZIP Download
Basys 3 XADC Demo No Wiki Link Github Link ZIP Download
Cmod A7 15T GPIODemo No Wiki Link Github Link ZIP Download
Cmod A7 15T Out of Box Demo Yes Wiki Link Github Link ZIP Download
Cmod A7 15T XADC Demo No Wiki Link Github Link ZIP Download
Cmod A7 35T GPIODemo No Wiki Link Github Link ZIP Download
Cmod A7 35T Out of Box Demo Yes Wiki Link Github Link ZIP Download
Cmod A7 35T XADC Demo No Wiki Link Github Link ZIP Download
Genesys 2 DMA Audio Demo Yes Wiki Link Github Link ZIP Download
Genesys 2 HDMI Demo Yes Wiki Link Github Link ZIP Download
Genesys 2 Keyboard Demo No Wiki Link Github Link ZIP Download
Genesys 2 OLEDDemo No Wiki Link Github Link ZIP Download
Nexys 4 Abacus Demo No Wiki Link Github Link ZIP Download
Nexys 4 GPIODemo No Wiki Link Github Link ZIP Download
Nexys 4 OOB Demo No Wiki Link Github Link ZIP Download
Nexys 4 XADC Demo No Wiki Link Github Link ZIP Download
Nexys 4 DDR GPIODemo No Wiki Link Github Link ZIP Download
Nexys 4 DDR Keyboard Demo No Wiki Link Github Link ZIP Download
Nexys 4 DDR Music Looper Demo No Wiki Link Github Link ZIP Download
Nexys 4 DDR OOB Demo No Wiki Link Github Link ZIP Download
Nexys 4 DDR XADC Demo No Wiki Link Github Link ZIP Download
Nexys Video DMA Audio Demo Yes Wiki Link Github Link ZIP Download
Nexys Video GPIODemo No Wiki Link Github Link ZIP Download
Nexys Video HDMI Demo Yes Wiki Link Github Link ZIP Download
Nexys Video Keyboard Demo No Wiki Link Github Link ZIP Download
Nexys Video OLEDDemo No Wiki Link Github Link ZIP Download
Nexys Video XADC Demo No Wiki Link Github Link ZIP Download
Sword Basic I/O Demo No N/A Github Link ZIP Download
Sword MicroblazeGPIODemo Yes N/A Github Link ZIP Download
Zybo DMA Audio Demo Yes Wiki Link Github Link ZIP Download
Zybo HDMI Input Demo Yes Wiki Link Github Link ZIP Download
Zybo HDMI Output Demo Yes Wiki Link Github Link ZIP Download
Zybo XADC Demo No Wiki Link Github Link ZIP Download
Zedboard DMA Audio Demo Yes Wiki Link Github Link ZIP Download
Zedboard OLEDDemo No Wiki Link Github Link ZIP Download

Important

For further requirements, such as a serial terminal, external power supply, or other hardware, please review the project's wiki page.


Tutorial

1. Download the Project ZIP from the Digilent Github

这个步骤描述了如何下载a release from the Digilent Github, you can alternatively just download the project archive directly by clicking the link in the Projects Supported table above. The archive can be placed wherever you want, and will need to be extracted withRight click → Extract All.

Download from Github
1.1) From the demo repository landing page, for which a link is provided in the Projects Supported table above, select thereleaselink.

1.2) If the repository has multiple releases, selectLatest Release, then click on theproject ZIP fileincluded in the Downloads section of the release to download it.

Important

Make sure that you download the project-2016.4-x.zip, not the source code archive.



1.3) All of the necessary files are included within each project folder, with relative file paths established, so as long as the files aren't moved around within the folder, you can move and run the project from any location.

2. Open the Project

Select the “SDK Hardware Handoff” option if your project supports Vivado SDK and you want to jump directly in, otherwise select the “Vivado” option. Review the Supported Projects table above to determine if the project is an SDK project.

SDK Hardware Handoff
2.1) Find and Launch Xilinx SDK. This will open a “Select Workspace” dialog. ClickBrowse, then find and select the “sdk” directory of your project.

2.2) ClickOkto finish launching SDK.
Vivado
2.1) Within the project folder there will be several subfolders named “hw_handoff”, “proj”, “src”, “repo”, and “sdk”. Go into the “proj” folder, right click the “create_project” file and selectProperties. Highlight and copy the file's location.

2.2) Open Vivado and find the Tcl Console on the bottom of the window. Enter the letters 'cd' (change directory) and paste the file path you copied earlier. Select the “proj” folder from the drop down menu to make sure that Vivado converts the path's back slashes ' \ ' to forward slashes ' / '.

Important

Vivado will not recognize paths that include back slashes, be very careful to make sure that it is properly converted.



2.3) Enter the command “source ./create_project.tcl”, this will set up the project for you within the proj directory you previously cd'd into.

3. Generate Bitstream

Skip this step if you previously selected the “SDK Hardware Handoff” option.

Generate Bitstream
3.1) ClickGenerate Bitstreamon the left hand menu towards the bottom. In the “Launch Runs” dialog, make sureLaunch runs on local hostis selected and clickOK. In the “No Implementation Results Available” dialog, clickYesto run synthesis and implementation.

Tip

If your computer has multiple CPU cores, you can increase the number of jobs to make this process faster.



3.2) When this process has finished, which may take a while, in the “Bitstream Generation Completed” dialog you will be presented with several options. You canOpen Implemented Designto view how your design will be placed onto the FPGA.View Reportswill show you a number of different diagnostics on your project, including how the resources of your board will be used.Open Hardware Manageris used to program the bitstream onto the board (this will not be used for the SDK flow).Generate Memory Configuration Filecreates a file that can be used to program the bitstream from local memory on your device.


4. Import SDK Projects

Skip this step if your project doesn't support SDK.

SDK Hardware Handoff
4.1) In SDK's main page, click theImport Projectsbutton.

4.2)在“导入”对话框中,在“一般”ropdown, select “Existing projects into workspace”. Then clickNext.

4.3) In the “Import Projects” dialog, make sure that theSelect root directoryoption is checked. Then clickBrowse.

4.4) Find and select the “sdk” subdirectory of your project and clickOk.

4.5) Back in “Import Projects”, make sure that the hw_handoff, application, and application board support package (BSP) projects are all checked, then clickFinishto open the projects in SDK.
Launch from Vivado
4.1) If the “Generate Bitstream Complete” dialog is still open, clickCancel.
4.2) In the top toolbar, selectFile → Export → Export Hardware.

4.3) Make sure that the “Include bitstream” checkbox is checked and that the hardware platform will be exported to. ClickOk.

4.4) In the top toolbar, select File → Launch SDK, make sure that “Exported location” and “Workspace” are set to>. ClickOk.

4.5) In SDK, from the top toolbar, selectFile → Import.

4.6) In the “Select an import source” dialog dropdowns, selectGeneral → Existing Projects into Workspace, then clickNext.

4.7) In the “Import Projects” dialog, clickBrowsenext to “select root directory”, then find and select the “sdk” subdirectory of your project. ClickOk.

4.8) Make sure that the application and application board support package (BSP) projects are checked, then clickFinish.



Tip

Many apparent errors at this stage can be solved by right-clicking the bsp project and selecting Re-generate BSP Sources.


5. Run the Project

If you have opened your project in SDK in previous steps, select the “SDK” option, otherwise, select “Vivado”.

SDK
5.1) Ensure your board is turned on and connected to your computer with a USB cable.
5.2) Revisit the project's wiki page to check for extra requirements, such as setting up a serial terminal, or connecting additional cables.
5.3) SelectProgram FPGAfrom the Xilinx Tools dropdown in the toolbar. Then clickProgram.

5.4) Right click on the application project - the one that doesn't end with “_hw_platform” or “_bsp” - and under “Run As”, selectLaunch on Hardware (System Debugger).

5.5) The project will now be programmed and running on your board and you can return to the project's wiki page to verify functionality.
Vivado
5.1) Ensure your board is turned on and connected to your computer with a USB cable.
5.2) Revisit the project's wiki page to check for extra requirements, such as setting up a serial terminal, or connecting additional cables.
5.3) In the Generate Bitstream Complete dialog, select “Open Hardware Manager”, then clickOk. If the dialog is no longer open, selectHardware Managerfrom the Program and Debug section of the Flow Navigator to the left, just underneathGenerate Bitstream.

5.4) SelectOpen Targetfrom the green bar at the top. In the drop down menu that this creates, selectOpen New Target.

5.5) Make sure thatLocal serveris selected in the “Connect to” drop down, then clickNext.

5.6) Make sure that your board shows up in the “Hardware Targets” list, then clickNextandFinish.

5.7) SelectProgram Devicefrom the green bar, then select your device from the dropdown list (there will usually only be one device listed). Then clickProgram.

Important

If nothing shows up in the “Bitstream file” text box, click thebutton to the right, navigate to “proj/*.runs/impl_1” subdirectory of your project and select the “*.bit” file.



5.8) The project will now be programmed and running on your board and you can return to the project's wiki page to verify functionality.