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
learn:programmable-logic:tutorials:pmod-ips:start [2019/03/29 22:10] – [Table] jon peyronlearn:programmable-logic:tutorials:pmod-ips:start [2023/04/27 16:49] Arthur Brown
Line 4: Line 4:
  
 ===== Overview ===== ===== Overview =====
 +<WRAP center round tip 60%>
 +Digilent Pmod IPs are only supported in Vivado and Xilinx SDK versions 2019.1 and earlier.
 +</WRAP>
  
 Digilent provides several IPs that are designed to make implementing and using a Pmod on an FPGA as straightforward as possible. This guide will describe how to use a Pmod IP core in Vivado Microblaze or Zynq design. Digilent provides several IPs that are designed to make implementing and using a Pmod on an FPGA as straightforward as possible. This guide will describe how to use a Pmod IP core in Vivado Microblaze or Zynq design.
Line 9: Line 12:
 At the end of this tutorial you will have a Vivado design and demo for your FPGA or Zynq platform that uses a Digilent Pmod IP core. At the end of this tutorial you will have a Vivado design and demo for your FPGA or Zynq platform that uses a Digilent Pmod IP core.
  
-The following two dropdown tables show which platforms and Pmods are supported by this tutorial, as well as some details about each one that you will need to know to complete this tutorial. +The following two dropdown tables show which Digilent FPGA system boards and Pmods are supported by this tutorial, as well as some details about each one that you will need to know to complete this tutorial.
- +
-**Note**: //Issues have been reported regarding designs that include more than one instance of any one Pmod IP. For projects that require more than one of any one Pmod (for example, two Pmod NAVs), please use Vivado 2017.4.//+
  
 --> Platforms Supported # --> Platforms Supported #
  
-^ Platform     ^ Processor Type  ^ +^ Platform                                                    ^ Processor Type  ^ 
-| Arty         | Microblaze      | +| [[programmable-logic:arty-a7:|Arty A7]]          | Microblaze      | 
-| Arty S7      | Microblaze      | +| [[programmable-logic:arty-s7:|Arty S7]]          | Microblaze      | 
-| Arty Z7      | Zynq            | +| [[programmable-logic:arty-z7:|Arty Z7]]          | Zynq            | 
-Basys3       | Microblaze      | +[[programmable-logic:basys-3:|Basys 3]]           | Microblaze      | 
-| Cmod A7      | Microblaze      | +| [[programmable-logic:cmod-a7:|Cmod A7]]          | Microblaze      
-| Genesys2     | Microblaze      | +| [[programmable-logic:cmod-s7:|Cmod S7]]          | Microblaze      | 
-| Nexys4       | Microblaze      | +| [[programmable-logic:cora-z7:|Cora Z7]]          | Zynq            | 
-| Nexys4-DDR   | Microblaze      | +| [[programmable-logic:genesys-2:|Genesys2]]       | Microblaze      | 
-| Nexys Video  | Microblaze      | +| [[programmable-logic:nexys-4:|Nexys4]]           | Microblaze      | 
-| Zybo         | Zynq            | +| [[programmable-logic:nexys-4-ddr:|Nexys4-DDR]]   | Microblaze      | 
-| Zybo Z7      | Zynq            |+| [[programmable-logic:nexys-video:|Nexys Video]]  | Microblaze      | 
 +| [[programmable-logic:zybo:|Zybo]]                | Zynq            | 
 +| [[programmable-logic:zybo-z7:|Zybo Z7]]          | Zynq            |
  
 <-- <--
Line 32: Line 35:
 --> Pmods Supported # --> Pmods Supported #
 /*Please keep this table alphabetically sorted*/ /*Please keep this table alphabetically sorted*/
