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..
Tracked: Oct 09, 15:00