Nexys Video Programming Guide
Overview
There are four ways you can program the Nexys Video:
-
JTAG
-
Quad SPI Flash
-
USB Flash Drive
-
Micro SD Card
This tutorial will walk you through what you need to know to get started on your projects and program your Nexys Video FPGA board using each of the three possible methods. It is recommended that you first complete the “Getting Started with Vivado” guide before continuing with this project.
Prerequisites
技能
-
Basic familiarity with Vivado
-
可以通过浏览我们的“ Vivado入门”指南来找到这种体验
-
Hardware
-
Nexys Video FPGA board
-
Micro-USB cable
-
Micro SD card
Software
-
Vivado Design Suite 2015.1
-
Newer/older versions can be used, but the procedure may vary slightly
-
Board Support Files
-
Nexys Video Support Files
-
These files will describeGPIOinterfaces on your board and make it easier to select your FPGA board and addGPIOIP blocks.
-
Follow the Wiki guide:Vivado Board Files for Digilent 7-Series FPGA Boardson how to install Board Support Files for Vivado.
-
Downloads
Source Files -ZIP
Tutorial
1.创建项目
First we will need to create a project.
1.1) Open up Vivado and clickCreate New Projectto open Vivado's New Project wizard.
1.3) We will be building this project from the ground up and adding our own sources so we will want to create an RTL project. selectRTL Projectand clickNext.
1.4) In this window, you can select any source files or directories that you'll want to use in your projects. We can also select which language we'll be programming in. For this project just keep the default settings. We'll be importing the pre-built Verilog files into our project so click the'+'在窗口的中心登录,然后导航到以前保存的源文件的位置,选择sw_led.vand click好的. After selecting your source a series of check boxes should become active. Check markCopy sources into project. If you do not check this box, Vivado will not create separate copies of your sources and place them within your project directory. Instead Vivado will read/modify directly from the source. ClickNext接着说。
1.5)此窗口可让您选择现有的IP(知识属性)内核,但是对于本教程,不需要IP。点击Next.
1.7)此时Vivado将打开一个part selection window. Select theBoardstab highlighted in orange below. If you installed the board files correctly, you should see a list of Digilent boards. Select theNexys Videoand clickNext, then结束.
This will create your project and bring you to the Vivado project manager. You will see the files that you imported earlier in theSources盒子。
You have now successfully imported you program files and configured your project to properly communicate with the Nexys Video.
2. Creating Program File
For the four ways to program your Nexys Video FPGA there are two file types available; .bit and .bin files. Using a .bit file we can use either the JTAG programming cable, or a standard USB storage device to load the bit file into the FPGA. Programming with a .bin file will use the QuadSPI to program the FPGA each time it is powered on. This means you will not have to reprogram it each time via a micro USB cable or by a thumb drive. The following steps bellow will get you all prepared to program your Nexys Video.
2.10) Vivado will begin generating your bit and bin files. When completed Vivado might display aBitstream Generation Completed盒子。Feel free to selectOpen Implemented Design, orView Reportsbut you can also just取消继续进行指南。
At this point you have successfully created a .bit and .bin file that are ready to program the Nexys Video. As said previously there are three ways to program the Nexys Video FPGA board, and we will be walking through each one of them below.
3. Programming the Nexys Video using JTAG
JTAG is primarily used as a programming, debugging, and probing port and communicates through the micro-USB port. This makes interfacing with the Nexys Video easy because the micro-USB connection has the ability to program it.
This will program your Nexys Video through the JTAG connector. Once the programming window is closed go ahead and test out your board. Each slide switch at the bottom of your board should now toggle its respective引领on and off.
4. Programming the Nexys Video using a USB Flash drive or Micro SD Card
It is important to note that the USB device or Micro SD Card that you select to program the Nexys Video must be formatted in Fat32. Other than that your device doesn't have to be empty and can contain other files and folders. At this point Vivado is no longer needed to program the FPGA, so you can minimize your project and follow these steps in File Explorer:
4.1) Make sure the jumper on JP4 is in the USB/SD position. Put JP3 in either the USB or Micro SD position depending on what you are using.
4.2) Plug your USB flash device or Micro SD Card into your computer.
4.3) Open File Explorer and navigate to the root folder of your Vivado project.
4.4) From root go to root→Project_name.runs→impl_1 and copy the .bit file.
4.5) Go to the root of your USB device or Micro SD Card and paste the .bit file. The Nexys Video on startup will only look through the USB's root for a file with a .bit extension so it is important that the only .bit file in root is the one that you want to be used to program the Nexys Video.
4.6) Safely remove the USB device or Micro SD Card from your computer and plug it into the USB port on the Nexys Video.
4.7) Make sure your board is connected to your computer for power and turn on the Nexys Video. It should immediately begin writing the .bit file to the FPGA.
Once finished your board should function exactly as it did when programming it with JTAG. Whether you were aware or not you just successfully programmed your Nexys Video board two separate ways using the same .bit file.
5. Programming the Nexys Video using Quad SPI
Quad SPI Flash is a non-volatile memory that the Nexys Video's FPGA chip looks at on every startup. If Quad SPI is flashed then the FPGA will program itself with the contents found in Quad SPI's flash memory. This method of programming your board is great when you have a final project that you would like to demo or display that doesn't need to be edited and therefore reprogrammed.
5.1) Make sure the jumper on JP1 is in the QSPI position
Vivado will now erase the old configuration file, and reprogram your Nexys Video with the demo file. From now on, when you power up the Nexys Video, the demo will load at startup until you reprogram it.