User Tools


Using Vivado During Spring 2020

You will use the Xilinx Vivado design software to design digital circuits and then test those designs on the circuit board. This is a very large, commercial software package that is being provided free of charge for your use. Options for using this to complete the labs include the following (sorted from most preferable to least preferable).


Option #1: Install Vivado On Your Own Machine

You will go to the Xilinx website and download and install a copy of Vivado to run. This is ONLY available if you are running Windows. If you have a Mac you must do Option #2.

PROS:

  • No virtual machine involved so simple in that respect.
  • Your usage will represent the most common way the Xilinx software is run.

CONS:

  • If your installation has issues the TA's and professors may or may not be able to help debug them (but there shouldn't be any).
  • Takes a couple of hours to set up.
  • Will take up 20+ GB of disk space on your machine.

Instructions:

Xilinx provides a “free” version of the Vivado tools for student use called “WebPack”. This is a limited version of the tool that only works with a few of the FPGAs that Xilinx manufactures. Fortunately, it supports the FPGA we are using for our class. If you have access to a computer/laptop with plenty of hard drive space (the compressed image is about 10 GB and expands to about 25 GB) and a decent processor, you may want to pursue this route. Make sure you download version 2019.1(but if mistakenly you get 2019.2 like some have, it should not really matter).

  1. Click Support, then Downloads and Licensing, then 2019.1 on the left side of the screen.
  2. Scroll down and find “Vivado Design Suite - HLx Editions - 2019.1 Full Product Installation” and then below it find “Vivado HLx 2019.1: WebPACK and Editions - Windows Self Extracting Web Installer (EXE - 64.62 MB)”. There are lots of versions, find this one.
  3. Click on it.
  4. This will then require you to create an account at Xilinx in order to download. You can use BYU's address for your address if you want (EB450, Dept of Electrical and Computer Engineering, Brigham Young University, Provo, UT 84602). If it asks for your research you can fust put “digital design”. Once you have an account it will ask you to log in again and you will likely have to re-navigate to the download button. Then, click Download.
  5. By the way, you will need your Xilinx login and password later in the install process so keep it handy.
  6. Double-click the downloaded file (it should be 64MB in size).
  7. When prompted, be sure to select “Vivado HL WebPACK version”. The defaults for the most part are OK for the rest. As shown here, you can minimize the install size by deselecting a number of things (like SDK, Ultrascale, and Ultrascale+ devices). Also, be SURE that the box for installing cable drivers is selected.

That should do it.


Option #2: Run Xilinx Software on Lab Machines But Program Locally Using Adept2 (Windows)

You will use the “LabConnect” software from the college to run Vivado on the lab machines. You will then install Digilent Adept 2, a smaller piece of software, on your machine to control the circuit board. Like option #1, it is ONLY available if you have Windows. If you have a Mac you must do Option #2.

PROS:

  • Nothing big for you to install on your machine (a much smaller install). Saves local disk space.

CONS:

  • At the mercy of good internet connectivity to get work done.
  • Lab machines are not the fastest out there.
  • Every time you go to do something with the board you will have to copy the .bit file you have created on the lab machine up to your local machine to program the board with it.

Instructions:

  1. Follow the instructions there in the section titled “LabConnect” (CAEDM is changing its website as things evolve so you may see slightly different things).
  2. Scroll down and click “Download Here”
  3. Under “System - Latest Downloads”, click “Windows - v2.20.1”
  4. Fill out the form with first and last name, email, etc. and click “Submit”
  5. This should begin the download (21.7 MB)
  6. Run the installer, when prompted, the defaults for the most part are OK
  7. Once you have the application running, you should be able to plug in your FPGA and it will automatically connect.

You will then use LabConnect to run the Vivado design tools. Once you have a design completed you will have to copy the circuit configuration file (.bit) from the lab computers to your local machine and then use the Digilent Adept 2 sofware you just downloaded above to actually program the circuit board to test your circuits.

Connecting to a Board with Adept

Run the Adept you just installed to conect to the board.

The first time you run Adept, Windows might take a while trying to update the Digilent drivers. In my testing on a Win7 machine (old) I figured it would never finish so I told it to cancel. It installed the standard drivers and everything worked just fine.

