Differences
This shows you the differences between two versions of the page.
| vivado:getting_started:start [2017/09/14 20:03] – Arthur Brown | vivado:getting_started:start [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Getting Started with Vivado ====== | ====== Getting Started with Vivado ====== | ||
| ----- | ----- | ||
| - | |||
| - | ===== Prerequisites ===== | ||
| - | Prior to starting this guide make sure to install Vivado. For more information see our [[learn: | ||
| - | |||
| - | Make sure to install [[reference: | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| Line 13: | Line 8: | ||
| The goal of this guide is to familiarize the reader with the Vivado tools through the hello world of hardware, blinking an LED. | The goal of this guide is to familiarize the reader with the Vivado tools through the hello world of hardware, blinking an LED. | ||
| - | This guide was created using Vivado 2016.4. | + | **Note:** //While this guide was created using Vivado 2016.4, the workflow described has not substantially changed, and the guide works as described through Vivado 2019.2, the latest version as of time of writing.// |
| - | ==== 1. Starting | + | |
| + | ---- | ||
| + | ===== Prerequisites ===== | ||
| + | Prior to starting this guide make sure to install Vivado: | ||
| + | * For versions 2019.2 and later, see [[vivado: | ||
| + | * For versions prior to 2019.2, see [[vivado: | ||
| + | |||
| + | ---- | ||
| + | ===== Guide ===== | ||
| + | ==== 1. Launching | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 28: | Line 32: | ||
| <WRAP column half> | <WRAP column half> | ||
| **Linux**\\ | **Linux**\\ | ||
| - | Open a Terminal | + | Open a terminal, cd into a working directory that can be cluttered with temporary Vivado files and logs, then run the following: |
| < | < | ||
| </ | </ | ||
| Line 39: | Line 43: | ||
| This is the screen that displays after Vivado starts up. The buttons are described below using the image as a guide. | This is the screen that displays after Vivado starts up. The buttons are described below using the image as a guide. | ||
| - | {{ : | + | {{ : |
| == 1. Create New Project == | == 1. Create New Project == | ||
| Line 47: | Line 51: | ||
| == 2. Open Project == | == 2. Open Project == | ||
| - | This button will open a file browser. Navigate to the desired | + | This button will open a file browser. Navigate to the desired |
| == 3. Open Example Project == | == 3. Open Example Project == | ||
| Line 55: | Line 59: | ||
| == 4. Open Hardware Manager == | == 4. Open Hardware Manager == | ||
| - | This will open the Hardware Manager without an associated project. If connecting to and programming a device is all that is required by the user this is the button to use. | + | This will open the Hardware Manager without an associated project. If connecting to and programming a device is all that is required by the user, then this is the button to use. |
| ==== 3. Creating a New Project ==== | ==== 3. Creating a New Project ==== | ||
| Line 72: | Line 76: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 3.2 === | === 3.2 === | ||
| - | The text in the dialog describes the steps that will be taken to create a project. Click //Next// to continue to the first step. | + | The text in this dialog describes the steps that will be taken to create a project. Click //Next// to continue to the first step. |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 97: | Line 101: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 3.4 === | === 3.4 === | ||
| - | Now that the project has a name and a place to save its files we need to select the type of project we will be creating. Select //RTL Project// and make sure to check //Do not specify sources at this time// | + | Now that the project has a name and a place to save its files we need to select the type of project we will be creating. Select //RTL Project// and make sure to check //Do not specify sources at this time// |
| Click //Next// to continue. | Click //Next// to continue. | ||
| Line 111: | Line 115: | ||
| <WRAP round center important> | <WRAP round center important> | ||
| === Important === | === Important === | ||
| - | If you haven' | + | If your board does not appear in this list, then Digilent' |
| </ | </ | ||
| Now it is time to choose the target device. Click the //Boards// tab at the top of the dialog, then select your board from the list. | Now it is time to choose the target device. Click the //Boards// tab at the top of the dialog, then select your board from the list. | ||
| Line 136: | Line 140: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The Flow Navigator is the most important pane of the main Vivado window to know. It is how a user navigates between different Vivado tools. | + | The //Flow Navigator// is the most important pane of the main Vivado window to know. It is how a user navigates between different Vivado tools. |
| The Navigator is broken into seven sections: | The Navigator is broken into seven sections: | ||
| Line 144: | Line 148: | ||
| * Tools for creating Block Designs | * Tools for creating Block Designs | ||
| * // | * // | ||
| - | * Allows a developer to verify the output of their deisgn | + | * Allows a developer to verify the output of their design |
| * //RTL Analysis// | * //RTL Analysis// | ||
| * lets the developer see how the tools are interpreting their code | * lets the developer see how the tools are interpreting their code | ||
| Line 172: | Line 176: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The Project Manager consists of four panes, Sources, Properties, Results, and the Workspace. | + | The //Project Manager// consists of four panes, |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 181: | Line 185: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The Sources pane contains the project hierarchy and is used for opening up files. The folder structure is organized such that the HDL files are kept under the //Design Sources// folder, constraints are kept under the // | + | The //Sources// pane contains the project hierarchy and is used for opening up files. The folder structure is organized such that the HDL files are kept under the //Design Sources// folder, constraints are kept under the // |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 190: | Line 194: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The Properties pane allows for viewing and editing of file properties. When a file is selected in the Sources pane its properties are shown in here. This pane can usually be ignored. | + | The //Properties// pane allows for viewing and editing of file properties. When a file is selected in the Sources pane its properties are shown in here. This pane can usually be ignored. |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 199: | Line 203: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The unnamed pane at the bottom of the Project Manager window consists of several different useful tools for debugging a project. The most important one to know is the Messages tool. This tool parses the Tcl console for errors, warnings, and other important information and displays it in an informative way. | + | The unnamed pane at the bottom of the Project Manager window consists of several different useful tools for debugging a project. The most important one to know is the //Messages// tool. This tool parses the Tcl console for errors, warnings, and other important information and displays it in an informative way. |
| These tools can be accessed by selecting the different tabs at the bottom of this pane. | These tools can be accessed by selecting the different tabs at the bottom of this pane. | ||
| Line 210: | Line 214: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The Tcl Console is a tool that allows for running commands directly without the use of the main user interface. Some messages may link to the Tcl Console to provide more information regarding an error. | + | The //Tcl Console// is a tool that allows for running commands directly without the use of the main user interface. Some messages may link to the Tcl Console to provide more information regarding an error. |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 219: | Line 223: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The Reports tool is useful for quickly jumping to any one of the many reports that Vivado generates on a design. These reports include power, timing, and utilization just to name a few. | + | The //Reports// tool is useful for quickly jumping to any one of the many reports that Vivado generates on a design. These reports include power, timing, and utilization just to name a few. |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 228: | Line 232: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The Log displays the output from the latest Synthesis, Implementation, | + | The //Log// displays the output from the latest Synthesis, Implementation, |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 237: | Line 241: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The last tool is the Design Runs. Using this tool run settings can be edited and new runs can be created. This tool is useful when targeting multiple devices with the same design. | + | The last tool is the //Design Runs//. Using this tool run settings can be edited and new runs can be created. This tool is useful when targeting multiple devices with the same design. |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 246: | Line 250: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The most important pane in the Project Manager is the Workspace. The Workspace is where reports are opened for viewing and HDL/ | + | The most important pane in the Project Manager is the //Workspace//. The Workspace is where reports are opened for viewing and HDL/ |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 255: | Line 259: | ||
| ==== 6. Adding a Constraint File ==== | ==== 6. Adding a Constraint File ==== | ||
| - | In order to connect | + | In order to connect HDL code with the physical pins of the FPGA, a constraint file needs to be added or created. Digilent has produced a Xilinx Design Constraint (XDC) file for each of our boards. Download [[https:// |
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| === 6.1 === | === 6.1 === | ||
| - | In the Project Manager section of the Flow Navigator, click the {{: | + | In the //Project Manager// section of the //Flow Navigator//, click the {{: |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 270: | Line 274: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 6.2 === | === 6.2 === | ||
| - | At this stage, | + | At this stage, |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 292: | Line 296: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 6.4 === | === 6.4 === | ||
| - | Make sure that your XDC file has been added into the list of sources, then click //Finish//. | + | Make sure that the selected |
| + | |||
| + | **Note:** //Leaving the Copy... box unchecked means that any editing done to the constraint file will be reflected in the original copy. Checking the box is highly recommended// | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 301: | Line 307: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | In the sources | + | In the // |
| - | Find and uncomment the lines corresponding to the ports led[0] and clk by removing the '#' | + | Find and uncomment the lines that call // |
| <WRAP round center tip> | <WRAP round center tip> | ||
| === Tip === | === Tip === | ||
| Line 320: | Line 326: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 7.1 === | === 7.1 === | ||
| - | In the Project Manager section of the Flow Navigator, click the {{: | + | In the //Project Manager// section of the //Flow Navigator//, click the {{: |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| - | FIXME | + | {{ : |
| </ | </ | ||
| </ | </ | ||
| Line 344: | Line 350: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 7.3 === | === 7.3 === | ||
| - | You will be prompted to select a File type, name, and location | + | You will be prompted to select a //File type//, // |
| <WRAP center round important> | <WRAP center round important> | ||
| === Important === | === Important === | ||
| Line 359: | Line 365: | ||
| <WRAP column half> | <WRAP column half> | ||
| === 7.4 === | === 7.4 === | ||
| - | Make sure that your new file has been added into the list of sources, then click //Finish//. | + | Make sure that the new Verilog source |
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| Line 366: | Line 372: | ||
| </ | </ | ||
| - | <WRAP group> | ||
| - | <WRAP column half> | ||
| - | </ | ||
| === 7.5 === | === 7.5 === | ||
| - | Unlike when we added the constraint file, at this point a //Define Module// dialog will pop up. You can rename your Verilog module using the //Module name// field, but this is unnecessary. | + | Unlike when the constraint file was added, at this point a //Define Module// dialog will pop up. You can rename your Verilog module using the //Module name// field, but this is unnecessary. |
| + | |||
| + | {{ : | ||
| There are five fields to define for each of the module' | There are five fields to define for each of the module' | ||
| - | * //Port Name// | + | * **Port Name:** This field defines the name of the port and needs to match one of the names you used in your XDC file. |
| - | | + | * **Direction:** This drop-down menu can be set to //input//, //output//, or //inout//, defining the direction that signals propagate through this port, with respect to your module. Outputs are the signals that your module will be controlling. |
| - | * //Direction// | + | * **Bus:** This can be checked or not, when checked, this port consists of multiple single bit signals, grouped into a single bus. |
| - | | + | * **MSB:** The index of the most significant bit of the port, if it is a bus. This option is grayed out for single-bit ports. |
| - | * //Bus// | + | * **LSB:** The index of the least significant bit of the port, if it is a bus. This option is grayed out for single-bit ports. |
| - | | + | |
| - | * //MSB// | + | |
| - | | + | |
| - | * //LSB// | + | |
| - | | + | |
| <WRAP round center tip> | <WRAP round center tip> | ||
| Line 389: | Line 389: | ||
| </ | </ | ||
| - | If your board uses differential clocking, add two single-bit input ports with the same names as the positive and negative clock signals we uncommented in your XDC file. Otherwise, add a single single-bit input port with the same name as the clock we uncommented in your XDC file. | + | If your board uses differential clocking, add two single-bit input ports with the same names as the positive and negative clock ports that were uncommented in your XDC file. Otherwise, add a single single-bit input port with the same name as the clock port that was uncommented in your XDC file. |
| - | Add a single-bit output port with the same name as the LED port we uncommented in your XDC file. | + | Add a single-bit output port with the same name as the LED port that was uncommented in your XDC file. |
| Once these two or three ports have been added, click //OK// to continue. | Once these two or three ports have been added, click //OK// to continue. | ||
| - | <WRAP column half> | ||
| - | {{ : | ||
| - | </ | ||
| - | </ | ||
| - | <WRAP group> | ||
| - | <WRAP column half> | ||
| - | </ | ||
| === 7.6 === | === 7.6 === | ||
| - | At this point, | + | At this point, |
| - | We now need to write some Verilog code to define how the design will actually behave. | + | Next, some Verilog code needs to be written |
| - | <WRAP column half> | + | |
| - | {{ : | + | {{ : |
| - | </ | + | |
| - | </ | + | |
| Between the ' | Between the ' | ||
| Line 421: | Line 412: | ||
| </ | </ | ||
| - | If your design | + | If your board is differentially clocked, add the following lines of code after ' |
| <code verilog> | <code verilog> | ||
| Line 433: | Line 424: | ||
| </ | </ | ||
| - | It should be noted that the rate at which the clock will blink will differ depending on the board used. System clocks on different Digilent boards run at a number of different rates, depending on the needs of the board. After completing this guide, | + | It should be noted that the rate at which the clock will blink will differ depending on the board used. System clocks on different Digilent boards run at a number of different rates, depending on the needs of the board. |
| + | |||
| + | After completing this guide, | ||
| ==== 8. Synthesis, Implementation, | ==== 8. Synthesis, Implementation, | ||
| Line 439: | Line 432: | ||
| In order to create a file that can be used to program the target board, each stage of the " | In order to create a file that can be used to program the target board, each stage of the " | ||
| - | This starts with Synthesis. Synthesis turns HDL files into a transistor level description based on timing and I/O constraints. To run Synthesis click either {{: | + | This starts with //Synthesis//. Synthesis turns HDL files into a transistor level description based on timing and I/O constraints. To run Synthesis click either {{: |
| - | Implementation has several steps. The steps that are always run are Opt Design (Optimize the design to fit on the target FPGA), Place Design (Lay out the design in the target FPGA fabric), and Route Design (Route signals through the fabric). To run Implementation click either {{: | + | //Implementation// has several steps. The steps that are always run are //Opt Design// (Optimize the design to fit on the target FPGA), |
| - | The Bitstream Generator generates the final outputs needed for programming the FPGA. To run Bitstream Generation click either {{: | + | The //Bitstream Generator// generates the final outputs needed for programming the FPGA. To run Bitstream Generation click either {{: |
| ==== 9. The Hardware Manager ==== | ==== 9. The Hardware Manager ==== | ||
| - | The Hardware Manager is used for programming the target device. | + | The //Hardware Manager// is used for programming the target device. |
| {{ : | {{ : | ||
| Line 457: | Line 450: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The first method is to manually open the target. This is required if the hardware is connected to another computer. To get to the Open Hardware Target wizard either open the Hardware Manager and click the {{: | + | The first method is to manually open the target. This is required if the hardware is connected to another computer. To get to the //Open Hardware Target// wizard either open the //Hardware Manager// and click the {{: |
| Once the wizard opens, click //Next//. | Once the wizard opens, click //Next//. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| - | FIXME | ||
| {{ : | {{ : | ||
| </ | </ | ||
| Line 469: | Line 461: | ||
| <WRAP group> | <WRAP group> | ||
| <WRAP column half> | <WRAP column half> | ||
| - | The next screen asks if the hardware server is local or remote. If the board is connected to the host computer choose local, if it is connected to another machine choose remote and fill in the //Host Name// and //Port// fields | + | The next screen asks if the hardware server is local or remote. If the board is connected to the host computer choose local, if it is connected to another machine choose remote and fill in the //Host Name// and //Port// fields. |
| Click //Next// to continue. | Click //Next// to continue. | ||
| </ | </ | ||
| <WRAP column half> | <WRAP column half> | ||
| - | FIXME | ||
| {{ : | {{ : | ||
| </ | </ | ||
| Line 501: | Line 492: | ||
| **2. Auto-Connect** | **2. Auto-Connect** | ||
| - | The second method is to automatically open the target. To get to the {{: | + | The second method is to automatically open the target. To get to the {{: |
| ---- | ---- | ||
| Line 507: | Line 498: | ||
| **Programming** | **Programming** | ||
| - | To program the device with the bit file generated earlier, either click the {{: | + | To program the device with the bit file generated earlier, either click the {{: |
| {{ : | {{ : | ||
| - | The //Bitstream File// field should be filled in with the bit file generated earlier. If not, click the {{: | + | The //Bitstream File// field should be automatically |
| ----- | ----- | ||
| + | |||
| + | ==== 10. Finished! ==== | ||
| You should now see one of the LEDs on your board blinking! | You should now see one of the LEDs on your board blinking! | ||
| - | Be sure to visit your board' | + | Be sure to visit your board' |
| - | {{tag> | + | {{tag> |

