Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
playground:vivado_github_demo_startup_rework [2017/05/05 16:15] – [2. Find the Location of the TCL Script] Arthur Brownplayground:vivado_github_demo_startup_rework [2021/06/09 00:32] Arthur Brown
Line 1: Line 1:
-====== Using Github Demos ======+====== Using Digilent Github Demo Projects ====== 
 ===== Overview ===== ===== Overview =====
-Digilent provides several projects through Github that are designed to demonstrate different usages of our FPGA and Zynq boards. This guide will describe how to download and use any of these projects. + 
 +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.
  
 At the end of this tutorial you will have your demo project running on your board. At the end of this tutorial you will have your demo project running on your board.
Line 10: Line 12:
  
 === Hardware === === Hardware ===
-  * **A Supported Digilent 7-Series FPGA or Zynq Board**+ 
 +  * **A Digilent 7-Series FPGA or Zynq Board with a Supported Project**
   * **USB Cables**   * **USB Cables**
  
 === Software === === Software ===
 +
   * **Xilinx Vivado 2016.X**   * **Xilinx Vivado 2016.X**
     * //Vivado 2016.4 is used in this tutorial//     * //Vivado 2016.4 is used in this tutorial//
   * **Digilent Board Support Files**   * **Digilent Board Support Files**
-    * //Follow the **[[vivado:boardfiles|wiki guide]]** on how to install Board Support Files for Vivado 2015.X//+    * //Follow the **[[vivado:boardfiles|wiki guide]]** on how to install Board Support Files for Vivado 2016.X//
  
  
 --> Projects Supported by this Tutorial# --> Projects Supported by this Tutorial#
  
-^ Platform ^ Project Name  ^ Uses SDK ^ Wiki Link ^ Github Link +^ Platform ^ Project Name  ^ Uses SDK ^ Wiki Page ^ Github Repo ^ Github Release Zip 
-| Arty     | Pmod VGA Demo | No       | [[https://reference.digilentinc.com/learn/programmable-logic/tutorials/arty-pmod-vga-demo/start|Internal Link]] | [[https://github.com/Digilent/Arty-Pmod-VGA|External Link]] |+| Arty     | Pmod VGA Demo | No       | [[/learn/programmable-logic/tutorials/arty-pmod-vga-demo/start|Wiki Link]] | [[https://github.com/Digilent/Arty-Pmod-VGA|Github Link]] | [[https://github.com/Digilent/Arty-Pmod-VGA/releases/download/v2016.4-2/Arty-Pmod-VGA-2016.4-2.zip|Project Archive]] | 
 +| Zybo     | DMA Audio Demo      | Yes      | [[/playground/zybo-dma-audio-demo-github-example|Wiki Link]] | [[https://github.com/Digilent/Zybo-DMA|Github Link]] | [[https://github.com/Digilent/Zybo-DMA/releases/download/v2016.4-3/Zybo-DMA-2016.4-3.zip|Project Archive]] |
  
 <-- <--
- 
- 
  
 <WRAP round important 660px>  <WRAP round important 660px> 
 ===Important=== ===Important===
-For further requirements, please review the project's wiki page .+For further requirements, such as a serial terminal, external power supply, or other hardware, please review the project's wiki page.
 </WRAP> </WRAP>
  
 ----- -----
- 
  
 =====Tutorial===== =====Tutorial=====
  
 ====1. Download the Project ZIP from the Digilent Github ==== ====1. Download the Project ZIP from the Digilent Github ====
->1.1) From the demo repository landing page, select the **release** link.+ 
 +This step describes how to download 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 with **Right 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 the **release** link.
 > >
 >{{:playground:clickrelease.jpg?600|}} >{{:playground:clickrelease.jpg?600|}}
  
->1.2) Select **Latest Release**, then click on the project ZIP file included in the Downloads section of the release to download.+>1.2) If the repository has multiple releases, select **Latest Release**, then click on the **project ZIP file** included in the Downloads section of the release to download it.
 > >
-><WRAP round important 660px> +><WRAP round important 660px>
 ===Important=== ===Important===
-Make sure that you download the project-version.zip, not the source code archive.+Make sure that you download the project-2016.4-x.zip, not the source code archive.
 </WRAP> </WRAP>
 > >
Line 54: Line 61:
  
 >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. >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. Find the Location of the TCL Script ==== 
-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 select “Properties”. 
-Highlight and copy the file's location. 
  
-====3Create the Project in Vivado ==== + 
->3.1) Open Vivado 2016.and select the TCL Console.+====2Open 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 Vivado SDK. This will open a "Select Workspace" dialogClick **Browse**, then find and select the "sdk" directory of your project.
 > >
