Thursday, September 20. 2012Installing Xilinx ISE 14.2 / Vivado 2012.2 on Kubuntu 12.04.1 LTS (64bit)
This is a quick write-up of the steps necessary to install Xilinx ISE 14.2 / Vivado 2012.2 on Kubuntu (Ubuntu) 12.04.1 LTS (64bit). First of all lets be said that Xilinx does not officially support Kubuntu/Ubuntu as Platform. It might work or not but don't blame Xilinx if it doesn't...
First of all extract the Xilinx_ISE_DS_Lin_14.2_P.28xd.3.0.tar and execute xsetup as root. Install everything in the default directory (/opt/Xilinx). This may take a while. When you want to start ISE, Vivado or Vivado_HLS, first execute the command "source /opt/Xilinx/14.2/ISE_DS/settings64.sh" in your shell to set PATH and other environment variables. Note that the PATH set by this command does not include the PATH to docnav (/opt/Xilinx/DocNav/) and viavdo_hls (/opt/Xilinx/Vivado_HLS/2012.2/bin/). This commands still must be called using the full path. I'm not sure why Xilinx decided to not add this directories to the PATH environment variable. Xilinx ISE comes with its own version of some system libraries (like libstdc++). The settings64.sh script adds the directories containing this libraries to the LD_LIBRARY_PATH environment variable. This has the effect that after you have sourced this script in your shell you can't exectue many system commands in this shell anymore. So I recomment working with two shells: One for the Xilinx commands and a 2nd one for the system commands. The tools are using kfmclient, google-chrome and acroread to open web sites and display PDF files. I have neither command on my system and even if I had just calling them would not work as one would have to reset LD_LIBRARY_PATH in order to execute them. So I had to add some wrapper scripts that are calling the appropriate tools with a cleaned-up environment. --- /usr/local/bin/kfmclient --- #!/bin/bash unset LD_LIBRARY_PATH export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" echo "KFMCLIENT: $*" >&2 [ "$1" = openURL ] && chromium-browser "$2" & exit 0 --- /usr/local/bin/google-chrome --- #!/bin/bash unset LD_LIBRARY_PATH export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" chromium-browser "$@" & exit 0 --- /usr/local/bin/acroread --- #!/bin/bash unset LD_LIBRARY_PATH export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" okular "$@" & exit 0 (In case you are wondering: The ISE tools are using kfmclient to open web-pages and the Vivado tools are directly trying to call a web-browser executable. Vivado tries "google-chrome" first, followed by "firefox" and a short list of others.) Of course one can also consider installing such wrapper scripts in one of the Xilinx bin directories. I've decided to install the directly in /usr/local/bin/ for various resons that might not apply to everyone.. In order to get Vivado_HLS running two additional steps are required. First we need to copy crt1.o, crti.o and crtn.o to a place where the gcc that comes with Vivado_HLS can find it: sudo cp /usr/lib/x86_64-linux-gnu/crt[1in].o \ /opt/Xilinx/Vivado_HLS/2012.2/Linux_x86_64/tools/gcc/lib/gcc/ Unfortunately the SystemC C++ code generated by Vivado_HLS suffers from the so-called "c++ static initialization order fiasco" (just google the term if you are not familiar with it). To make it short: The SystemC code generated by Vivado_HLS depends on undefined C++ behavior which leads to strange problems on some platforms while others are not effected (depending on the initialization order of static objects in different compilation units). This is a serious problem and as of this writing I'm in contact with Xilinx support in order to resolve it. Note that this Problem does not effect the generated Verilog and VHDL RTL code. It only effects the SystemC module that is generated for simulation purposes only. I've recorded a short (2:41) screencast in which I demonstrate the problem and a possible solution (i.e. using the "sc_dt::Log_*" enum to initialize static variables instead of using the global "SC_LOGIC_*" objects): http://www.youtube.com/watch?v=HqDpRUFff94 Another work-around is to change one of the SystemC headers so that every compilation unit gets its private version of the SC_LOGIC_* objects, thus resolving the initialization order problem (the initialization order of static objects within a compilation unit is defined in C++): --- Vivado_HLS/2012.2/Linux_x86_64/tools/systemc/include/sysc/datatypes/bit/sc_logic.h +++ Vivado_HLS/2012.2/Linux_x86_64/tools/systemc/include/sysc/datatypes/bit/sc_logic.h @@ -593,10 +593,17 @@ } +#if 0 extern const sc_logic SC_LOGIC_0; extern const sc_logic SC_LOGIC_1; extern const sc_logic SC_LOGIC_Z; extern const sc_logic SC_LOGIC_X; +#else +static const sc_logic SC_LOGIC_0 = Log_0; +static const sc_logic SC_LOGIC_1 = Log_1; +static const sc_logic SC_LOGIC_Z = Log_Z; +static const sc_logic SC_LOGIC_X = Log_X; +#endif // #ifdef SC_DT_DEPRECATED extern const sc_logic sc_logic_0; This is of course the prefered solution if you want to get Vivado_HLS running as it does not require any changes to the generated SystemC modules. It is not a nice final solution. But it makes the whole thing work without somehow automatically patching all generated SystemC modules. I haven't tried the cable drivers (I'm using my own software for JTAG programming) and certainly haven't tried all the tools that are part of Xilinx ISE 14.2 / Vivado 2012.2. But I think I've covered the most important topics in my tests and with the above hacks I have the parts I need for my work running just fine. I hope this write-up is of help for some of my readers. Of course there is no warranty of any kind from my side and Xilinx does not support their software on Kubuntu/Ubuntu either. So don't say you have not been warned.. Comments
Display comments as
(Linear | Threaded)
A zedboard-centric writeup of problems and workarounds under debian sid:
http://www.zedboard.org/content/ise-142-bug-reports
Wow, pretty impressive for a 'quick' write up. How did you figure this all out w/o insider Xilinx know-how? Like knowing the tools were using kfmclient, google-chrome and acroread commands. Or knowing the crt[1in].o files were missing.
Did you have to strace a bunch of executable?
Yes, I used "strace" a lot, especially for the first part.
For the 2nd part (the HLS/SystemC fix) I used the Makefile and C++ files generated by Vivado HLS to reproduce the test on the command line. From this point on it was almost as easy as fixing a bug in an open source software as I had access to all relevant source files (SystemC and files generated by Vivado HLS). The only limitation was that I had to find a solution that works without modifying the auto-generated files, as I could not fix the code generator.
Found this while trying to get Vivado 2014.1 running on Kubuntu 14.04, thought I'd share.
Firstly, I got the 2013.4 "full" installer running ok, but it didn't install properly. There is a work around for the 2014.1 "web install" that worked for me : (see http://www.xilinx.com/support/answers/60088.html) ./Xilinx_Vivado_SDK_2014.1_MMDD_#_Lin64.bin --target cd bash ./xsetup Note that I installed everything under my home directory. Also, if Xilinx SDK crashes on build, you might try this (wait for it) change your gtk2 look and feel to something other than 'oxygen-gtk' - Raleigh appears to work fine. It appears Eclipse (the Xilinx SDK is based on it) can be flaky on (K)ubuntu (See http://stackoverflow.com/questions/14005164/eclipse-adt-bundle-fatal-error-not-able-to-start and https://bugs.kde.org/show_bug.cgi?id=324438) I don't have a JTAG cable yet, so can't say for sure, but everything else appears to be working now. |
Calendar
QuicksearchCategoriesSyndicate This BlogBlog Administration |
||||||||||||||||||||||||||||||||||||||||||

Tracked: Oct 09, 15:00