{"id":12183,"date":"2016-05-12T12:00:10","date_gmt":"2016-05-12T19:00:10","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=12183"},"modified":"2023-04-17T12:00:04","modified_gmt":"2023-04-17T19:00:04","slug":"how-to-program-your-fpga-there-are-four-ways","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/how-to-program-your-fpga-there-are-four-ways\/","title":{"rendered":"How to program your FPGA &#8211; There are four ways!"},"content":{"rendered":"<p>If you are beginning to get into the world of FPGAs, one of the first things you need to know is how to program your board (starting with the <a href=\"https:\/\/digilent.com\/shop\/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users\/\">Basys 3<\/a> is a fine idea). That includes how to get the bit file loaded, to configuring the hardware on the board. When I was first learning, I was only taught how to program the board via JTAG.<\/p>\n<figure id=\"attachment_13971\" aria-describedby=\"caption-attachment-13971\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13971 size-medium\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-2-600x408.jpg\" alt=\"The JTAG section of the reference manual. \" width=\"600\" height=\"408\" data-wp-pid=\"13971\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-2-600x408.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-2.jpg 640w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-13971\" class=\"wp-caption-text\">The JTAG section of the reference manual.<\/figcaption><\/figure>\n<p>This configures the hardware, but\u00a0does not load the bit file into memory, meaning that if the board is power-cycled for any reason the program is lost. Now it can be reprogrammed, but that can be time consuming. And if \u00a0you need to demonstrate to a\u00a0class or if you want to send your board with the code loaded\u00a0to something like a Tradeshow you need the code to stay even when the board is powered off!<\/p>\n<p>Well in case you didn&#8217;t know, there are 4 ways to program your FPGA board. They include JTAG, Quad SPI Flash, USB and Micro SD. All four\u00a0are described in handy programming guides on each FPGA&#8217;s respective resource center. Note that not all\u00a0FPGAs can be programmed by all four methods. This blog post will address how to get started when programming some of Digilents\u00a0most popular FPGAs!<\/p>\n<figure id=\"attachment_13968\" aria-describedby=\"caption-attachment-13968\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13968 size-medium\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag3-600x389.jpg\" alt=\"The resource center for the Basys 3. \" width=\"600\" height=\"389\" data-wp-pid=\"13968\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag3-600x389.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag3-768x498.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag3-1024x664.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag3-214x140.jpg 214w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag3-800x519.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag3.jpg 1116w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-13968\" class=\"wp-caption-text\">The resource center for the Basys 3.<\/figcaption><\/figure>\n<figure id=\"attachment_13969\" aria-describedby=\"caption-attachment-13969\" style=\"width: 465px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13969 size-full\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag2.jpg\" width=\"465\" height=\"480\" data-wp-pid=\"13969\" \/><\/a><figcaption id=\"caption-attachment-13969\" class=\"wp-caption-text\">The programming guide is under Tutorials.<\/figcaption><\/figure>\n<p>The <a href=\"https:\/\/digilent.com\/shop\/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users\/\">Basys 3<\/a> can be programmed via JTAG, Quad SPI Flash and USB. The <a href=\"https:\/\/digilent.com\/shop\/arty-board-artix-7-fpga-development-board-for-makers-and-hobbyists\/\">Arty<\/a> can be programmed via Quad SPI flash and JTAG, and the <a href=\"https:\/\/digilent.com\/shop\/nexys-4-ddr-artix-7-fpga-trainer-board-recommended-for-ece-curriculum\/\">Nexys 4 DDR<\/a> can be programmed all 4 ways!<\/p>\n<figure id=\"attachment_13970\" aria-describedby=\"caption-attachment-13970\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-1-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-13970\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-1-1-600x377.jpg\" alt=\"The Basys 3 and all it's peripherals. \" width=\"600\" height=\"377\" data-wp-pid=\"13970\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-1-1-600x377.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-1-1-343x215.jpg 343w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/jtag-1-1.jpg 710w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-13970\" class=\"wp-caption-text\">The Basys 3 and all its peripherals.<\/figcaption><\/figure>\n<p>The first method involves\u00a0programming the volatile memory on the board via JTAG. To program via JTAG:<\/p>\n<ol>\n<li>Make sure the programming jumper is in the JTAG position.<\/li>\n<li>Click program device, select the device, and select the correct bit file<\/li>\n<li>Click program<\/li>\n<\/ol>\n<p>The second method is to load the bit file onto the non-volatile quad SPI\u00a0flash memory on board.<\/p>\n<ol>\n<li>Make sure the programming jumper\u00a0is in the QSPI position<\/li>\n<li>In the Hardware Manager click on the device, and add configuration memory device<\/li>\n<li>Select the memory device on your board<\/li>\n<li>Select the bit file and click Okay<\/li>\n<li>This file will now load during start up<\/li>\n<\/ol>\n<p>The third is via USB memory stick or Micro SD Card.<\/p>\n<ol>\n<li>Make sure the programming jumper\u00a0is in the USB\/SD position and the media select jumper position is in either the USB or SD position depending on what you want to use<\/li>\n<li>Plug the USB drive or Micro SD Card into your computer<\/li>\n<li>Copy the bit file into the root of the USB device or Micro SD Card<\/li>\n<li>Plug the USB device or Micro SD Card into your board<\/li>\n<li>Power and turn onto the board<\/li>\n<\/ol>\n<p>You can find the details of each process in the resource center for the FPGA board you have. The programming guide for the <a href=\"https:\/\/digilent.com\/reference\/basys3\/pg\">Basys 3<\/a> for example, can be found <a href=\"https:\/\/digilent.com\/reference\/basys3\/pg\">here<\/a>.<\/p>\n<p>Whats your favorite programming method for FPGA?<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-12183 jlk' data-task='like' data-post_id='12183' data-nonce='d8c4d58d14' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-12183 lc'>+1<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-12183 jlk' data-task='unlike' data-post_id='12183' data-nonce='d8c4d58d14' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-12183 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-12183 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Finding yourself stuck at an intersection when trying to start programming your FPGA? Kaitlyn will detail the four ways and help you decide which is the best direction.<\/p>\n","protected":false},"author":18,"featured_media":14283,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18,35,1563],"tags":[1662],"ppma_author":[4466],"class_list":["post-12183","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-academia","category-fpga","category-guide","tag-fpga"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/05\/FullSizeRender.jpg","jetpack_sharing_enabled":true,"authors":[{"term_id":4466,"user_id":18,"is_guest":0,"slug":"kaitlyn","display_name":"Kaitlyn Franz","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/9276021eaa44781ce19f364cfca46ada25e1500769cf4803a095a5bae83c912a?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/12183","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\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=12183"}],"version-history":[{"count":2,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/12183\/revisions"}],"predecessor-version":[{"id":29809,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/12183\/revisions\/29809"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/14283"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=12183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=12183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=12183"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=12183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}