{"id":19765,"date":"2017-03-29T10:00:06","date_gmt":"2017-03-29T17:00:06","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=19765"},"modified":"2026-09-26T07:31:33","modified_gmt":"2026-09-26T14:31:33","slug":"creating-and-programming-our-first-fpga-project-part-4","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/creating-and-programming-our-first-fpga-project-part-4\/","title":{"rendered":"Creating and Programming our First FPGA Project"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Welcome back to the Digilent blog!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This guide walks through the entire process, start to finish: getting the required files, creating the Vivado project, writing the Verilog and XDC code, and generating and programming the bitstream.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">While it would be nice to think that we can simply write up an FPGA program and configure our board with it and move on to the next program,<\/span><a href=\"https:\/\/www.youtube.com\/watch?v=gUsHwi4M4xE\"> <span style=\"font-weight: 400;\">FPGAs are complex enough<\/span><\/a><span style=\"font-weight: 400;\"> that it is a good idea to add in some pre-made board files to help smooth out the programming process. I will be using <\/span><a href=\"https:\/\/digilent.com\/shop\/arty-a7-100t-artix-7-fpga-development-board\/\"><span style=\"font-weight: 400;\">Digilent&#8217;s Arty<\/span><\/a> <span style=\"font-weight: 400;\">throughout the duration of this tutorial and Verilog as my FPGA programming language of choice and the 2016.4 WebPACK edition of Xilinx&#8217;s Vivado Design Suite, though boards like the <\/span><a href=\"https:\/\/digilent.com\/shop\/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users\/\"><span style=\"font-weight: 400;\">Basys 3<\/span><\/a><span style=\"font-weight: 400;\">, <\/span><a href=\"https:\/\/digilent.com\/shop\/nexys-a7-fpga-trainer-board-recommended-for-ece-curriculum\/\"><span style=\"font-weight: 400;\">Nexys A7<\/span><\/a><span style=\"font-weight: 400;\">, <\/span><a href=\"https:\/\/digilent.com\/shop\/cmod-a7-35t-breadboardable-artix-7-fpga-module\/\"><span style=\"font-weight: 400;\">Cmod A7<\/span><\/a><span style=\"font-weight: 400;\">, <\/span><a href=\"https:\/\/digilent.com\/shop\/cmod-s7-breadboardable-spartan-7-fpga-module\/\"><span style=\"font-weight: 400;\">Cmod S7<\/span><\/a><span style=\"font-weight: 400;\">, and <\/span><a href=\"https:\/\/digilent.com\/shop\/arty-s7-spartan-7-fpga-development-board\/\"><span style=\"font-weight: 400;\">Arty S7<\/span><\/a><span style=\"font-weight: 400;\"> will also work.<\/span><\/p>\n<figure id=\"attachment_19292\" aria-describedby=\"caption-attachment-19292\" style=\"width: 1000px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19292\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Digilents-Arty.png\" alt=\"\" width=\"1000\" height=\"863\" data-wp-pid=\"19292\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Digilents-Arty.png 1000w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Digilents-Arty-600x518.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Digilents-Arty-768x663.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Digilents-Arty-110x96.png 110w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Digilents-Arty-800x690.png 800w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption id=\"caption-attachment-19292\" class=\"wp-caption-text\">Digilent&#8217;s Arty<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">The two files we will be looking for are the Arty XDC (Xilinx Design Constraints) file and the Arty board file. The XDC file is used by Vivado to associate the names of the inputs and outputs we &#8220;create&#8221; in our Verilog code to actual pins on the FPGA chip. The board file is used to group different sets of pins on the FPGA together so that they can be readily used when configuring various IP blocks; we won&#8217;t be using any IP blocks in this tutorial, but it&#8217;s nice to already have the board file installed for the future (and makes it much easier to tell Vivado which FPGA we are working with when we are initially creating a project).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To get the Arty board file, go ahead and download the Digilent board files from the<\/span><a href=\"https:\/\/github.com\/Digilent\/vivado-boards\/archive\/master.zip\"> <span style=\"font-weight: 400;\">Digilent GitHub account<\/span><\/a><span style=\"font-weight: 400;\"> (at the direct download link or<\/span><a href=\"https:\/\/github.com\/Digilent\/vivado-boards\/tree\/master\/new\/board_files\"> <span style=\"font-weight: 400;\">view the board files natively in GitHub here<\/span><\/a><span style=\"font-weight: 400;\">). Within the board files .zip folder, you&#8217;ll want to extract the &#8220;Arty&#8221; folder (and everything inside it) to the board_files folder that is inside the Xilinx directory, which you already have installed. On a Windows system, the default location for this board_files folder is <\/span><span style=\"font-weight: 400;\">C:\\Xilinx\\Vivado\\2016.4\\data\\boards\\board_files<\/span><span style=\"font-weight: 400;\">; copy the whole &#8220;Arty&#8221; folder structure into this folder.<\/span><\/p>\n<figure id=\"attachment_19294\" aria-describedby=\"caption-attachment-19294\" style=\"width: 1566px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19294\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Download-the-Digilent-board-files.png\" alt=\"\" width=\"1566\" height=\"925\" data-wp-pid=\"19294\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Download-the-Digilent-board-files.png 1566w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Download-the-Digilent-board-files-600x354.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Download-the-Digilent-board-files-768x454.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Download-the-Digilent-board-files-1024x605.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Download-the-Digilent-board-files-800x473.png 800w\" sizes=\"auto, (max-width: 1566px) 100vw, 1566px\" \/><figcaption id=\"caption-attachment-19294\" class=\"wp-caption-text\">Download the Digilent board files from the Digilent GitHub<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Next, we&#8217;ll want to get the XDC file for the Arty so that we can inform Vivado what physical pins we wish to use with our project. A master XDC file for the Arty (and all of<\/span> <a href=\"https:\/\/digilent.com\/shop\/products\/fpga-boards\/system-boards\/\"><span style=\"font-weight: 400;\">Digilent&#8217;s FPGA boards<\/span><\/a><span style=\"font-weight: 400;\">) can be found in their respective Resource Centers on our Wiki. The Arty Resource Center is<\/span><a href=\"https:\/\/digilent.com\/reference\/programmable-logic\/arty\/start\"> <span style=\"font-weight: 400;\">here<\/span><\/a><span style=\"font-weight: 400;\">, with the Master XDC file available in the box on the right-hand side of the screen underneath &#8220;Design Resources&#8221;. Once you have downloaded the Master XDC file, save it somewhere on your computer where you can easily find it again since we&#8217;ll need to be able to tell Vivado where to find the file when we create our project.<\/span><\/p>\n<figure id=\"attachment_19291\" aria-describedby=\"caption-attachment-19291\" style=\"width: 1619px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19291\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Arty-Master-XDC-location.png\" alt=\"\" width=\"1619\" height=\"988\" data-wp-pid=\"19291\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Arty-Master-XDC-location.png 1619w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Arty-Master-XDC-location-600x366.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Arty-Master-XDC-location-768x469.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Arty-Master-XDC-location-1024x625.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Arty-Master-XDC-location-800x488.png 800w\" sizes=\"auto, (max-width: 1619px) 100vw, 1619px\" \/><figcaption id=\"caption-attachment-19291\" class=\"wp-caption-text\">Where you can find the Master XDC file on a Digilent FPGA Resource Center<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Let&#8217;s go ahead and create ourselves a new Vivado project. To do so, open up the Vivado application and click on the &#8220;Create New Project&#8221; button located in the upper left-hand corner, and then click &#8220;Next&#8221; on the next screen that appears to confirm that we do want to create a new project.<\/span><\/p>\n<figure id=\"attachment_19568\" aria-describedby=\"caption-attachment-19568\" style=\"width: 1921px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19568\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Open-up-Vivado-and-choose-create-new-project.png\" alt=\"\" width=\"1921\" height=\"1032\" data-wp-pid=\"19568\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Open-up-Vivado-and-choose-create-new-project.png 1921w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Open-up-Vivado-and-choose-create-new-project-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Open-up-Vivado-and-choose-create-new-project-768x413.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Open-up-Vivado-and-choose-create-new-project-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Open-up-Vivado-and-choose-create-new-project-800x430.png 800w\" sizes=\"auto, (max-width: 1921px) 100vw, 1921px\" \/><figcaption id=\"caption-attachment-19568\" class=\"wp-caption-text\">Choose a new project on the Vivado opening screen<\/figcaption><\/figure>\n<figure id=\"attachment_19567\" aria-describedby=\"caption-attachment-19567\" style=\"width: 924px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19567\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Friendly-instructions-for-creating-a-new-project.png\" alt=\"\" width=\"924\" height=\"668\" data-wp-pid=\"19567\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Friendly-instructions-for-creating-a-new-project.png 924w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Friendly-instructions-for-creating-a-new-project-600x434.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Friendly-instructions-for-creating-a-new-project-768x555.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Friendly-instructions-for-creating-a-new-project-800x578.png 800w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption id=\"caption-attachment-19567\" class=\"wp-caption-text\">Friendly instructions from Vivado on how to create a project.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">We&#8217;ll then be able to name our project and choose where we would like Vivado to save and generally store our project on our computer. The big caveat here is that both the name of our Vivado project, as well as the file path that our Vivado project is stored in, must not have any spaces in it. Otherwise, you will run into some issues when Vivado is trying to create a project. Once you have chosen your name and file location, click &#8220;Next&#8221;, and on the next page choose to create an RTL project (the first option), leaving the box to &#8220;Do not specify sources at this time&#8221; unchecked.<\/span><\/p>\n<figure id=\"attachment_19575\" aria-describedby=\"caption-attachment-19575\" style=\"width: 924px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19575\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Name-your-project-and-choose-a-location.png\" alt=\"\" width=\"924\" height=\"666\" data-wp-pid=\"19575\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Name-your-project-and-choose-a-location.png 924w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Name-your-project-and-choose-a-location-600x432.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Name-your-project-and-choose-a-location-768x554.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Name-your-project-and-choose-a-location-800x577.png 800w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption id=\"caption-attachment-19575\" class=\"wp-caption-text\">Name your Vivado project and choose where to save it<\/figcaption><\/figure>\n<figure id=\"attachment_19573\" aria-describedby=\"caption-attachment-19573\" style=\"width: 925px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19573\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-an-RTL-project-with-sources.png\" alt=\"\" width=\"925\" height=\"666\" data-wp-pid=\"19573\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-an-RTL-project-with-sources.png 925w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-an-RTL-project-with-sources-600x432.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-an-RTL-project-with-sources-768x553.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-an-RTL-project-with-sources-800x576.png 800w\" sizes=\"auto, (max-width: 925px) 100vw, 925px\" \/><figcaption id=\"caption-attachment-19573\" class=\"wp-caption-text\">Create an RTL project in Vivado<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">On the next page, choose &#8220;Create File&#8221; so we can create our own source file now rather than having to manually create it later. A &#8220;Create Source File&#8221; window will pop up where we can choose our file type of Verilog (for this tutorial) and the name of our Verilog source file. A typical name for these source files that will be the primary file that runs our program is &#8220;top.v&#8221; to signify that it is the file that runs (and calls) everything involved with that file. Once you&#8217;re done with that, click &#8220;OK&#8221; and then click &#8220;Next&#8221;.<\/span><\/p>\n<figure id=\"attachment_19570\" aria-describedby=\"caption-attachment-19570\" style=\"width: 924px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19570\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-HDL-source.png\" alt=\"\" width=\"924\" height=\"665\" data-wp-pid=\"19570\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-HDL-source.png 924w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-HDL-source-600x432.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-HDL-source-768x553.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-HDL-source-800x576.png 800w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption id=\"caption-attachment-19570\" class=\"wp-caption-text\">Create a HDL source file<\/figcaption><\/figure>\n<figure id=\"attachment_19574\" aria-describedby=\"caption-attachment-19574\" style=\"width: 923px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-19574 size-full\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-the-source-file.png\" alt=\"\" width=\"923\" height=\"668\" data-wp-pid=\"19574\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-the-source-file.png 923w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-the-source-file-600x434.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-the-source-file-768x556.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Create-the-source-file-800x579.png 800w\" sizes=\"auto, (max-width: 923px) 100vw, 923px\" \/><figcaption id=\"caption-attachment-19574\" class=\"wp-caption-text\">Name the HDL source file that you are creating<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Go ahead and click &#8220;Next&#8221; on the page asking about IP cores since we don&#8217;t have any to add for this tutorial. On the next page for Add Constraints, we will want to choose to &#8220;Add Files&#8221;; the file we are looking for is the Master XDC file that we added previously. Once you have found and chosen this file, be sure to check the &#8220;Copy constraints files into project&#8221; box so that the original file does not get altered when we change it later on in the tutorial.<\/span><\/p>\n<figure id=\"attachment_19569\" aria-describedby=\"caption-attachment-19569\" style=\"width: 924px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19569\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-constraint-file.png\" alt=\"\" width=\"924\" height=\"666\" data-wp-pid=\"19569\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-constraint-file.png 924w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-constraint-file-600x432.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-constraint-file-768x554.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Add-our-constraint-file-800x577.png 800w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption id=\"caption-attachment-19569\" class=\"wp-caption-text\">Choose to add a constraints file<\/figcaption><\/figure>\n<figure id=\"attachment_19571\" aria-describedby=\"caption-attachment-19571\" style=\"width: 1927px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19571\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Choose-the-constraint-file.png\" alt=\"\" width=\"1927\" height=\"1032\" data-wp-pid=\"19571\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Choose-the-constraint-file.png 1927w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Choose-the-constraint-file-600x321.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Choose-the-constraint-file-768x411.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Choose-the-constraint-file-1024x548.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Choose-the-constraint-file-800x428.png 800w\" sizes=\"auto, (max-width: 1927px) 100vw, 1927px\" \/><figcaption id=\"caption-attachment-19571\" class=\"wp-caption-text\">Choose the constraints file we&#8217;ve already saved<\/figcaption><\/figure>\n<figure id=\"attachment_19572\" aria-describedby=\"caption-attachment-19572\" style=\"width: 1922px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19572\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Copy-constraint-files-into-project.png\" alt=\"\" width=\"1922\" height=\"1032\" data-wp-pid=\"19572\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Copy-constraint-files-into-project.png 1922w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Copy-constraint-files-into-project-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Copy-constraint-files-into-project-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Copy-constraint-files-into-project-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Copy-constraint-files-into-project-800x430.png 800w\" sizes=\"auto, (max-width: 1922px) 100vw, 1922px\" \/><figcaption id=\"caption-attachment-19572\" class=\"wp-caption-text\">Be sure to make a copy of the constraints file in your project<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Now we&#8217;ll need to select the FPGA that we are using; there are two different ways that we can approach this. We can either manually search for the part (you can find the FPGA part on Digilent FPGA boards by looking at their respective Resource Centers underneath the &#8220;Documentation&#8221; section on the right-hand side of the page). Alternatively, if you click on the &#8220;Boards&#8221; button and you have added the board file for your respective board (like we did for the Arty board above), you will be able to easily find your board in the list that appears when you select <\/span><a href=\"https:\/\/digilent.com\/\"><span style=\"font-weight: 400;\">Digilent<\/span><\/a><span style=\"font-weight: 400;\"> as the vendor.<\/span><\/p>\n<figure id=\"attachment_19578\" aria-describedby=\"caption-attachment-19578\" style=\"width: 924px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19578\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-part-number.png\" alt=\"\" width=\"924\" height=\"667\" data-wp-pid=\"19578\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-part-number.png 924w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-part-number-600x433.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-part-number-768x554.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-part-number-800x577.png 800w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption id=\"caption-attachment-19578\" class=\"wp-caption-text\">Choose your FPGA by part number<\/figcaption><\/figure>\n<figure id=\"attachment_19577\" aria-describedby=\"caption-attachment-19577\" style=\"width: 924px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19577\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-board-file.png\" alt=\"\" width=\"924\" height=\"665\" data-wp-pid=\"19577\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-board-file.png 924w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-board-file-600x432.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-board-file-768x553.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Select-your-board-by-board-file-800x576.png 800w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption id=\"caption-attachment-19577\" class=\"wp-caption-text\">Choose your FPGA by board file.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">After clicking &#8220;Next&#8221; after choosing our FPGA board, we will be presented with a final confirmation screen of our new project that we&#8217;re about to create. If you&#8217;re happy with the summary, go ahead and choose &#8220;Finish&#8221;.<\/span><\/p>\n<figure id=\"attachment_19576\" aria-describedby=\"caption-attachment-19576\" style=\"width: 924px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19576\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Confirm-your-project.png\" alt=\"\" width=\"924\" height=\"666\" data-wp-pid=\"19576\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Confirm-your-project.png 924w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Confirm-your-project-600x432.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Confirm-your-project-768x554.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Confirm-your-project-800x577.png 800w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption id=\"caption-attachment-19576\" class=\"wp-caption-text\">Confirm that your project has the initial settings that you want.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Let&#8217;s go ahead and modify our new project. The first window we will encounter is a wizard that lets us configure a new module; this is a part of a Verilog project where we can define the inputs and outputs for our project that we are creating. For this tutorial, we are only assigning an LED to a value of a switch, so we only need to create a single input and a single output (leaving the &#8220;Bus&#8221; box unchecked for both of them). I named my input and output &#8220;sw&#8221; and &#8220;led&#8221;, respectively, although you can name whatever you would prefer. You can also rename your module (if you kept the top.v suggestion as the file name from before, your module will currently be called &#8220;top&#8221;) to something a little more intuitive if you so desire.<\/span><\/p>\n<figure id=\"attachment_19644\" aria-describedby=\"caption-attachment-19644\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19644\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Post-module-wizard-Vivado-screen.png\" alt=\"\" width=\"1920\" height=\"1031\" data-wp-pid=\"19644\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Post-module-wizard-Vivado-screen.png 1920w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Post-module-wizard-Vivado-screen-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Post-module-wizard-Vivado-screen-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Post-module-wizard-Vivado-screen-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Post-module-wizard-Vivado-screen-800x430.png 800w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><figcaption id=\"caption-attachment-19644\" class=\"wp-caption-text\">Our first look at Vivado and the location of our source file<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Finally, we&#8217;re at the main Vivado GUI where we can actually &#8220;do stuff&#8221;, i.e., add the code to our Verilog module that tells Vivado what the module is supposed to do, change the XDC file to inform Vivado what physical pins you intend to use with your module, add IP if you choose to do so, and more. Let&#8217;s go ahead and add in the Verilog code for our top module.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">What we intend to do for this particular tutorial is have the state of the LED be dependent upon the state of the associated switch. The keyword that will best model this behavior in Verilog is <code>assign<\/code>. Double-click on the top module code in the Sources window in the Design Sources folder to have it open up in the editor in the upper right-hand side of the GUI. The line of code that we will want to add is<\/span><\/p>\n<p><code>assign led = sw;<\/code><\/p>\n<p><span style=\"font-weight: 400;\">It will go between the closing curly brace and semicolon surrounding the named module that we just created in the wizard. That&#8217;ll be all we need to do in the Verilog Module for this project.<\/span><\/p>\n<figure id=\"attachment_19645\" aria-describedby=\"caption-attachment-19645\" style=\"width: 1921px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19645\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Top-module-wizard.png\" alt=\"\" width=\"1921\" height=\"1031\" data-wp-pid=\"19645\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Top-module-wizard.png 1921w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Top-module-wizard-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Top-module-wizard-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Top-module-wizard-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Top-module-wizard-800x429.png 800w\" sizes=\"auto, (max-width: 1921px) 100vw, 1921px\" \/><figcaption id=\"caption-attachment-19645\" class=\"wp-caption-text\">Top module wizard in Vivado<\/figcaption><\/figure>\n<figure id=\"attachment_19646\" aria-describedby=\"caption-attachment-19646\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19646\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Verilog-module-is-edited.png\" alt=\"\" width=\"1920\" height=\"1031\" data-wp-pid=\"19646\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Verilog-module-is-edited.png 1920w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Verilog-module-is-edited-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Verilog-module-is-edited-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Verilog-module-is-edited-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Verilog-module-is-edited-800x430.png 800w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><figcaption id=\"caption-attachment-19646\" class=\"wp-caption-text\">We have added in our code to our top module<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">The XDC file will require a little more manipulation and is the focal point of what makes FPGAs so versatile to the end user; when this file is edited, we are, in essence, informing Vivado where all of our inputs and outputs on our &#8220;black box&#8221; are physically located on the FPGA. Vivado does all the heavy lifting in terms of how to actually connect point A to point B using the HDL we created in the Verilog module, while we just have to worry about some external aesthetics. Naturally, this analogy falls short once you get into more complex designs, but it&#8217;s fun to think that way. But back to the XDC file itself; how do we actually edit it?<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can find the XDC file in the upper left corner in the Sources window in the Constraints folder. Double-clicking on it will bring up the XDC file in the upper right-hand side of the Vivado GUI. If you are using a master XDC file for a Digilent board, you will notice that everything in the XDC file is currently commented out with a # sign so that Vivado does not interpret it as code to be used. What we will want to do with this project (having the state of an LED be assigned to the state of a switch) is enable our LED and switch of choice.<\/span><\/p>\n<figure id=\"attachment_19647\" aria-describedby=\"caption-attachment-19647\" style=\"width: 1921px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19647\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Find-our-constraints-file.png\" alt=\"\" width=\"1921\" height=\"1031\" data-wp-pid=\"19647\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Find-our-constraints-file.png 1921w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Find-our-constraints-file-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Find-our-constraints-file-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Find-our-constraints-file-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Find-our-constraints-file-800x429.png 800w\" sizes=\"auto, (max-width: 1921px) 100vw, 1921px\" \/><figcaption id=\"caption-attachment-19647\" class=\"wp-caption-text\">Where to find the constraints file in Vivado<\/figcaption><\/figure>\n<figure id=\"attachment_19648\" aria-describedby=\"caption-attachment-19648\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19648\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/We-can-edit-our-constraints-file-now.png\" alt=\"\" width=\"1920\" height=\"1031\" data-wp-pid=\"19648\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/We-can-edit-our-constraints-file-now.png 1920w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/We-can-edit-our-constraints-file-now-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/We-can-edit-our-constraints-file-now-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/We-can-edit-our-constraints-file-now-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/We-can-edit-our-constraints-file-now-800x430.png 800w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><figcaption id=\"caption-attachment-19648\" class=\"wp-caption-text\">A brief look at the XDC file<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">It&#8217;s important to note here that we can&#8217;t just use any pin for our LED and switch, despite how I described the XDC file in the previous paragraph. As I am looking to use one of the embedded switches and LEDs already present on the Arty (as that is my board of choice), those components are already pre-wired to a pin on the FPGA and can&#8217;t be re-routed without making physical modifications to the board. However, if I instead had an external switch and LED, in theory I could then attach those to any pin in the FPGA that I could physically access. While this might not seem all that different from a microcontroller, this really comes into play when you start to create hardware controllers, but you can place as many as you want wherever you need to rather than being limited to whatever that microcontroller has built into it.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The Digilent master XDC files are organized by physical group on the FPGA, such as switches, Pmod Headers, Ethernet PHY, and the like. For this tutorial project, we can scroll down to the switches and LEDs section and uncomment a single line from both of them by removing the <code>#<\/code> sign from the front of the associated line of code. Then, we need to edit the name of the pin (between the curly braces immediately following the <code>get_ports<\/code> statement) to match whatever we called it in our Verilog module.<\/span><\/p>\n<figure id=\"attachment_19650\" aria-describedby=\"caption-attachment-19650\" style=\"width: 1588px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19650\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/ModuleNamesAndXDCfileNamesMatching.png\" alt=\"\" width=\"1588\" height=\"603\" data-wp-pid=\"19650\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/ModuleNamesAndXDCfileNamesMatching.png 1588w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/ModuleNamesAndXDCfileNamesMatching-600x228.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/ModuleNamesAndXDCfileNamesMatching-768x292.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/ModuleNamesAndXDCfileNamesMatching-1024x389.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/ModuleNamesAndXDCfileNamesMatching-800x304.png 800w\" sizes=\"auto, (max-width: 1588px) 100vw, 1588px\" \/><figcaption id=\"caption-attachment-19650\" class=\"wp-caption-text\">Our edited XDC file names match our module names<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Phew! The Verilog module and XDC file are edited and ready to go! After saving this project, we&#8217;ll then be able to generate our bitstream and program the FPGA.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let&#8217;s go ahead and generate the bitstream! In practice, you would be able to simply click on the &#8220;Generate Bitstream&#8221; button on the left-hand side of the GUI under the &#8220;Program and Debug&#8221; subsection, but we&#8217;ll manually walk through each of the required preceding steps. Presuming your Verilog module and XDC file are already edited to your taste and are saved, go ahead and click on &#8220;Run Synthesis&#8221; under the &#8220;Synthesis&#8221; subsection on the left-hand side of the GUI.<\/span><\/p>\n<figure id=\"attachment_19781\" aria-describedby=\"caption-attachment-19781\" style=\"width: 1922px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19781\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-synthesis.png\" alt=\"\" width=\"1922\" height=\"1032\" data-wp-pid=\"19781\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-synthesis.png 1922w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-synthesis-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-synthesis-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-synthesis-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-synthesis-800x430.png 800w\" sizes=\"auto, (max-width: 1922px) 100vw, 1922px\" \/><figcaption id=\"caption-attachment-19781\" class=\"wp-caption-text\">Click the run synthesis button to start the process of programming our board.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">The first time running synthesis (and later times as well if you don&#8217;t check the &#8220;Don&#8217;t show this dialog again&#8221; box), you&#8217;ll be presented with a wizard showing you some synthesis options. What we want to do is leave our &#8220;Launch directory&#8221; in the &#8220;Default Launch Directory&#8221; folder and to choose to have the launch run on the local host (your computer) rather than only generating the scripts. You&#8217;ll also be given a dropdown option to choose the &#8220;Number of jobs&#8221; that Vivado can use; this is essentially the number of computer cores that Vivado is allowed to use on your computer. I recommend choosing the maximum number that is available to you, as getting a bitstream ready to program an FPGA is very computer-intensive. As a side note, the whole combination of synthesis, implementation, and the generation of the bitstream can take quite a bit of time (more than 10 minutes in some cases) since Vivado processes a ton of things hidden to the user and works with the entire FPGA and not just what we are physically utilizing. Click OK after you&#8217;re happy with your selections and wait for the synthesis process to complete, which may take a couple of minutes depending on your computer.<\/span><\/p>\n<figure id=\"attachment_19782\" aria-describedby=\"caption-attachment-19782\" style=\"width: 1922px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19782\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Run-synthesis-options.png\" alt=\"\" width=\"1922\" height=\"1031\" data-wp-pid=\"19782\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Run-synthesis-options.png 1922w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Run-synthesis-options-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Run-synthesis-options-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Run-synthesis-options-1024x549.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Run-synthesis-options-800x429.png 800w\" sizes=\"auto, (max-width: 1922px) 100vw, 1922px\" \/><figcaption id=\"caption-attachment-19782\" class=\"wp-caption-text\">You&#8217;ll see a number of options to run the synthesis procedure.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">Once it&#8217;s done, you&#8217;ll then be presented with a pop-up asking you what you would like to do next. Go ahead and choose the &#8220;Run Implementation&#8221; option. You&#8217;ll then see a similar wizard for the implementation process, where you&#8217;ll want to keep the default options, but have the maximum number of cores (jobs) be used. This process also can take a couple of minutes.<\/span><\/p>\n<figure id=\"attachment_19780\" aria-describedby=\"caption-attachment-19780\" style=\"width: 1923px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19780\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-implementation.png\" alt=\"\" width=\"1923\" height=\"1032\" data-wp-pid=\"19780\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-implementation.png 1923w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-implementation-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-implementation-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-implementation-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-run-implementation-800x429.png 800w\" sizes=\"auto, (max-width: 1923px) 100vw, 1923px\" \/><figcaption id=\"caption-attachment-19780\" class=\"wp-caption-text\">Run the implementation after the synthesis is completed.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">You&#8217;ll receive a second popup asking what you want to do next. You&#8217;ll want to choose &#8220;Generate Bitstream&#8221;, but as a side note, you may not necessarily want to click on the &#8220;don&#8217;t show this dialog again&#8221; box this time because if you are designing a circuit for your FPGA to run, you may just want to check to see if Vivado was able to successfully make it through synthesis and implementation. If there is an error, you would not want to generate a faulty bitstream. You&#8217;ll then be able to choose some bitstream generation options, much like for synthesis and implementation. When you are happy with your selections, click OK to have Vivado generate the bitstream.<\/span><\/p>\n<figure id=\"attachment_19778\" aria-describedby=\"caption-attachment-19778\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19778\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/click-generate-bitstream.png\" alt=\"\" width=\"1920\" height=\"1032\" data-wp-pid=\"19778\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/click-generate-bitstream.png 1920w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/click-generate-bitstream-600x323.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/click-generate-bitstream-768x413.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/click-generate-bitstream-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/click-generate-bitstream-800x430.png 800w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><figcaption id=\"caption-attachment-19778\" class=\"wp-caption-text\">Choose to generate the bitstream after implementation is finished.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">After another few minutes, the bitstream will finally be generated, and all we have left to do is program our FPGA with it! You&#8217;ll see another helpful popup where we will get the option to choose to open the Hardware Manager, which is where we will be able to make sure Vivado is connected to our FPGA.<\/span><\/p>\n<figure id=\"attachment_19779\" aria-describedby=\"caption-attachment-19779\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19779\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-open-hardware-manager.png\" alt=\"\" width=\"1920\" height=\"1032\" data-wp-pid=\"19779\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-open-hardware-manager.png 1920w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-open-hardware-manager-600x323.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-open-hardware-manager-768x413.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-open-hardware-manager-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Click-open-hardware-manager-800x430.png 800w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><figcaption id=\"caption-attachment-19779\" class=\"wp-caption-text\">Open the Hardware Manager after the bitstream is generated.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">If your FPGA is not connected to your computer already (or if it&#8217;s connecting for the first time) you&#8217;ll see a green bar at the top that indicates that no hardware target (FPGA) is currently open. After you connect your FPGA to your computer, typically via a micro USB cable, and confirm that the LED power indicator lights turn on, go ahead and click on the &#8220;Open Target&#8221; button in the green bar and then choose &#8220;Auto Connect&#8221;.<\/span><\/p>\n<figure id=\"attachment_19776\" aria-describedby=\"caption-attachment-19776\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19776\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-auto-connect.png\" alt=\"\" width=\"1920\" height=\"1031\" data-wp-pid=\"19776\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-auto-connect.png 1920w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-auto-connect-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-auto-connect-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-auto-connect-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-auto-connect-800x430.png 800w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><figcaption id=\"caption-attachment-19776\" class=\"wp-caption-text\">Choose auto-connect after opening your hardware manager in Vivado.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">We&#8217;ll then be asked to choose the bitstream file to load the FPGA with (we don&#8217;t have to worry about the debug probes since we don&#8217;t have any in this project). The bitstream file is a little non-intuitive to find; You can find it in your project directory under <\/span><span style=\"font-weight: 400;\">yourProjectName.runs<\/span><span style=\"font-weight: 400;\">, then <\/span><span style=\"font-weight: 400;\">impl_1<\/span><span style=\"font-weight: 400;\">. Select the <\/span><span style=\"font-weight: 400;\">.bit<\/span><span style=\"font-weight: 400;\"> file inside that folder, and then choose the .bit file that you see. In this tutorial, the Verilog module is named top, so the bitstream is called top.bit. Click OK to confirm your selection of the bitstream and then click &#8220;Program&#8221; (you can leave the &#8220;Enable end of startup check&#8221; either enabled or disabled). Luckily, the programming process itself will take under 10 seconds, so that&#8217;s a nice change of pace. (<span data-sheets-root=\"1\">Arty Programming Guide keeps going, into the<a href=\"https:\/\/digilent.com\/reference\/learn\/programmable-logic\/tutorials\/arty-programming-guide\/start\" target=\"_blank\" rel=\"noopener\"> reference for Arty programming<\/a>.<\/span>)<\/span><\/p>\n<figure id=\"attachment_19777\" aria-describedby=\"caption-attachment-19777\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19777\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-bitstream-file.png\" alt=\"\" width=\"1920\" height=\"1032\" data-wp-pid=\"19777\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-bitstream-file.png 1920w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-bitstream-file-600x323.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-bitstream-file-768x413.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-bitstream-file-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/choose-bitstream-file-800x430.png 800w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><figcaption id=\"caption-attachment-19777\" class=\"wp-caption-text\">We need to choose our bitstream file in Vivado.<\/figcaption><\/figure>\n<figure id=\"attachment_19775\" aria-describedby=\"caption-attachment-19775\" style=\"width: 1921px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19775\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/bitstream-file-location.png\" alt=\"\" width=\"1921\" height=\"1031\" data-wp-pid=\"19775\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/bitstream-file-location.png 1921w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/bitstream-file-location-600x322.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/bitstream-file-location-768x412.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/bitstream-file-location-1024x550.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/bitstream-file-location-800x429.png 800w\" sizes=\"auto, (max-width: 1921px) 100vw, 1921px\" \/><figcaption id=\"caption-attachment-19775\" class=\"wp-caption-text\">Where to find the bitstream in Vivado.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">And we&#8217;re finally done! The way I set up this tutorial (and my XDC file), I have the first switch (SW0 on the silkscreen) on the Arty controlling the state of the first monocolored LED (LD4), as evidenced in the picture below.<\/span><\/p>\n<figure id=\"attachment_19783\" aria-describedby=\"caption-attachment-19783\" style=\"width: 2295px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19783\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Switch-to-LED-demo.png\" alt=\"\" width=\"2295\" height=\"1345\" data-wp-pid=\"19783\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Switch-to-LED-demo.png 2295w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Switch-to-LED-demo-600x352.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Switch-to-LED-demo-768x450.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Switch-to-LED-demo-1024x600.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/03\/Switch-to-LED-demo-800x469.png 800w\" sizes=\"auto, (max-width: 2295px) 100vw, 2295px\" \/><figcaption id=\"caption-attachment-19783\" class=\"wp-caption-text\">The Arty board in action.<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400;\">I hope you all enjoyed this tutorial!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Please feel free to comment with any questions you have or any other tutorials you would like to see in the future! Additionally, check out <\/span><a href=\"https:\/\/digilent.com\/reference\/learn\/software\/tutorials\/verilog-project-2\/start\"><span style=\"font-weight: 400;\">our Wiki<\/span><\/a><span style=\"font-weight: 400;\"> for more resources on this project.<\/span><\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-19765 jlk' data-task='like' data-post_id='19765' data-nonce='aaac34ad53' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-19765 lc'>+3<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-19765 jlk' data-task='unlike' data-post_id='19765' data-nonce='aaac34ad53' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-19765 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-19765 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Get ready for part four of the Creating and Programming our FPGA series: Generating the Bitstream and Programming the FPGA!<\/p>\n","protected":false},"author":17,"featured_media":19321,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4327,35],"tags":[144,453],"ppma_author":[4469],"class_list":["post-19765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","category-fpga","tag-tutorial-2","tag-vivado"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/FPGAs-have-a-lot-going-on-with-them.png","jetpack_sharing_enabled":true,"authors":[{"term_id":4469,"user_id":17,"is_guest":0,"slug":"jamescolvin","display_name":"James Colvin","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/8aa85f7d11711acc7e571e1ed26c901b614a7064a2e15e522f54d9f26792ea9e?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Colvin","last_name_2":"","first_name":"James","first_name_2":"","job_title":"Applications Engineer \/ Technical Support Engineer \/ Product Support Engineer \/ Technical Writer \/ the person to bother about T&M and JTAG when the senior design engineer is busy","description":"A local Digilent employee who is sometimes tricked into making other content besides documentation and supporting customers on the Digilent Forum, but then I get to write a little more informally so that's a plus. \r\n\r\nA sassy engineer, lover of puns and dad jokes, father and husband. \r\n\r\nI know both way too much and simultaneously almost nothing about a number of nerdy topics. If you want to hear me rant, ask me what data rate USB C operates at."}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/19765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=19765"}],"version-history":[{"count":6,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/19765\/revisions"}],"predecessor-version":[{"id":32632,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/19765\/revisions\/32632"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/19321"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=19765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=19765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=19765"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=19765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}