When you fire up Adept, if the board is plugged in and powered on, it should auto-detect as shown in the figure below. The 220 lab boards have xc7a100t FPGA devices on them and so the figure below shows this has been detected by the software. This shows that it is ready to program the board and you are ready to go. Any time the tutorials in the lab tell you to run the Xilinx Hardware Manager, you should run Adept on your local computer instead.


Option #3: Run Xilinx Software on Lab Machines But Program Locally Using openocd (Mac or Linux)

If you have problems with Options #2 or #5 you can use this one. It is a hybrid of #2 and #3 and requires a much smaller download (has the same pros and cons as Option #2).

This assumes you will use LabConnect as in Option #2. CAEDM does have a LabConnect option to allow you to work on the BYU lab machines - follow the instructions above but do the Mac version of the install. Most everything else is similar. Once you have LabConnect installed you will be able to do Vivado designs on a lab machine in the department.

The problem is that once you finish your design, you need a way to get the .bit file onto your local machine to program the board you have. The following instructions show how to set up that step.

Now, follow the instructions at: https://github.com/byu-cpe/BYU-Computing-Tutorials/wiki/Program-7-Series-FPGA-from-a-Mac-or-Linux-Without-Xilinx. It will show you how you can program the board directly from your Mac (or any other machine that will run 'openocd'.


Option #4: Run Xilinx Software on Lab Machines But Program Locally Using A Linux VM and Vivado_Labs (Mac)

This uses LabConnect like Options #2 and #3 but then uses a Linux Virtual Machine containing a stub of Vivado called 'Vivado_Labs' to actually program the board. You would only use this if Option #3 fails for you. It requires a much larger download and is much more complex than above.

This assumes you will use LabConnect as in Options #2 and #3. Follow the instructions in Option #2 above but do the Mac version of the install. Most everything else is similar. Once you have LabConnect installed you will be able to do Vivado designs on a lab machine in the department.

The problem is that once you finish your design, you need a way to get the .bit file onto your local machine to program the board you have. The following instructions show how to set up that step.

  1. Download a small virtual machine from Box with this link. You only want the files whose name starts with “Ubuntu” - there are 3.
  2. As in Option #2 above, install VMWare and import what you downloaded into VMWare. Here is a video. (Hit the back button to return after you have watched it).
  3. Once the VM boots, you need to run vivado_lab - that is the tool to actually program the board. Here is a video of that.
  4. Later, you may need to be able to transfer things from your Mac to your Linux VM (like bitstreams if you upload them to your Mac). To do so, here is a video on that.

Option #5: Vivado on a Linux Virtual Machine

Using the VMWare software, you will boot and run a copy of the Linux operating system on your own computer. You can run this on either a Windows machine or a Mac, but the main use for this is if you have a Mac.

PROS:

  • You will be using a “standard” setup, created by the department. If there are problems with your use of it, the TA's and professors should be able to help debug.
  • You need not download and install the Xilinx software - it is already installed inside the virtual machine for you.
  • You will learn some Linux which is an important skill to learn in your studies.