->FIXME  //add image//+>{{:playground:hw-wkspace.png?600|}} 
 + 
 +>2.2) Click **Ok** to finish launching SDK. 
 + 
 +<-- 
 + 
 +--> Vivado#
  
->3.2) cd into the proj directory of your extracted demo folder.+>2.1Within the project folder there will be several subfolders named “hw_handoff”, “proj”, “src”, “repo”, and “sdk”. Go into the "projfolder, right click the “create_project” file and select **Properties**. Highlight and copy the file's location.
 > >
->FIXME  //add image//+>{{:playground:tcl_address.jpg?800|}}
  
->3.3) Enter the command "source ./create_project.tcl"+>2.2Open 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 ' / '. 
 +
 +><WRAP important round 660px> 
 +===Important=== 
 +Vivado will not recognize paths that include back slashes, be very careful to make sure that it is properly converted. 
 +</WRAP> 
 +
 +>{{:playground:cd.jpg?600|}}
  
->3.4The project will now be open in Vivado, you can navigate through the the hdl sources or block design to understand how it fits together.+>2.3Enter the command “source ./create_project.tcl”this will set up the project for you within the proj directory you previously cd'd into. 
 + 
 +<--
  
 ----- -----
  
-====4. Generate a Bitstream ==== 
  
->4.1) Click **Generate Bitstream** on the left hand menu towards the bottom. Vivado will run through both Run Synthesis and Run Implementation before it generates the bitstream automatically.+ 
 +====3. Generate Bitstream ==== 
 + 
 +Skip this step if you previously selected the "SDK Hardware Handoff" option. 
 + 
 +--> Generate Bitstream# 
 + 
 +>3.1) Click **Generate Bitstream** on the left hand menu towards the bottom. In the “Launch Runs” dialog, make sure **Launch runs on local host** is selected and click **OK**. In the “No Implementation Results Available” dialog, click **Yes** to run synthesis and implementation. 
 +
 +><WRAP tip round 660px> 
 +===Tip=== 
 +If your computer has multiple CPU cores, you can increase the number of jobs to make this process faster. 
 +</WRAP> 
 +
 +>{{:playground:generatebitstream.jpg?600|}} 
 + 
 +>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 can **Open Implemented Design** to view how your design will be placed onto the FPGA. **View Reports** will show you a number of different diagnostics on your project, including how the resources of your board will be used. **Open Hardware Manager** is used to program the bitstream onto the board (this will not be used for the SDK flow). **Generate Memory Configuration File** creates a file that can be used to program the bitstream from local memory on your device. 
 +
 +>{{:playground:openhwmanager.jpg?600|}} 
 + 
 +<--
  
 ----- -----
  
-/* if no sdk */+====4. Import SDK Projects ====
  
-====5. Program your FPGA or Zynq ====+Skip this step if your project doesn't support SDK.
  
->5.1) Open Hardware Manager+--SDK Hardware Handoff#
  
->5.2Open New Target+>4.1In SDK's main page, click the **Import Projects** button. 
 +
 +>{{:playground:hw-sdk-splash.png?600|}}
  
->5.3Local Server+>4.2In the "Import" dialog, under the "General" dropdown, select "Existing projects into workspace". Then click **Next**. 
 +
 +>{{:playground:bd-import-dialog-1.png?400|}}
  
->5.4) Finish+>4.3In the "Import Projects" dialog, make sure that the **Select root directory** option is checked. Then click **Browse**. 
 +
 +>{{:playground:bd-import-dialog-2.png?400|}}
  
->5.5Program Device+>4.4Find and select the “sdk” subdirectory of your project and click **Ok**. 
 +
 +>{{:playground:bd-import-dialog-3.png?400|}}
  
------+>4.5) Back in "Import Projects", make sure that the hw_handoff, application, and application board support package (BSP) projects are all checked, then click **Finish** to open the projects in SDK.
  
-/* end if */+<--
  
-/* if sdk */+--> Launch from Vivado#
  
-====5Launch Vivado SDK ====+>4.1) If the "Generate Bitstream Complete" dialog is still open, click **Cancel**.
  
