EDIT: improved the instructions for creating desktop icons.
EDIT: 11/08/21 added some additional steps.
EDIT: 12/08/21 added information for tidying up log files
EDIT: 17/08/21 Updated title to reflect Vitis and Vivado and added info re Vitis and Firefox. Updated information regarding launching Vivado from a desktop icon.
The first session of the Ultra96V2 Workshops occurred earlier in the week and Bryan Fletcher walked through the download and installation of Vivado on Windows 10. The supported version of Windows is over a year old and I don't particularly want to rollback my install to that version nor do I know how to get hold of such an old version of Windows to set up a new VM (plus licensing etc.) Fred Murphy reports it works ok in 21H1 but the upshot of it is that I'm going to use Ubuntu, as there are other things, Linux specific, that I may want to play with later on. The supported version of that is quite old as well, 20.04.1, but is obtainable: http://old-releases.ubuntu.com/releases/20.04.1/
Under Windows 10, installation seems to be pretty simple; under Ubuntu not so much, so I thought I'd document what I ended up doing for posterity. I’ll assume you use Firefox on Ubuntu but any browser should be the same. I'll also assume you have access to the PDF that accompanies the workshop as the main steps are given there and I'm going through deviations here. So, off we go....
Download the web installer for Linux, open a Terminal window and change to the download directory (Firefox will tell you where it downloads to if you click on the downloads button in the menu bar). From terminal, you can check the MD5 sum. In terminal, type: md5Sum Xilinx* (or, md5sum then drag the file from Firefox download to the command line) and press enter. This will give you the MD5 sum which you can check against the number on the Xilinx website. I used the asterisk to avoid typing out the full name.
From Ubuntu Files, find the installer and open its properties, select permissions tab and select Executable.
This is the easier way. Alternatively, in the terminal, in the downloads directory for Xilinx, enter command chmod +x Xilinx* I did it the easy way, I’m assuming that typing Xilinx* will work to save entering the full name. Also, I think you can try pressing tab instead of the asterisk and it will expand the full name, don't know didn't try it. If you don't set it executable, it will try and load the bash script into an editor instead of running.
From terminal enter: sudo Xilinx* to launch the installer.
You can then follow the instructions for installing under windows. If you don’t use sudo to run it, there will be problems in creating the default directory (/tools), but you don’t have to use that directory - I now know what problems occur if you use sudo but I don’t know what problems occur if you don’t use sudo. What I do know is that as it’s the first time I'm using these tools, I don’t want to stray off the tool defaults covered in these workshops. Note that I found that the download size including DocNav is 30.32 and without DocNav, 30.03, slightly larger than installing under Windows 10. Bryan highly recommended installing DocNav if you have the space.
I have an 80Mbps FTTP line at home and whilst I was downloading over a wifi connection to the router, it was a slow process at around 4MB/sec - 1hr 38mins to download and 51 minutes to install. Grab a coffee or 10; perhaps take the partner out for a bite to eat.
After installation, this pops up:
A non-expandable window! Hmmm…. From the little I can see, I don’t know enough yet to determine if we need those updates. No doubt we can find out in the upcoming sessions. We're definitely using the ML Edition though.
Installing on Ubuntu, at least using sudo, didn’t seem to do everything necessary. I don’t know if this is specifically an issue with using sudo or not, but here’s what to do next.
libtinfo.so.5 is a dependency and it isn’t installed by Xilinx. Check if you have it already: from a command line enter whereis libtinfo.so.5 and if it exists it will tell you where, and all is good. Otherwise you will need to install it. From a terminal window: sudo apt install libtinfo5
We need to source settings64.sh to set up the environment before running Vivado. From your home directory (cd ~) enter nano .bashrc and at the bottom add this line
source /tools/Xilinx/Vivado/2021.1/settings64.sh
^O ^X to write out and exit. This will ensure that Vivado will run ok every time you open a terminal window.
Now restart terminal and enter command: vivado. You should see some messages, a short delay and then the Vivado UI will appear. Yay!
You can run Vivado from the command line now without problem, but you may prefer a desktop icon and installing under sudo didn’t create such a thing. So, from terminal enter command:
nano ~/desktop/vivado.desktop and add the following:
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=/tools/Xilinx/Vivado/2021.1/doc/images/vivado_logo.ico
Name[en_US]=Vivado 2021.1
Exec=/tools/Xilinx/Vivado/2021.1/bin/vivado
Name=Vivado 2021.1
This assume you installed it to the default directory /tools. If you didn't, then adjust the paths accordingly.
^O ^X to write out and exit
sudo cp -a /root/Desktop/. ~/Desktop/
sudo chown -R user:user ~/Desktop
user is your username.
Then, right click the icon on the desktop, properties, make it executable as we did for the installer. Right click again, and "Allow Launching". Double clicking on the desktop icon will now launch Vivado BUT it still takes time and it doesn’t look like anything is happening - no spinner etc. Be patient, otherwise you’ll find yourself with multiple copies launched!
The following problem is probably related to my from-fresh install of Ubuntu.
Vivado Store doesn’t seem to work properly - when refreshing the catalog, the store shows nothing, and trying to relaunch it fails. Open up the Tcl Console at the bottom of Vivado and from the errors it would appear that it can’t pull info from Github over https. Git isn’t installed on my system. I also had to install curl (curl —help to see if you have it) and curl-devel (actually, not too sure of this package but I did it anyway)
sudo apt install curl
sudo apt install curl-devel
sudo apt install git
After that, reloading the store and refreshing the catalogue produced no errors in the Tcl console and everything proceeded as per the workshop instructions in the PDF.
I’m not sure it should be this difficult, in particular creating desktop icons. I’m no Linux expert by any means but seriously, it’s 2021 not 1990!
I’m half tempted to start from scratch and see how installing it without using sudo goes but having got this far I’m rather hoping someone will comment below instead. Also, where/if I’ve messed up here or been less than efficient, please do say for the benefit of myself and others.
-------------------------------
Edit 11/08/2021
After working through a simple hello world to check the installation, the following steps are also needed. Some of these came from the document linked to by Bryan Fletcher in the comments below and I've marked these with a * for attribution. Whilst not everything in that document worked for me, it's still a useful read and sanity check.
My fresh install had no serial terminal:
*Add user to dial out user group: sudo user mod -a -G dialout $USER
*Install gtkterm: sudo apt install gtkterm
Then, using Files, copy /usr/share/applications/gtkterm.desktop and paste on desktop. Right click, properties and select “allow execution”. Then right click the desktop icon and select “allow launching”. This will launch it in a default setup. To change this, on the desktop right click and “open terminal here” then use nano to change the execution command:
nano gtkterm.destktop
…
Name=Ultra97-v2 Serial Connection
Exec=gtkterm -p /dev/ttyUSB2 -s 115200
…
^O ^X to save and exit.
Change the French to English if you like; You could change the name to something specific as shown. On my system the Ultra96-v2 connects as ttyUSB2 but you should use the device name appropriate to your system: ls /dev/ttyUSB*.
NOTE: I have found that having gtkterm open at the same time as debugging through Vitis fails to launch the debug session, because Vitis cannot connect over the JTAG connection. In the debug perspective, Vitis Serial Terminal tab, you add a serial connection to /dev/ttyUSB2 in order to see output so gtkterm can be avoided for simple debugging. Currently, I’m new to all this so there may be a way to resolve this that I’m still working on - as we progress through the Summer of FPGA sessions, this may be clearer.
*Install the cable drivers - this seems to be done automatically on Windows but not on Linux:
cd /tools/Xilinx/Vivado/2021.1/data/xicom/cable_drivers/lin64/install_script/install_drivers/
sudo ./install_drivers
*Install packages required by the Xilinx Run Time (XRT). Some of these may already be on your system.
sudo apt --yes install make g++ ocl-icd-libopencl1 opencl-headers ocl-icd-opencl-dev python3 libgmp-dev
*update permission for JRE:
sudo chmod -R o=g /tools/Xilinx/Vitis/2021.1/tps/lnx64/jre11.0.2
sudo chmod -R o=g /tools/Xilinx/Vivado/2021.1/tps/lnx64/jre11.0.2
sudo chmod -R o=g /tools/Xilinx/.xinstall/Vitis_2021.1/tps/lnx64/jre11.0.2
With all the above steps I have managed to get a simple bare metal Hello World program working with serial output in Vitis.
-------------------------------
Edit 12/08/2021
I've noticed that Vivado will create log and journal files in my home directory and each time it starts it creates a backup of the previous ones. It's a bit of a mess. I have already decided that my projects will be created in ~\xilinx\projects\ so I created a directory to hold these log and journal files: ~\xilinx\logs\ To use this directory depends on how you start Vivado, by default they are created in the directory you start vivado from. If you start from a command line, you should:
cd ~\xilinx\logs
vivado
or
vivado -journal xilinx/logs -log xilinx/logs
I use the desktop icon however, so from a terminal:
cd ~\Desktop
nano Vivado [then press tab to get the rest of the name. You want to edit the Vivado .desktop file]
...
exec = /tools/Xilinx/Vivado/2021.1/bin/vivado -journal xilinx/logs/vivado.jou -log xilinx/logs/vivado.log
...
^O ^X (assumes your vivado application is in the tools directory, amend as necessary.)
Alternatively, use these lines in the desktop file, which sets the working directory similar to the change of directory when launching from the command line:
...
Path = /home/andrewjohnson/xilinx/logs/
exec = /tools/Xilinx/Vivado/2021.1/bin/vivado
...
The path must be correct and the filename must be given;doesn't have to be vivado.jou or vivado.log, just valid filenames, otherwise no journal or log will be created (so it seems.) You might think that you'd want to use ~/xilinx/logs/vivado.jou but you'd be wrong: Vivado expands this path to include the home directory in front thus: /home/andrewjohnson/xilinx/logs/vivado.jou. If you use the tilde, it will then be /home/andrewjohnson/~/xilinx/logs/vivado.jou, thus invalid and no journal or log file.
When I had an invalid path in this command, I noticed that the tcl console when Vivado launched has a bunch of comments amongst which it stated where the log/journal was being written; with a valid path these comments didn't appear. It might be a clue if you find that no log/journal is being created.
Vitis doesn't appear to use journals and logs but it does create a *.str and a xrc.log file in the home directory. I can't work out how to shift those as setting a working directory in the icon file doesn't impact the location.
-------------------------------
Edit 17/08/2021
Ubuntu installs Firefox as its default browser. In Vitis, it is possible to click on document links and have that document display in a browser window. However, to use Firefox and Vitis together requires the installation of libwebkitgtk2 and V4, the version easily available, doesn't support opening a browser so you end up a bit stuck. The easiest solution is to install Google Chrome and configure that in Vitis: Window>Preferences>General>Web Browser.
Top Comments