Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| learn:programmable-logic:tutorials:vivado-hierarchical-blocks:start [2019/10/03 22:39] – Arthur Brown | learn:programmable-logic:tutorials:vivado-hierarchical-blocks:start [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| ===== Guide ===== | ===== Guide ===== | ||
| + | ==== Setting Up Dependencies ==== | ||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | + | Check if vivado-library is already included in the Vivado project, if it is not, then it should be downloaded: |
| - | === 1. === | + | |
| - | Download the [[https:// | + | |
| - | </ | + | |
| - | {{ : | + | |
| - | </ | + | |
| - | ---- | + | {{https:// |
| + | Those familiar with git may want to clone the hierarchies rather than download a ZIP. The dropdown below contains brief instructions. | ||
| + | |||
| + | --> Using git to clone the hierarchies # | ||
| + | < | ||
| + | cd (somewhere memorable) | ||
| + | git clone https:// | ||
| + | </ | ||
| + | |||
| + | Otherwise (if vivado-library is included in the project), use git tools to check out the branch: | ||
| + | |||
| + | **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 " | ||
| + | |||
| + | < | ||
| + | cd (path)/ | ||
| + | git checkout hierarchies | ||
| + | </ | ||
| + | <-- | ||
| + | |||
| + | ---- | ||
| + | ==== Adding a Hierarchical Block to a Hardware Design ==== | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 2. === | + | === 1. === |
| Launch Vivado, then open the Vivado Project the hierarchical block is to be used in, and open the project' | Launch Vivado, then open the Vivado Project the hierarchical block is to be used in, and open the project' | ||
| Line 35: | Line 53: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 3. === | + | === 2. === |
| - | In Vivado' | + | In Vivado' |
| When the script is finished running, the block design will contain a // | When the script is finished running, the block design will contain a // | ||
| Line 46: | Line 64: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 4. === | + | === 3. === |
| - | Check the README.txt file, found in the hierarchical block' | + | Check the README.txt file, which can be found in the hierarchical block' |
| - Connect all of the hierarchical block' | - Connect all of the hierarchical block' | ||
| - Connect any interrupts the Hierarchy may have to the appropriate interrupt controller: an AXI Interrupt Controller IP (for Microblaze designs), the Zynq Processing System' | - Connect any interrupts the Hierarchy may have to the appropriate interrupt controller: an AXI Interrupt Controller IP (for Microblaze designs), the Zynq Processing System' | ||
| Line 57: | Line 75: | ||
| ---- | ---- | ||
| - | === 5. === | + | === 4. === |
| - | The next step, constraining the Hierarchy' | + | The next step, constraining the Hierarchy' |
| - If a board was selected when creating the project, the **Board Flow** can be used for this step. | - If a board was selected when creating the project, the **Board Flow** can be used for this step. | ||
| Line 64: | Line 82: | ||
| ---- | ---- | ||
| - | == 5.1 - Creating an External Pmod Port == | + | == 4.1 - Creating an External Pmod Port == |
| Open the dropdown for the chosen Workflow, below, and follow the instructions. | Open the dropdown for the chosen Workflow, below, and follow the instructions. | ||
| - | --> Board Flow # | + | **Note**: //This step is only required for Pmod hierarchical blocks. Zmod hierarchical scripts automatically create their external ports. For the purposes of this guide, consider the Zmod's external ports to have been created using the Manual Constraint |
| + | --> Board Flow # | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| Go to Vivado' | Go to Vivado' | ||
| Line 74: | Line 93: | ||
| {{ : | {{ : | ||
| </ | </ | ||
| - | |||
| <-- | <-- | ||
| Line 86: | Line 104: | ||
| ---- | ---- | ||
| - | == 5.2 - Validating the Design and Creating a Wrapper File == | + | == 4.2 - Validating the Design and Creating a Wrapper File == |
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| Regardless of the chosen workflow, validate the block design by clicking the Validate button ( {{: | Regardless of the chosen workflow, validate the block design by clicking the Validate button ( {{: | ||
| Line 94: | Line 112: | ||
| </ | </ | ||
| ---- | ---- | ||
| - | == 5.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 [[zmod: | ||
| + | |||
| + | --> 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' | + | If the **Board Flow** was chosen, open the README.txt file in the hierarchical block' |
| When the Hierarchy was created, a constraint file, named " | When the Hierarchy was created, a constraint file, named " | ||
| Line 116: | Line 137: | ||
| {{ : | {{ : | ||
| </ | </ | ||
| + | <-- | ||
| + | |||
| + | --> Zmod# | ||
| + | |||
| + | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| + | When create_hier.tcl is run for a Zmod Hierarchical Block, a constraint file is imported which contains template constraints for each external port created by the script. The constraint file is named after the hierarchical block created by the script, followed by the name of the particular Zmod, for example: " | ||
| + | |||
| + | At time of writing, each Zmod Hierarchical Block provides template constraints for each of the Eclypse Z7's Zmod Ports. By default, the Zmod ADC is connected to the Eclypse Z7's Zmod Port A, and the Zmod DAC is connected to Zmod Port B. To connect to a different port, the user need only comment out the section of the xdc corresponding to the default port, and uncomment the section corresponding to the chosen port. | ||
| + | |||
| + | For other boards, the user must replace the PACKAGE_PIN location constraints for the Zmod ports with the corresponding locations found in the chosen board' | ||
| + | </ | ||
| + | {{: | ||
| + | </ | ||
| + | |||
| + | <-- | ||
| + | |||
| ---- | ---- | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 6. === | + | === 5. === |
| Click **Generate Bitstream**. This process may take some time, depending on the complexity of the project. | Click **Generate Bitstream**. This process may take some time, depending on the complexity of the project. | ||
| </ | </ | ||
| Line 126: | Line 163: | ||
| ---- | ---- | ||
| + | ==== Baremetal Software ==== | ||
| + | <WRAP round center important 660px> | ||
| + | Zmod Hierarchical Blocks are supported in software by the Zmod Library. If using a Zmod, see the [[zmod: | ||
| + | </ | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 7. === | + | === 1. === |
| Export the hardware design and bitstream to SDK by selecting **File -> Export -> Export Hardware** in the menu bar at the top of the window. In the resulting pop up window, check the **Include bitstream** box, then click **OK**. | Export the hardware design and bitstream to SDK by selecting **File -> Export -> Export Hardware** in the menu bar at the top of the window. In the resulting pop up window, check the **Include bitstream** box, then click **OK**. | ||
| </ | </ | ||
| Line 137: | Line 178: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 8. === | + | === 2. === |
| Launch Xilinx SDK by selecting **File -> Launch SDK** in the menu bar at the top of the window. Make sure to set the //< | Launch Xilinx SDK by selecting **File -> Launch SDK** in the menu bar at the top of the window. Make sure to set the //< | ||
| </ | </ | ||
| Line 146: | Line 187: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 9. === | + | === 3. === |
| - | Create a new application project using the "Empty Application" | + | Create a new application project using the "Empty Application" |
| </ | </ | ||
| {{ : | {{ : | ||
| Line 155: | Line 196: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 10. === | + | === 4. === |
| - | Copy all of the files from the selected hierarchical block' | + | Copy all of the files from the selected hierarchical block' |
| </ | </ | ||
| {{ : | {{ : | ||
| Line 164: | Line 205: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 12. === | + | === 5. === |
| Make sure that the development board' | Make sure that the development board' | ||
| Line 176: | Line 217: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | === 13. === | + | === 6. === |
| Program the FPGA by selecting **Xilinx -> Program FPGA** from the top menu bar in Xilinx SDK. | Program the FPGA by selecting **Xilinx -> Program FPGA** from the top menu bar in Xilinx SDK. | ||
| Line 192: | 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: | + | For more reference materials and guides on the Digilent products being used, navigate to their resource centers, here on the [[start: |
| For technical support, please visit the [[https:// | For technical support, please visit the [[https:// | ||
| {{tag> | {{tag> | ||