->Export Hardware - Include Bitsream+>4.2) In the top toolbar, select **File -> Export -> Export Hardware**. 
 +
 +>{{:playground:bd-export.png?600|}}
  
->Launch SDK+>4.3) Make sure that the "Include bitstream" checkbox is checked and that the hardware platform will be exported to **<Local to Project>**. Click **Ok**. 
 +
 +>{{:playground:bd-export-dialog.png?600|}}
  
------+>4.4) In the top toolbar, select File -> Launch SDK, make sure that "Exported location" and "Workspace" are set to **<Local to Project**>. Click **Ok**. 
 +
 +>{{:playground:bd-launch.png?600|}}
  
-====6Compile ====+>4.5) In SDK, from the top toolbar, select **File -> Import**. 
 +
 +>{{:playground:bd-import.png?600|}}
  
->Import?+>4.6) In the "Select an import source" dialog dropdowns, select **General -> Existing Projects into Workspace**, then click **Next**. 
 +
 +>{{:playground:bd-import-dialog-1.png?600|}}
  
->Build All+>4.7) In the "Import Projects" dialog, click **Browse** next to "select root directory", then find and select the "sdk" subdirectory of your project. Click **Ok**. 
 +
 +>{{:playground:bd-import-dialog-2.png?600|}} 
 + 
 +>4.8) Make sure that the application and application board support package (BSP) projects are checked, then click **Finish**. 
 +
 +>{{:playground:bd-import-dialog-3.png?600|}} 
 +
 +><WRAP tip round 660px> 
 +===Tip=== 
 +Many apparent errors at this stage can be solved by right-clicking the bsp project and selecting Re-generate BSP Sources. 
 +</WRAP> 
 + 
 +<--
  
 ----- -----
 +
 +====5. Run the Project ====
  
-====7. Program the FPGA or Zynq PL ====+If you have opened your project in SDK in previous steps, select the "SDK" option, otherwise, select "Vivado".
  
->Make sure that your board is turned on and connected to the host PC via both the JTAG USB port and the UART USB port.+--SDK#
  
->On the top toolbar, click the  Program FPGA button.+>5.1) Ensure your board is turned on and connected to your computer with a USB cable.
  
->Click Program to program your FPGA with your hardware design.+>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) Select **Program FPGA** from the Xilinx Tools dropdown in the toolbar. Then click **Program**. 
 +
 +>{{:playground:bd-program-dialog.png?600|}}
  
-====7Program the Processor ====+>5.4) Right click on the application project - the one that doesn't end with "_hw_platform" or "_bsp" - and under "Run As", select **Launch on Hardware (System Debugger)**.  
 +
 +>{{:playground:bd-runas.png?600|}}
  
->Select your Pmods project and click the  Run As… button. Select Launch on Hardware (System Debugger) and click OK.+>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.
  
------+<--
  
-/* end if */+--> 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 click **Ok**. If the dialog is no longer open, select **Hardware Manager** from the Program and Debug section of the Flow Navigator to the left, just underneath **Generate Bitstream**.
 +>
 +>{{:playground:openhwmanager.jpg?400|}}
  
---Test#+>5.4) Select **Open Target** from the green bar at the top. In the drop down menu that this creates, select **Open New Target**. 
 +
 +>{{:playground:hdl-opentarget.jpg?600|}}
  
-<WRAP round important 660px> +>5.5) Make sure that **Local server** is selected in the "Connect to" drop down, then click **Next**. 
 +
 +>{{:playground:hardwareserversettings.jpg?600|}} 
 + 
 +>5.6) Make sure that your board shows up in the "Hardware Targets" list, then click **Next** and **Finish**. 
 +
 +>{{:playground:connect.jpg?400|}} 
 + 
 +>5.7) Select **Program Device** from the green bar, then select your device from the dropdown list (there will usually only be one device listed).  Then click **Program**. 
 +
 +><WRAP round important 660px> 
 ===Important=== ===Important===
-Important thing here.+If nothing shows up in the "Bitstream file" text box, click the **...** button to the right, navigate to "proj/*.runs/impl_1" subdirectory of your project and select the "*.bit" file.
 </WRAP> </WRAP>
 +>
 +>{{:playground:program.jpg?600|}}
  
-<WRAP round tip 650px +>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.
-===Tip=== +
-Use a tip box for tips. +
-</WRAP>+
  
 <-- <--
 +
 +-----