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
learn:programmable-logic:tutorials:vivado-hierarchical-blocks:start [2020/01/15 21:50] – Remove checkout feature/zmod-support Arthur Brownlearn:programmable-logic:tutorials:vivado-hierarchical-blocks:start [2022/09/12 19:41] (current) – changed forum.digilentinc.com to forum.digilent.com Jeffrey
Line 11: Line 11:
  
 ===== Guide ===== ===== Guide =====
-==== Download the Vivado Hierarchies Repository and Dependencies ====+==== Setting Up Dependencies ====
  
-<WRAP GROUP> <WRAP COLUMN HALF> +Check if vivado-library is already included in the Vivado projectif it is not, then it should be downloaded:
-Clone Digilent's [[https://github.com/digilent/vivado-hierarchies|vivado-hierarchies]] repository. Since the repository uses submodules to bring in the IPs contained in Digilent's [[https://github.com/digilent/vivado-library|vivado-library]] repositorythe `--recursive` flag should be used while cloning. Alternatively, after cloning, the submodules can be initialized and updated. Both of these flows are detailed below:+
  
-**Note**: //In order to clone,// [[https://git-scm.com|git]] //must be installed on the computerThere are various different applications which can be used to interact with the git toolsThe options below detail the commands used in a bash shell.//+{{https://github.com/Digilent/vivado-library/archive/refs/tags/zmod/v1/2019.1-2.zip|vivado-library-zmod-v1-2019.1-2.zip}}
  
-== Option 1. Recursive Clone == +Those familiar with git may want to clone the hierarchies rather than download a ZIP. The dropdown below contains brief instructions.
-<code>git clone --recursive https://github.com/digilent/vivado-hierarchies</code>+
  
-== Option 2. Clone, Initialize, and Update == +--> Using git to clone the hierarchies # 
-<code>git clone https://github.com/digilent/vivado-hierarchies +<code> 
-cd vivado-hierarchies +cd (somewhere memorable) 
-git submodule init +git clone https://github.com/digilent/vivado-library -b zmod/v1/2019.1-2 
-git submodule update</code> +</code> 
-</WRAP> <WRAP COLUMN HALF> + 
-{{:learn:programmable-logic:tutorials:vivado-hierarchical-blocks:git.png?600|}} +Otherwise (if vivado-library is included in the project), use git tools to check out the branch: 
-</WRAP> </WRAP>+ 
 +**Warning!** //If IP from the library are already included in the project, checking out a different branch may cause changes to them. Be careful!// 
 + 
 +Note that the "branch" selected by this command is a git tag known to work with this documentation. 
 + 
 +<code> 
 +cd (path)/vivado-library 
 +git checkout hierarchies 
 +</code> 
 +<--
  
 ---- ----
Line 47: Line 54:
 <WRAP GROUP> <WRAP COLUMN HALF> <WRAP GROUP> <WRAP COLUMN HALF>
 === 2. === === 2. ===
-In Vivado's TCL Console, enter the following command: <code>source (cloned repository location)/(Hierarchy of choice)/create_hier.tcl</code>+In Vivado's TCL Console, enter the following command: <code>source (path)/vivado-library/hierarchies/(hierarchy of choice)/create_hier.tcl</code>
  
 When the script is finished running, the block design will contain a //Hierarchical Block// with several IP inside of it. The IP will be connected to one another and to the block's ports and pins. The contents of the hierarchy can be viewed and changed by expanding it with the "**+**" button. When the script is finished running, the block design will contain a //Hierarchical Block// with several IP inside of it. The IP will be connected to one another and to the block's ports and pins. The contents of the hierarchy can be viewed and changed by expanding it with the "**+**" button.
Line 58: Line 65:
 <WRAP GROUP> <WRAP COLUMN HALF> <WRAP GROUP> <WRAP COLUMN HALF>
 === 3. === === 3. ===
-Check the README.txt file, found in the hierarchical block's folder in vivado-hierarchies-master, for additional information about how the ports of the Hierarchy must be connected to the rest of the design. With this information in mind:+Check the README.txt file, which can be found in the hierarchical block's folder in vivado-library/hierarchies, for additional information about how the ports of the Hierarchy must be connected to the rest of the design. With this information in mind:
    - Connect all of the hierarchical block's AXI interfaces to the processor in the design by clicking on **Run Connection Automation**, and checking the appropriate boxes. These interfaces may appear more than once in the connection automation dialog. Select only one entry for each interface.    - Connect all of the hierarchical block's AXI interfaces to the processor in the design by clicking on **Run Connection Automation**, and checking the appropriate boxes. These interfaces may appear more than once in the connection automation dialog. Select only one entry for each interface.
    - Connect any interrupts the Hierarchy may have to the appropriate interrupt controller: an AXI Interrupt Controller IP (for Microblaze designs), the Zynq Processing System's irq_f2p port (for Zynq designs).    - Connect any interrupts the Hierarchy may have to the appropriate interrupt controller: an AXI Interrupt Controller IP (for Microblaze designs), the Zynq Processing System's irq_f2p port (for Zynq designs).
Line 106: Line 113:
 ---- ----
 == 4.3 - Constraining the Design == == 4.3 - Constraining the Design ==
-This step works a little differently depending on whether the peripheral targeted by the hierarchical block is a [[reference:zmod:start|Zmod]] or a [[reference:pmod:start|Pmod]]. Select the dropdown for the chosen peripheral:+This step works a little differently depending on whether the peripheral targeted by the hierarchical block is a [[zmod:start|Zmod]] or a [[pmod:start|Pmod]]. Select the dropdown for the chosen peripheral:
  
 --> Pmod# --> Pmod#
 <WRAP GROUP> <WRAP COLUMN HALF> <WRAP GROUP> <WRAP COLUMN HALF>
-If the **Board Flow** was chosen, open the README.txt file in the hierarchical block's folder in vivado-hierarchies-master to determine whether any additional constraints are required. If there are none, //skip the rest of this section//.+If the **Board Flow** was chosen, open the README.txt file in the hierarchical block's folder in vivado-library-hierarchies to determine whether any additional constraints are required. If there are none, //skip the rest of this section//.
  
 When the Hierarchy was created, a constraint file, named "(Hierarchy Name)_Pmod_out.xdc", was imported into the Vivado project. This file contains a template for all required constraints, regardless of the flow used. Open it now from the //Sources// pane, by finding it under //Constraints// and double clicking on it. When the Hierarchy was created, a constraint file, named "(Hierarchy Name)_Pmod_out.xdc", was imported into the Vivado project. This file contains a template for all required constraints, regardless of the flow used. Open it now from the //Sources// pane, by finding it under //Constraints// and double clicking on it.
Line 158: Line 165:
 ==== Baremetal Software ==== ==== Baremetal Software ====
 <WRAP round center important 660px> <WRAP round center important 660px>
-Zmod Hierarchical Blocks are supported in software by the Zmod Library. If using a Zmod, see the [[reference:zmod:zmodbaselibraryuserguide|Zmod Base Library User Guide]], and skip the rest of this guide. If Petalinux support for the added hierarchy is desired, first see the [[reference:eclypse-z7:customizing-zmods-os|Zmod Petalinux Configuration Guide]]+Zmod Hierarchical Blocks are supported in software by the Zmod Library. If using a Zmod, see the [[zmod:zmodbaselibraryuserguide|Zmod Base Library User Guide]], and skip the rest of this guide. If Petalinux support for the added hierarchy is desired, first see the [[programmable-logic:eclypse-z7:customizing-zmods-os|Zmod Petalinux Configuration Guide]]
 </WRAP> </WRAP>
  
Line 181: Line 188:
 <WRAP GROUP> <WRAP COLUMN HALF> <WRAP GROUP> <WRAP COLUMN HALF>
 === 3. === === 3. ===
-Create a new application project using the "Empty Application" template. Make sure to check if the hierarchical block requires any changes to project settings or if any libraries must be added to the BSP. These requirements, if any, are detailed in the README.txt file in the hierarchical block's sdk_sources folder in the vivado-hierarchies-master folder.+Create a new application project using the "Empty Application" template. Make sure to check if the hierarchical block requires any changes to project settings or if any libraries must be added to the BSP. These requirements, if any, are detailed in the README.txt file in the hierarchical block's sdk_sources folder in the vivado-library-hierarchies folder.
 </WRAP> <WRAP COLUMN HALF> </WRAP> <WRAP COLUMN HALF>
 {{ :learn:programmable-logic:tutorials:vivado-hierarchical-blocks:new-app.png?600 |}} {{ :learn:programmable-logic:tutorials:vivado-hierarchical-blocks:new-app.png?600 |}}
Line 190: Line 197:
 <WRAP GROUP> <WRAP COLUMN HALF> <WRAP GROUP> <WRAP COLUMN HALF>
 === 4. === === 4. ===
-Copy all of the files from the selected hierarchical block's sdk_sources folder (in the vivado-hierarchies-master folder), then paste them into the application project's src folder.+Copy all of the files from the selected hierarchical block's sdk_sources folder (in the vivado-library-hierarchies folder), then paste them into the application project's src folder.
 </WRAP> <WRAP COLUMN HALF> </WRAP> <WRAP COLUMN HALF>
 {{ :learn:programmable-logic:tutorials:vivado-hierarchical-blocks:import-sources.png?600 |}} {{ :learn:programmable-logic:tutorials:vivado-hierarchical-blocks:import-sources.png?600 |}}
Line 226: Line 233:
 The SDK sources provided with the hierarchical blocks are set up such that they can be easily included in any design using that block. The subfolder below sdk_sources contains all necessary drivers for the block. The SDK sources provided with the hierarchical blocks are set up such that they can be easily included in any design using that block. The subfolder below sdk_sources contains all necessary drivers for the block.
  
-For more reference materials and guides on the Digilent products being used, navigate to their resource centers, here on the [[:start:|Digilent Wiki]].+For more reference materials and guides on the Digilent products being used, navigate to their resource centers, here on the [[start:|Digilent Wiki]].
  
-For technical support, please visit the [[https://forum.digilentinc.com|Digilent Forums]].+For technical support, please visit the [[https://forum.digilent.com|Digilent Forums]].
  
 {{tag>vivado-hierarchical-blocks}} {{tag>vivado-hierarchical-blocks}}