-^ Pmod      ^ Interface Type            ^ Reference clock frequency (MHz)  ^ Reference Clock signal name  ^ Interrupt pin name/          ^ Uses PmodGPIO  |  Additional Notes            | +^ Pmod       ^ Interface Type            ^ Reference clock frequency (MHz)  ^ Reference Clock signal name  ^ Interrupt pin name/          ^ Uses PmodGPIO  |  Additional Notes            | 
-^  8LD      |  GPIO                      -                                -                            -                              Yes            -                           | +^  8LD       |  GPIO                      -                                -                            -                              Yes            -                           | 
-^  ACL      |  SPI                      |  80                              |  ext_spi_clk                  -                              -              -                           | +^  ACL       |  SPI                      |  80                              |  ext_spi_clk                  -                              -              -                           | 
-^  ACL2     |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | +^  ACL2      |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | 
-^  AD1      |  SPI                      |  -                                -                            -                              -              -                           | +^  AD1       |  SPI                      |  -                                -                            -                              -              -                           | 
-^  AD2      |  IIC                      |  -                                -                            -                              -              -                           | +^  AD2       |  IIC                      |  -                                -                            -                              -              -                           | 
-^  AD5      |  SPI                      |  50                              |  -                            -                              -              -                           | +^  AD5       |  SPI                      |  50                              |  -                            -                              -              -                           | 
-^  ALS      |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | +^  ALS       |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | 
-^  AMP2     |  GPIO                      -                                -                            timer_interrupt                -              -                           | +^  AMP2      |  GPIO                      -                                -                            timer_interrupt                -              -                           | 
-^  AQS      |  IIC                      |  -                                -                            -                              -              -                           | +^  AQS       |  IIC                      |  -                                -                            -                              -              -                           | 
-^  BB       |  GPIO                      -                                -                            -                              Yes            -                           | +^  BB        |  GPIO                      -                                -                            -                              Yes           |  -                           | 
-^  BT2      |  UART                      -                                -                            -                              -              -                           | +^  BLE        UART            -                                -                            -                              |  -                |  -                           | 
-^  BTN      |  GPIO                      -                                -                            -                              Yes            -                           | +^  BT2       |  UART                      -                                -                            -                              -              -                           | 
-^  CAN      |  SPI                      |  100                              ext_spi_clk                  SPI_interrupt GPIO_interrupt  |                |  -                           | +^  BTN       |  GPIO                      -                                -                            -                              Yes            -                           | 
-^  CLS      |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | +^  CAN       |  SPI                      |  100                              ext_spi_clk                  SPI_interrupt GPIO_interrupt  |                |  -                           | 
-^  CMPS2    |  IIC                      |  -                                -                            -                              -             |  -                           +^  CLS       |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | 
-^  COLOR    |  IIC                      |  -                                -                            -                              -              -                           | +^  CMPS2     |  IIC                      |  -                                -                            -                              -             |  [[https://support.xilinx.com/s/article/52971|SDK project requires math library]]  
-^  DA1      |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | +^  COLOR     |  IIC                      |  -                                -                            -                              -              -                           | 
-^  DHB1     |  PWM/GPIO                  -                                -                            -                              -              -                           | +^  DA1       |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | 
-^  DPG1     |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | +^  DHB1      |  PWM/GPIO                  -                                -                            -                              -              -                           | 
-^  ENC      |  GPIO                      -                                -                            -                              -              -                           | +^  DPG1      |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | 
-^  GPS      |  UART                      -                                -                            gps_uart_interrupt            |  -              -                           | +^  ENC       |  GPIO                      -                                -                            -                              -             |  -                           | 
-^  GYRO     |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | +^  ESP32      UART            -                                -                            -                              |  -                |  -                           | 
-^  HYGRO    |  IIC                      |  -                                -                            -                              -              -                           | +^  GPS       |  UART                      -                                -                            gps_uart_interrupt            |  -              -                           | 
-^  JSTK     |  SPI                      |  16                              |  ext_spi_clk                  -                              -              -                           | +^  GYRO      |  SPI                      |  50                              |  ext_spi_clk                  -                              -              -                           | 
-^  JSTK2    |  SPI                      |  16                              |  ext_spi_clk                  -                              -              -                           | +^  HYGRO     |  IIC                      |  -                                -                            -                              -              -                           | 
-^  KYPD     |  GPIO                      -                                -                            -                              -              -                           | +^  JSTK      |  SPI                      |  16                              |  ext_spi_clk                  -                              -              -                           | 
-^  LED      |  GPIO                      -                                -                            -                              Yes            -                           | +^  JSTK2     |  SPI                      |  16                              |  ext_spi_clk                  -                              -              -                           | 
-^ MAXSONAR  |  GPIO                      -                                -                            -                              -              -                           | +^  KYPD      |  GPIO                      -                                -                            -                              -              -                           | 
-  MicroSD |  Use the Pmod SD IP core  |                                  |                              |                                |                |  -                           | +^  LED       |  GPIO                      -                                -                            -                              Yes            -                           | 
-^  MTDS     |  SPI                      |  -                                -                            -                              -              -                           | + MAXSONAR  |  GPIO                      -                                -                            -                              -              -                           | 
-^  NAV      |  SPI/GPIO                  50                              |  ext_spi_clk                  -                              -              -                           | + MicroSD   |  Use the Pmod SD IP core  |                                  |                              |                                |                |  -                           | 
-^  OLED     |  SPI/GPIO                  -                                -                            -                              -              -                           | +^  MTDS      |  SPI                      |  -                                -                            -                              -              -                           | 
-  OLEDrgb |  SPI/GPIO                  50                              |  ext_spi_clk                  -                              -              -                           | +^  NAV       |  SPI/GPIO                  50                              |  ext_spi_clk                  -                              -              -                           | 
-^  R2R      |  GPIO                      -                                -                            -                              -              -                           | +^  OLED      |  SPI/GPIO                  -                                -                            -                              -              -                           | 
-^  RTCC     |  IIC                      |  -                                -                            -                              -              -                           | + OLEDrgb   |  SPI/GPIO                  50                              |  ext_spi_clk                 |  -                              -              -                           | 
-^  SD       |  SPI                      |  -                                -                            -                              -              -                           | +^  PIR        GPIO                      -                                -                           |  -                              -              -                           | 
-^  SF3      |  SPI                      |  50                              |  ext_spi_clk                  QSPI_INTERRUPT                |  -              -                           | +^  R2R       |  GPIO                      -                                -                            -                              -              -                           | 
-^  SSR      |  GPIO                      -                                -                            -                              Yes            -                           | +^  RTCC      |  IIC                      |  -                                -                            -                              -              -                           | 
-^  SWT      |  GPIO                      -                                -                            -                              Yes            -                           | +^  SD        |  SPI                      |  -                                -                            -                              -              -                           | 
-^  TC1      |  SPI                      |  50                              |  ext_spi_clk                  -                              -                                          | +^  SF3       |  SPI                      |  50                              |  ext_spi_clk                  QSPI_INTERRUPT                |  -              -                           | 
-^  TMP3     |  IIC                      |  -                                -                            -                              -                                          | +^  SSR       |  GPIO                      -                                -                            -                              Yes            -                           | 
-^  WIFI     |  SPI                      |  -                                -                            WF_INTERRUPT                  |  -              Need 385 KB of BRAM or DDR  |+^  SWT       |  GPIO                      -                                -                            -                              Yes            -                           | 
 +^  TC1       |  SPI                      |  50                              |  ext_spi_clk                  -                              -                                          | 
 +^  TMP3      |  IIC                      |  -                                -                            -                              -                                          | 
 +^  WIFI      |  SPI                      |  -                                -                            WF_INTERRUPT                  |  -              Need 385 KB of BRAM or DDR  |
  
 <-- <--
  
 ----- -----
 +
 ===== Prerequisites ===== ===== Prerequisites =====
  
 === Hardware === === Hardware ===
-  * **Supported Digilent 7-Series FPGA or Zynq Board** +  * **Supported Digilent 7-Series FPGA System Board** 
-  * **USB Cables**+  * **MicroUSB Cable/s**
   * **One or More Supported Digilent Pmods**   * **One or More Supported Digilent Pmods**
  
 === Software === === Software ===
-  * **Xilinx Vivado 2015.4 or newer with Xilinx SDK** +  * **Xilinx Vivado 2018.with Xilinx SDK and Digilent Board Files**
-    * //Vivado 2015.4 is used in this tutorial//+
     * //Other versions of Vivado may work, but functionality is not guaranteed//     * //Other versions of Vivado may work, but functionality is not guaranteed//
-  * **Digilent Board Support Files** +    * //See the [[programmable-logic:guides:installing-vivado-and-sdk|"Installing Vivado and Digilent Board Files"]] tutorial for more information.//
-    * //Follow the **[[vivado:boardfiles|wiki guide]]** on how to install Board Support Files for Vivado 2015.X//+
   * **Digilent Vivado IP Library**   * **Digilent Vivado IP Library**
-    * [[https://github.com/Digilent/vivado-library/releases|Vivado Library Releases]] +    * //[[#add_the_digilent_library_repository|Step 2]] of this tutorial covers how to download and extract these files.//
-    * //Installation of these files is covered in [[#add_the_digilent_library_repository|Step 2]] of this tutorial.//+
  
 ----- -----
  
 <WRAP round important 660px> <WRAP round important 660px>
-===Important.===+===Important===
 If the Pmod IP to be used has a README file, be sure to review it before starting this tutorial. This file can be found in the **vivado-library/ip/Pmods/"your pmod"** directory. If the Pmod IP to be used has a README file, be sure to review it before starting this tutorial. This file can be found in the **vivado-library/ip/Pmods/"your pmod"** directory.
 </WRAP> </WRAP>
Line 107: Line 111:
 ==== 1. Create a New Microblaze/Zynq Block Design ==== ==== 1. Create a New Microblaze/Zynq Block Design ====
  
->To determine whether you need to use Microblaze or Zynq for this tutorial, refer to the entry in the **Platforms Supported** dropdown table found in the [[#overview|Overview Section]] of this tutorial. Alternatively, navigate to the resource center for your platform [[reference:programmable-logic:start|here]].+>To determine whether you need to use Microblaze or Zynq for this tutorial, refer to the entry in the **Platforms Supported** dropdown table found in the [[#overview|Overview Section]] of this tutorial. Alternatively, navigate to the resource center for your platform [[programmable-logic:start|here]].
  
 --> Microblaze # --> Microblaze #
  
->Follow the [[https://reference.digilentinc.com/vivado/getting-started-with-ipi/start|Getting Started with Vivado IP Integrator]] tutorial to obtain a basic MicroBlaze block design.+>Follow the [[:vivado:getting-started-with-ipi:2018.2|Getting Started with Vivado IP Integrator]] tutorial to obtain a basic MicroBlaze block design.
 > >
 >{{:vivado:basedesign.jpg?direct&800|}} >{{:vivado:basedesign.jpg?direct&800|}}
Line 121: Line 125:
 --> Zynq # --> Zynq #
  
->Follow the **"Getting Started with Zynq"** tutorial on your platform's resource center to obtain a basic Zynq block design.+>Follow the [[:vivado:getting-started-with-ipi:2018.2|Getting Started with Vivado IP Integrator]] tutorial to obtain a basic Zynq block design.
 > >
 >{{:zybo:regen_layout.png?nolink&800|}} >{{:zybo:regen_layout.png?nolink&800|}}
Line 310: Line 314:
 >8.2) The bit file generation will begin. The tool will run //Synthesis// and //Implementation//. After both have been successfully completed, the bit file will be created. You will find a status bar of Synthesis and Implementation running on the top right corner of the project window.  >8.2) The bit file generation will begin. The tool will run //Synthesis// and //Implementation//. After both have been successfully completed, the bit file will be created. You will find a status bar of Synthesis and Implementation running on the top right corner of the project window. 
 > >
->This process can take anywhere from **5 to 60 minutes** depending on your computer and target board.+>This process can take anywhere from **5 to 60 minutes** depending on the computer Vivado is running on and the size of the target FPGA.
  
 >8.3) After the bitstream has been generated, a message prompt will pop-up on the screen. You don't have to open the Implemented Design for this demo. Just click **Cancel**.  >8.3) After the bitstream has been generated, a message prompt will pop-up on the screen. You don't have to open the Implemented Design for this demo. Just click **Cancel**. 
Line 318: Line 322:
 ====9. Export the Hardware Design to SDK==== ====9. Export the Hardware Design to SDK====
  
->9.1) On the main toolbar, click **File** and select **Export Hardware**. Check the box to **Include Bitstream** and click **OK**. This will export the hardware design with system wrapper for the Software Development Tool - Xilinx SDK+>9.1) At the top of the Vivado window, click **File -> Export -> Export Hardware**. Check the box to **Include Bitstream** and click **OK**. This will give Xilinx SDK all of the information it needs to know about the hardware design, as well as the files needed to program the hardware onto a target FPGA system board.
 > >
 >{{:genesys2:gsmb18.jpg?nolink|}} >{{:genesys2:gsmb18.jpg?nolink|}}
 > >
->A new file directory will be created in your project directory under **echo_server.SDK** similar to the Vivado hardware design project name. Two other files, //.sysdef// and //.hdf// are also created. This step essentially creates a new SDK Workspace. +>A new file directory will be created in the project directory under **echo_server.SDK** similar to the Vivado hardware design project name. Two other files, //.sysdef// and //.hdf// are also created. This step essentially creates a new SDK Workspace. 
  
->9.2) On the main toolbar, click **File** and then **Launch SDK**. Leave both of the dropdown menus as their default //Local to Project// and click **OK**. This will open Xilinx SDK and import your hardware.+>9.2) On the main toolbar, click **File -> Launch SDK**. Leave both of the dropdown menus as their default //<Local to Project>// and click **OK**. This will open Xilinx SDK and import the exported hardware.
 > >
 >{{:genesys2:gsmb19.jpg?nolink&300|}} >{{:genesys2:gsmb19.jpg?nolink&300|}}
Line 330: Line 334:
 ----- -----
  
-====10. Tour Xilinx SDK====+====10. Xilinx SDK====
  
->The HW design specification and included IP blocks are displayed in the //system.hdf// file. Xilinx SDK is independent of Vivado, i.e. from this point, you can create your SW project in C/C++ on top of the exported HW design. If necessary, you can also launch SDK directly with the .SDK folder created in the main Vivado Project directory as the workspace. From this point, if you need to go back to Vivado and make changes to the HW design, then it is recommended to close the SDK window and make the required HW design edits in Vivado. After this you must follow the sequence of saving design, allowing Vivado to regenerate your HDL wrapper, and generating a new bit file. This new bit file must then be exported to SDK.+>The HW design specification and included IP blocks are displayed in the "system.hdffile. Xilinx SDK is independent of Vivado, i.e. from this point, you can create your SW project in C/C++ on top of the exported HW design. If necessary, SDK can be launched directly with the <PROJECT>.sdk folder in the main Vivado project directory as the workspace. From this point, if you need to go back to Vivado and make changes to the HW design, then it is recommended to close the SDK window and make the required HW design edits in Vivado. After this you must follow the sequence of saving design, allowing Vivado to regenerate the HDL wrapper, and generating a new bit file. This new bit file and modified hardware design must then be exported to SDK.
 > >
 >{{:genesys2:gsmbs17.jpg?nolink&700|}} >{{:genesys2:gsmbs17.jpg?nolink&700|}}
  
->Within the //Project Explorer// tab on the left, you can see your hardware platform. **system** is the name of your block design created in Vivado. This hardware platform has all the HW design definitions, IP interfaces that have been added, external output signal information and local memory address information.+>Within the //Project Explorer// tab on the left, you can see the hardware platform projectThe name of the hardware platform follows the name of the block design wrapper created in Vivado. This hardware platform has all the HW design definitions, IP interfaces that have been added, external output signal information and local memory address information.
  
->The drivers for the Pmod IP device can be found in the appropriate folder in the hardware platform, under **/drivers**. If you want to edit these drivers, use the versions found in your board support package under **libsrc**. If you do modify the drivers, keep in mind that any changes to your hardware will overwrite these changes, as well as any use of **Regenerate BSP sources**.+>The drivers for any Pmod IPs in the design can be found in the appropriate folder in the hardware platform, under **/drivers**. If you want to edit these drivers, use the versions found in the board support package project under **libsrc/**. If you do modify the drivers, keep in mind that any changes to your hardware will overwrite these changes, as well as any use of the **Regenerate BSP Sources** option.
  
 ----- -----
Line 392: Line 396:
 ----- -----
  
-{{tag>learn programmable-logic tutorial software vivado arty basys-3 cora-z7 cmod-s7 zybo genesys-2 nexys-4-ddr nexys-a7 nexys-video zybo arty-a7 arty-s7 arty-z7 zybo-z7 sword pmod }}+{{tag>learn programmable-logic tutorial software vivado arty basys-3 cora-z7 cmod-s7 zybo genesys-2 nexys-4-ddr nexys-video zybo arty-a7 arty-s7 arty-z7 zybo-z7 sword }}