CONS:

  • It can be a bit resource-intensive (you are running Linux and your own computer's operating systems at the same time).
  • There is an extra layer of complexity with this operating- system-inside-an-operating-system. Having the virtual machine involved may require extra attention to some details to keep it working.
  • Will take up > 70 GB of disk space on your machine during the install. Once it is installed then it takes up about half that (after you delete the intermediate files).

Before you start be aware that you need to have sufficient RAM as well. I have 16 GB on my machine and 12 CPU cores. I give 8GB RAM and 6 cores and it runs well. What you only gave it 4GB? Don't know for sure but I believe students have been OK with that.

Instructions

There are 2 sets of instructions below which you need to choose between. Which one to use will depend on how confident you are that your internet connection can download a 25GB file without dropping the connection…

Safer Instructions But More Steps (use if your internet connection sometimes drops connections)

Before you proceed, read the entire set of instructions including the Additional Notes below. This will help you get it right the first time.

  1. Ensure you can log into box.byu.edu.
  2. Follow this link which is a Box directory and which and which looks like this. Download all the files there into a directory on your machine. There will be 13 files. It was broken into that many files so that if your transfer gets interrupted by an Internet problem, you won't have lost 3 hours of downloading, just a few minutes. Files .z01 through .z12 should be 2GB in size and the .zip file should be 352MB in size.
  3. You may download them one at a time or you may select a few to do at once. Just be aware if you do the latter, the system will ZIP them together and you will need to unzip those to get back to the 13 files you need.
  4. Once you have those files all together in a directory on your machine, you will need to combine them and then unzip them. How you do this will depend on what machine you are on.
    • On a Mac, I have had good results with Keka. After downloading it, then right-click the .z01 file and select Services→Extract Using Keka as shown here.
    • On Windows, download and install 7 Zip. If you then right-click the top zip file, there is an option for 7 zip and then you choose extract all.
  5. What you will be left with on your machine should be a directory called Student_Ubuntu16.04.6_Xilinx-2017.2 with 3 files in it: Student_Ubuntu18.04.2_Xilinx-2019.1-disk1.vmdk, Student_Ubuntu18.04.2_Xilinx-2019.1.mf, and Student_Ubuntu18.04.2_Xilinx-2019.1.ovf. Those are what you want.
  6. Now, install a copy of VMWare
  7. Using the Vmware you just installed, import the file you downloaded in Steps 1-3. You do this by going to the File menu, then click Open. This will create a virtual machine. Tell VMWare to save it in a good place (like in your home directory).
  8. You log into the resulting virtual machine using the username student, with the password fpga. At this point you are running a full-blown Linux system, the Ubuntu18.04.2 distribution to be precise.
  9. If you are worried about disk space you can now safely delete all the zip files and pieces you downloaded. Or, you could keep them for a while if you think you might have to re-do this in the future.

Congrats! You made it.

Additonal Notes on the Steps Above:

  • If you download the pieces one at a time then you won't lose as much work if the transfer dies due to an internet problem. If you have good internet you may want to download the entire directory before you go to bed.
    • Or, you may want to experiment - I found that if I select more than one file at a time to download, then Box will make a zip file to combine them into. If it does this you will have to uncombine them before you can continue above.
    • At any rate, what is needed is all the original pieces in one directory by themselves.
  • It was mentioned above that after you have all the pieces in a directory by themselves, that your method may combine the zip parts together and unzip them into the 3 files you need for VMWare in one step. That is ideal. Once you have the imported machine you can delete all the files you downloaded.
    • However, your method may combine the zip file parts you downloaded into one big zip file, which you then have to unzip in a second step to get the 3 files needed. If that is the case, you may run out of disk space.
    • If this is the case with your machine, you may delete all the parts files once you have a single big zip file to save space.
    • Just be CAREFUL - if the resulting big zip file has a problem but you have deleted the parts, you may have to download the parts again. So, if you don't have sufficient disk space, you may choose to use an external disk to hold the parts, for example, so you don't run out of space.

Alternative Instructions With Fewer Steps (use if you are not worried about dropped connections)

If you have good internet connectivity and are not worried about one huge download never completing without error, the steps below are easier than above:

  1. Ensure you can log into box.byu.edu.
  2. Follow this link which is a Box directory. Download the 3 files there into a directory on your machine. Two of them are small, one is >20GB in size. They should be: Student_Ubuntu18.04.2_Xilinx-2019.1-disk1.vmdk, Student_Ubuntu18.04.2_Xilinx-2019.1.mf, and Student_Ubuntu18.04.2_Xilinx-2019.1.ovf. Those are what you want.
  3. Now, install a copy of VMWare
  4. Using the VMWare you just installed, import the files you downloaded in Steps 1-3 (the .ovf file is what VMWare is looking for). You do this by going to the File menu, then click Open. This will create a virtual machine. Tell VMWare to save it in a safe place (like in your home directory ).
  5. You log into the resulting virtual machine using the username student, with the password fpga. At this point you are running Linux, the Ubuntu18.04.2 distribution to be precise.
  6. If you are worried about disk space you can now safely delete all the zip files and pieces you downloaded. Or, you could keep them for a while if you think you might have to re-do this in the future.

.


How To Choose:

If you have a Mac, you must do #2. If you have Windows you can do any of #1, #2, #3. I can see benefits with each of them.

  • If you don't want to have to learn Linux then Option #1 is the cleanest since you are running locally (but it takes a lot of disk space).
  • If you want a “canned” solution and are willing (or want) to learn some Linux then Option #2 would be good.
  • If you don't have a big enough machine at home or you want to minimize the bother of Linux (at the expense of requiring an internet connection at all times while you work), you should choose #3.