Difference between revisions of "Xilinx ISE WebPACK"

From ArchWiki
Jump to: navigation, search
(Digilent USB-JTAG Drivers: Update dead external links to digilent downloads)
 
(43 intermediate revisions by 21 users not shown)
Line 1: Line 1:
 
[[Category:Development]]
 
[[Category:Development]]
 
[[Category:Mathematics and science]]
 
[[Category:Mathematics and science]]
 +
[[ja:Xilinx ISE WebPACK]]
 +
{{Style|See in particular [[Help:Style#Command line text]].}}
 +
 
The Xilinx ISE WebPACK is a complete FPGA/CPLD programmable logic design suite providing:
 
The Xilinx ISE WebPACK is a complete FPGA/CPLD programmable logic design suite providing:
* specification of programmable logic, via schematic capture or verilog/VHDL
+
* Specification of programmable logic via schematic capture or Verilog/VHDL
* synthesis and fit of specified logic into Xilinx CoolRunner and Spartan devices
+
* Synthesis and Place & Route of specified logic for various Xilinx FPGAs and CPLDs
* behavioral and post-fit simulation  
+
* Functional (Behavioral) and Timing (post-Place & Route) simulation
* download of configuration into target device via communications cable
+
* Download of configuration data into target device via communications cable
* support for Linux based development system host
+
  
 
While Arch Linux is not one of the officially supported distributions, many features are known to work on Arch Linux.
 
While Arch Linux is not one of the officially supported distributions, many features are known to work on Arch Linux.
 +
 +
== Prerequisites ==
 +
 +
=== Dependencies ===
 +
If you plan to develop software for an embedded ARM core (e.g. for Xilinx Zynq SoC devices), you will want to install the GCC cross-compiler bundled included with the Xilinx Embedded Development Kit (EDK). This compiler requires the {{Pkg|glibc}} and {{Pkg|ncurses}} packages. For i686 installations, these will most likely be already present.
 +
 +
If you are on a 64-bit Arch installation, you need to install {{Pkg|lib32-glibc}} from the [[multilib]] repository. Since the {{Pkg|lib32-ncurses}} is now version 6, the [https://gist.githubusercontent.com/strayArch/cbfbb87a4d0f41f8c5ba/raw/fa063cee8c28e4174e81c670204b18b110337505/ncurses5-PKGBUILD ncurses pkgbuild] must be installed manually --- {{ic|makepkg -s}} and {{ic|pacman -U *xz}}. {{Note| the required gpg can be fetched via {{ic|gpg --keyserver http://pgp.mit.edu/ --search 0x702353e0f7e48edb}}}}
 +
 +
=== Default Shell ===
 +
During the installation, the Mentor CodeSourcery toolchains for embedded processors can be installed along with the Xilinx tools. This installation silently fails when the default shell is set to "dash". Make sure {{ic|/usr/bin/sh}} points to {{ic|/usr/bin/bash}}.
 +
 +
This can be checked by running this command:
 +
$ ls -l /usr/bin/sh
 +
 +
If the output looks like this:
 +
{{ic|lrwxrwxrwx 1 root root 15 13 Mar 06:47 /usr/bin/sh -> bash}}
 +
then {{ic|/usr/bin/sh}} already points to {{ic|/usr/bin/bash}} (the default in Arch Linux).
 +
 +
If not, run the following commands as root:
 +
$ rm /usr/bin/sh
 +
$ ln -s bash /usr/bin/sh
  
 
== Installation ==
 
== Installation ==
{{Note|The installation is last known to work with Linux kernel 3.1.4 and Xilinx ISE 13.3.}}
+
{{Note|The installation is last known to work with Xilinx ISE 14.7, requiring the dynamic library fix described below.}}
  
The ISE WebPACK Linux version can be downloaded from [http://www.xilinx.com/support/download/index.htm the official download page]. It requires registration and licensing agreement, but there is no charge, i.e. it's free as in "free beer", but not free as in "free speech".
+
The ISE Design Tools can be downloaded from [http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools.html the official download page]. It requires registration and licensing agreement, but there is no charge, i.e. it's free as in "free beer", but not free as in "free speech".
  
Once the tarball is downloaded, unpack it and run the installer:
+
Once the tarballs has been downloaded, unpack it:
  $ tar xf Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0.tar
+
  $ tar -xvf Xilinx_ISE_DS_Lin_14.7_1015_1.tar
  $ cd Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0
+
 
 +
The ISE design tools installer is a Qt application. If you are running the KDE desktop environment, the installer may try to load the "Oxygen" widget theme, which will fail due to the older Qt framework bundled with the Xilinx ISE design tools. You need to remove the {{ic|QT_PLUGIN_PATH}} environment variable before executing the installer:
 +
$ unset QT_PLUGIN_PATH
 +
 
 +
Then, install the ISE Design Tools:
 +
  $ cd Xilinx_ISE_DS_Lin_14.7_1015_1
 
  $ ./xsetup
 
  $ ./xsetup
  
Then, follow the instructions to install the ISE. By default, the whole application is installed to {{ic|/opt/Xilinx/}}, so make sure the user running the installer has permissions to write to this directory.
+
Follow the instructions to install the ISE. By default, the whole application is installed to {{ic|/opt/Xilinx/}}, so make sure the user running the installer has permissions to write to this directory.
 +
 
 +
During installation, uncheck the "Install Cable Drivers" option. Leaving it checked will cause errors during the installation.
 +
 
 +
=== Launching the ISE design tools ===
 +
The ISE design tools include a shell script that modifies the environment variables (mostly PATH and LD_LIBRARY_PATH). This script must be sourced before starting the ISE tools:
 +
$ source /opt/Xilinx/14.7/ISE_DS/settings64.sh
 +
or, for a 32-bit installation:
 +
$ source /opt/Xilinx/14.7/ISE_DS/settings32.sh
 +
 
 +
Then, the ISE design tools will be found in your PATH and can be started by typing their name in the terminal (e.g. {{ic|ise}}, {{ic|planAhead}}, {{ic|xsdk}}, ...)
 +
 
 +
==== Launching via desktop icons ====
 +
You can also create files at /usr/share/applications/
 +
 
 +
ise.desktop:
 +
#!/usr/bin/env xdg-open
 +
[Desktop Entry]
 +
Version=1.0
 +
Type=Application
 +
Name=Xilinx ISE
 +
Exec=sh -c "unset LANG && unset QT_PLUGIN_PATH && source /opt/Xilinx/14.7/ISE_DS/settings64.sh && ise"
 +
Icon=/opt/Xilinx/14.7/ISE_DS/ISE/data/images/pn-ise.png
 +
Categories=Development;
 +
Comment=Xilinx ISE
 +
StartupWMClass=_pn
 +
 
 +
After that you can copy this files to Desktop folder on your home and launch ISE tools from desktop
  
After installation, the ISE can be launched from {{ic|/opt/Xilinx/13.3/ISE_DS/ISE/bin/lin/ise}}. Design capture, synthesis and simulation features should work out-of-box.
+
=== License Installation ===
 +
After requesting a WebPACK license from Xilinx using their [http://www.xilinx.com/getlicense/ Licensing Site], you will be e-mailed a license file. This file can be imported with the Xilinx License Manager (run {{ic|xlcm -manage}} from the terminal).
  
== Troubleshooting ==
+
Another way to import the license is to simply copy it to the {{ic|~/.Xilinx}} or {{ic|/opt/Xilinx/14.7/ISE_DS/ISE/coregen/core_licenses}} directory.
However once I reached the point of trying to download a design to a target device I ran into some trouble. Installing the cable drivers for talking to the target interface cable yielded errors.
+
  
I downloaded the standalone driver installation utility from: ftp://ftp.xilinx.com/pub/utilities/fpga/install_drivers.tar.gz
+
=== Node-Locked Licenses ===
 +
Arch Linux by default uses systemd's [[Network configuration#Device_names|Predictable Network Interface Names]]. This means that your system will most likely not have its network interfaces named "eth0", "eth1" and so forth.
  
This download yields a file named install_drivers.tar.gz
+
However, the Xilinx License Manager looks for these names to find out the system's MAC addresses, which are used for node-locked licenses. If you require node-locked licenses, unfortunately you have to disable this feature to re-gain the kernel naming scheme for network interfaces and fix the name of NIC that you obtained your license.
 +
The code below will be your help:
  
  $ tar xzf install_drivers.tar.gz
+
  # echo 'SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="eth1"' > /etc/udev/rules.d/10-net-naming.rules
yields a directory named install_drivers/. When I attempted to build the drivers from this file I encountered the following errors:
+
'''linux_wrappers.c:48:31: error: linux/ioctl32.h: No such file or directory'''
+
and
+
'''linux_wrappers.c:1398: error: ‘struct scatterlist’ has no member named ‘page’'''
+
  
Reading in the Gentoo HOWTO's listed above led me to download the latest Jungo source code, which is the core of the Xilinix linux USB support. I modified the link after reading that the latest Jungo driver was 9.20. I got WinDriver 9.20 from: http://www.jungo.com/st/download/WD920LN.tgz
+
For more specific, refer to the page [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames systemd wiki] describes how to work and what you have other(formal) ways.
  
$ tar xzf WD920LN.tgz
+
== Post-Installation Fixes and Tweaks ==
yields a directory named WinDriver/ Within this directory you'll find:
+
After installation, a few manual fixes are required to work around problems caused by running the Xilinx tools on a Linux distribution that is not officially supported by Xilinx. Some of these fixes are taken from [http://zedboard.org/content/ise-142-bug-reports this forum post.]
$ ls WinDriver/redist/  
+
configure*      linux_wrappers.c  makefile.in      wdreg*            wdusb_linux.c    windrvr_gcc_v3.a
+
linux_common.h  linux_wrappers.h  setup_inst_dir*  wdusb_interface.h  windrvr_gcc_v2.a  windrvr_gcc_v3_regparm.a
+
  
These are the same core files also found in:
+
=== Dynamic Library Fix (libstdc++.so) ===
  $ ls install_drivers/linux_drivers/windriver32/windrvr/
+
The ISE tools supply an outdated version of the libstdc++.so library, which may cause segfaults when using the Xilinx Microprocessor Debugger and prevents the usage of the oxygen-gtk theme. This outdated version is located in two directories within the installation tree: {{ic|/opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/}} and {{ic|/opt/Xilinx/14.7/ISE_DS/common/lib/lin64}}. To use Arch's newer version of libstdc++, rename or delete the original files and replace them with symlinks:
  config.cache    LINUX.2.6.24-ARCH.i386/ makefile        wdusb_interface.h  windrvr_gcc_v3_regparm.a
+
  cd /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/
config.log      linux_common.h          makefile.in      wdusb_linux.c
+
  mv libstdc++.so libstdc++.so-orig
  config.status* linux_wrappers.c        setup_inst_dir*  windrvr_gcc_v2.a
+
mv libstdc++.so.6 libstdc++.so.6-orig
  configure*      linux_wrappers.h        wdreg*          windrvr_gcc_v3.a
+
  mv libstdc++.so.6.0.8 libstdc++.so.6.0.8-orig
 +
  ln -s /usr/lib/libstdc++.so
 +
  ln -s libstdc++.so libstdc++.so.6
 +
  ln -s libstdc++.so libstdc++.so.6.0.8
  
So I copied the 9.20 WinDriver files over those found in the install_drivers/ subdirectory:
+
Then, repeat this process in the {{ic|/opt/Xilinx/14.7/ISE_DS/common/lib/lin64}} directory.
$ cp -p WinDriver/redist/* install_drivers/linux_drivers/windriver32/windrvr/
+
  
This update to the Jungo driver eliminated the error: linux/ioctl32.h: No such file or directory, but the error: ‘struct scatterlist’ has no member named ‘page’ was still persisting.
+
=== Digilent USB-JTAG Drivers ===
 +
To use Digilent Adept USB-JTAG adapters (e.g. the onboard JTAG adapter on the [http://www.zedboard.org ZedBoard]) from within the Xilinx design tools, you need to install the Digilent [http://store.digilentinc.com/digilent-adept-2-download-only/ Adept Runtime] and [http://store.digilentinc.com/digilent-plugin-for-xilinx-tools-download-only/ Plugin].  
  
After research regarding changes to scatterlist.h lead to these discussions: http://kerneltrap.org/Linux/SG_Chaining_Merged
+
Make sure you have installed {{AUR|fxload}}  from the [[Arch User Repository]] .  
  
Which describe changes in scatter/gather lists that were implemented in kernel 2.6.23 in Oct 2007.
+
To install the Digilent Adept Runtime, it is recommended to install {{AUR|digilent.adept.runtime}} from the [[Arch User Repository]].
  
I implemented the following:
+
In addition, installing {{AUR|digilent.adept.utilities}} may do good to configuring your board.
$ cd install_drivers/linux_drivers/windriver32/windrvr/
+
  
and apply the patch indicated below to linux_wrappers.c:
+
To install the Digilent plugin, you have to copy two files to the ISE plugin directory. Run the following commands as root:
 +
$ mkdir -p /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/plugins/Digilent/libCseDigilent
 +
$ cd /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/digilent/libCseDigilent_2.4.4-x86_64/lin64/14.1/libCseDigilent
 +
$ cp libCseDigilent.{so,xml} /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/plugins/Digilent/libCseDigilent
 +
$ chmod -x /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/plugins/Digilent/libCseDigilent/libCseDigilent.xml
  
124a125,127
 
> /* added to fix scatterlist without page compile bug -jea 2008-05-09 */
 
> // #include <linux/scatterlist.h>
 
>
 
1791c1794
 
<    sgl[0].page = pages[0];
 
---
 
>    sgl[0].page_link = (unsigned long)pages[0];
 
1798c1801
 
<            sgl[i].page = pages[i];
 
---
 
>            sgl[i].page_link = (unsigned long)pages[i];
 
1823c1826
 
<        void *va = page_address(sgl[i].page) + sgl[i].offset;
 
---
 
>        void *va = page_address((struct page *)sgl[i].page_link) + sgl[i].offset;
 
1954,1956c1957,1959
 
<        if (!PageReserved(sgl[i].page))
 
<            SetPageDirty(sgl[i].page);
 
<        page_cache_release(sgl[i].page);
 
---
 
>        if (!PageReserved((struct page *)sgl[i].page_link))
 
>            SetPageDirty((struct page *)sgl[i].page_link);
 
>        page_cache_release((struct page *)sgl[i].page_link);
 
  
or, viewed as a unified patch:
 
  
--- before/install_drivers/linux_drivers/windriver32/windrvr/linux_wrappers.c  2008-02-19 09:58:43.000000000  -0800
+
Finally, add every user that should have access to the Digilent USB-JTAG adapter to the "uucp" group.
+++ after/install_drivers/linux_drivers/windriver32/windrvr/linux_wrappers.c    2008-05-15 20:02:23.000000000  -0700
+
@@ -122,6 +122,9 @@
+
      static struct pci_dev *pci_root_dev;
+
  #endif
+
+
+/* added to fix scatterlist without page compile bug -jea 2008-05-09 */
+
+// #include <linux/scatterlist.h>
+
+
+
  typedef struct
+
  {
+
      struct page **pages;
+
@@ -1788,14 +1791,14 @@
+
+
      memset (sgl, 0, sizeof(struct scatterlist) * page_count);
+
      sgl[0].offset = ((unsigned long)buf) & (~PAGE_MASK);
+
-    sgl[0].page = pages[0];
+
+    sgl[0].page_link = (unsigned long)pages[0];
+
      if (page_count > 1)
+
      {
+
          sgl[0].length = PAGE_SIZE - sgl[0].offset;
+
          size -= sgl[0].length;
+
          for (i=1; i < page_count ; i++, size -= PAGE_SIZE)
+
          {
+
-            sgl[i].page = pages[i];
+
+            sgl[i].page_link = (unsigned long)pages[i];
+
              sgl[i].length = size < PAGE_SIZE ? size : PAGE_SIZE;
+
          }
+
      }
+
@@ -1820,7 +1823,7 @@
+
      for (i=0; i<*dma_sglen; i++)
+
      {
+
  #if defined(_CONFIG_SWIOTLB)
+
-        void *va = page_address(sgl[i].page) + sgl[i].offset;
+
+        void *va = page_address((struct page *)sgl[i].page_link) + sgl[i].offset;
+
          dma_addr_t dma_addr = virt_to_phys(va);
+
+
          if (dma_addr & ~mask)
+
@@ -1951,9 +1954,9 @@
+
  #if defined(_CONFIG_SWIOTLB)
+
          pci_unmap_single(dev_handle, sg_dma_address(&sgl[i]), sg_dma_len(&sgl[i]), (int)dma_direction);
+
  #endif
+
-        if (!PageReserved(sgl[i].page))
+
-            SetPageDirty(sgl[i].page);
+
-        page_cache_release(sgl[i].page);
+
+        if (!PageReserved((struct page *)sgl[i].page_link))
+
+            SetPageDirty((struct page *)sgl[i].page_link);
+
+        page_cache_release((struct page *)sgl[i].page_link);
+
      }
+
      vfree(sgl);
+
  #elif defined(LINUX_24)
+
  
This corrected the compile errors in the Jungo USB driver and produced the windrvr6.ko kernel module. However there was still a nagging error in the compilation of install_drivers/linux_drivers/xpc4drvr2_6/xpc4drvr/
+
To grant access to the usb driver for normal users you may have to add the USB Vendor/Product IDs of your JTAG adapter which can be found with
 +
$ lsusb | grep Xilinx
 +
to the udev rules in {{ic|/etc/udev/rules.d/20-digilent.rules}}:
 +
SUBSYSTEM=="usb", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="xxxx", GROUP="users", MODE="666"
  
scripts/Makefile.build:46: *** CFLAGS was changed in "/home/johnea/src/before/install_drivers/linux_drivers/xpc4drvr2_6/xpc4drvr/Makefile". Fix it to use EXTRA_CFLAGS. Stop.
+
If it still doesn't work, you can make further reading in [http://www.george-smart.co.uk/wiki/Xilinx_JTAG_Linux Xilinx_JTAG_Linux]. The magic git repo there may be help.
make[1]: *** [_module_/home/johnea/src/before/install_drivers/linux_drivers/xpc4drvr2_6/xpc4drvr] Error 2
+
make[1]: Leaving directory `/usr/src/linux-2.6.24-ARCH'
+
make: *** [default] Error 2
+
  
which was corrected by the following brutal hack to the Makefile:
+
=== Xilinx Platform Cable USB-JTAG Drivers ===
  
diff before/install_drivers/linux_drivers/xpc4drvr2_6/xpc4drvr/Makefile  \
+
{{Accuracy|Building as root is dangerous!}}
      after/install_drivers/linux_drivers/xpc4drvr2_6/xpc4drvr/Makefile
+
+
25c25
+
< ifeq ($(GET_USER_SIZE_SYM),0)
+
---
+
> #ifeq ($(GET_USER_SIZE_SYM),)
+
27c27
+
< endif
+
---
+
> #endif
+
  
This corrected all compilation errors, but the xpc4drvr.ko still yielded the following error in /var/log/everything.log whenever it was attempted to be loaded:
+
Make sure you have installed {{AUR|fxload}}  from the [[Arch User Repository]] .  
xpc4drvr: Unknown symbol get_user_size
+
We need to build driver from source (git and some make stuff need to be installed, make will say what programs or libraries are missed):
  
However this did allow compilation of the entire driver tree and the install script was able to successfully install the drivers via:
+
  $ cd /opt/Xilinx
  cd install_drivers/
+
  $ sudo git clone git://git.zerfleddert.de/usb-driver
  ./install_drivers
+
$ cd usb-driver/
 +
$ sudo make
  
There is also a udev rule entry that will make the driver accessible to all users after each reboot. (Which I haven't yet applied)
+
If you using 32-bit version of ISE on 64-bit system, pass "lib32" to make:
  
So after this brief modification, I am able to successfully run ISE on Arch Linux (kernel26 2.6.24) with full USB cable support.
+
$ sudo make lib32
  
There is a GPL'd libusb based driver mentioned in the Gentoo HOWTO: http://www.rmdir.de/~michael/xilinx/ that I was particularly interested in using. However while the source built without error, I continued to receive runtime errors when attempting to run it in ISE.
+
And install driver (replace 14.7 to your version):
  
I never attempted to use the Xup driver.
+
$ ./setup_pcusb /opt/Xilinx/14.7/ISE_DS/ISE/
  
There were quite a few pertinent facts along the way that I'm failing to capture here. Such as the fact that I discovered the same directory:
+
When performing this command, the udev rules file will be created. You can reload udev rules to apply changes immidiately:
install_drivers/
+
  
in the base install of the entire ISE package under:
+
  $ sudo udevadm control --reload-rules
  /opt/Xilinx/10.1/common/bin/lin/install_script/install_drivers/
+
  
I would expect that this procedure could be applied directly to that without the additional step of downloading the install_drivers.tar.gz but I haven't tried this.
+
If driver installed correctly and udev rule works, STATUS led should turn on (green or red depending on voltage presence on VREF PIN)
  
Additionally, as a housekeeping note, the commands above expect all files to be downloaded and untared in the same working directory.
+
=== Locale Issues ===
 +
PlanAhead doesn't like locales using other literals than '.' as the decimal point (e.g. German, which uses ','). Run the following command before launching PlanAhead:
 +
$ unset LANG
  
All in all this is the crux of what was necessary for me to get the USB support running on Arch.
+
=== Segmentation Fault on PlanAhead ===
 +
When launching PlanAhead to generate a .ucf file, a segmentation fault may occur. The issue seems unrelated to the previous topic. The ISE console will show
 +
"/opt/Xilinx/14.7/ISE_DS/PlanAhead/bin/rdiArgs.sh: line 64: 14275 Segmentation fault      $RDI_PROG $*"
 +
The problem seems to come from the bundled JRE as described [http://forums.xilinx.com/t5/Installation-and-Licensing/RHEL5-64-bit-ISE-13-1-PlanAhead-launch-from-w-in-ISE-fails/td-p/148624/page/2 here]. To fix the issue, symlink the OpenJDK libjvm.so into the Xilinx's installation directory.
 +
# cd /opt/Xilinx/14.7/ISE_DS/PlanAhead/tps/lnx64/jre/lib/amd64/server
 +
# mv libjvm.so{,-orig}
 +
# ln -s /usr/lib/jvm/java-7-openjdk/jre/lib/amd64/server/libjvm.so
  
Sorry for the somewhat fragmented description, but hopefully this allows others to get this great tool for linux users running on the post 2.6.23 kernels.
+
=== GNU make ===
 +
XSDK looks for the {{ic|gmake}} executable, which is not present in Arch Linux by default. Create a symlink somewhere in your path, e.g.
 +
$ ln -s /usr/bin/make /home/<user>/bin/gmake
  
Happy Hardware Hacking!!!
+
Make sure this directory is in your PATH variable.
  
== Update 2010-08-02 ==
+
=== Running Xilinx tools from within KDE ===
 +
KDE by default defines the QT_PLUGIN_PATH shell variable. Some of the Xilinx ISE tools (ISE, Impact, XPS) are Qt applications, which means that they will search for Qt plugins in the locations defined by this shell variable.
  
Comments in the forum thread announcing this wiki entry make reference to the page:
+
Because the Xilinx tools are compiled against and ship with an older version of the Qt framework which cannot use these plugins, they will crash when launched with this environment variable present.
  
http://rmdir.de/~michael/xilinx/
+
To fix this issue, run the following command before launching the tools:
  
This is the upstream source for non-proprietary Xilinx USB drivers using libusb. This is now the Xilinx recommended linux usb interface and is shipped with new versions of Xilinx ISE WebPack.
+
$ unset QT_PLUGIN_PATH
  
Per a note on the rmdir.de website, newer versions of udev no longer support the older syntax of the /etc/udev/rules.d/xusbdfwu.rules file:
+
=== CORE Generator fails to generate core ===
<pre>
+
In some cases, the CORE Generator will fails to generate a core and output something like this to its console:
* 2010-03-15: If you are using newer udev-versions (like the version included in Debian Squeeze and Ubuntu 9.10), then the file /etc/udev/rules.d/xusbdfwu.rules is incompatible with this udev version. The effect of this is that the cable-firmware gets never loaded and the cable led never lights up.
+
  
To fix this, run the following command as root:
+
ERROR:sim - Unable to evaluate Tcl file:
sed -i -e 's/TEMPNODE/tempnode/' -e 's/SYSFS/ATTRS/g' -e 's/BUS/SUBSYSTEMS/' /etc/udev/rules.d/xusbdfwu.rules
+
    /opt/Xilinx/14.7/ISE_DS/ISE/coregen/ip/xilinx/primary/com/xilinx/ip/clk_wiz_v3_6/generate/run_legacy_tcl_flow.tcl
You may have to reboot for this change to take effect.
+
ERROR:sim - Failed executing Tcl generator.
</pre>
+
  
I didn't require a reboot for this patch to take affect while running:
+
If that happens, make sure you don't have _JAVA_OPTIONS set in your environment. If you normally run coregen with
<pre>
+
[root@vhost pcusb]# pacman -Q udev
+
udev 151-3
+
[root@vhost pcusb]# pacman -Q kernel26
+
kernel26 2.6.33.4-1
+
</pre>
+
In both the x86_64 host and the i686 chroot.
+
  
android
+
$ source /opt/Xilinx/14.7/ISE_DS/settings64.sh && coregen
  
== Update 2012-04-26 ==
+
you need to prepend that with an "unset _JAVA_OPTIONS":
I had a problem with PlanAhead software wich is based on Java, there is non-rendered window. It appears that this problem is a re-manifestation of the Java bug, which was meant to have been fixed in an early version of Java 1.6. Using MToolkit makes the workaroud:
+
<pre>
+
$export AWT_TOOLKIT="MToolkit"
+
</pre>
+
Source from [http://forums.xilinx.com/t5/Installation-and-Licensing/Planahead-12-3-has-a-non-rendered-window/td-p/105153 Xilinx Forum]
+
  
==See also==
+
$ unset _JAVA_OPTIONS && source /opt/Xilinx/14.7/ISE_DS/settings64.sh && coregen
* http://gentoo-wiki.com/HOWTO_Xilinx#Installing_Cable_Driver_Kernel_Modules
+
* http://gentoo-wiki.com/Talk:HOWTO_Xilinx/Archive_1
+
* http://gentoo-wiki.com/HOWTO_Xilinx
+
* [http://www.xilinx.com/support/answers/22648.htm USB install on Linux]
+
* http://developer.petalogix.com/wiki/Other/XilinxOnLinux
+
* http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2007/03/msg00101.html
+
* http://groups.google.com/group/comp.arch.fpga/msg/2dfa36541174a4f2
+
* http://groups.google.com/group/comp.arch.fpga/browse_thread/thread/24884c2d0e90b97f
+
* http://groups.google.com/group/comp.arch.fpga/browse_thread/thread/f149e5b6028e2c70/066766d9510e407a#066766d9510e407a
+

Latest revision as of 07:27, 25 March 2016

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: See in particular Help:Style#Command line text. (Discuss in Talk:Xilinx ISE WebPACK#)

The Xilinx ISE WebPACK is a complete FPGA/CPLD programmable logic design suite providing:

  • Specification of programmable logic via schematic capture or Verilog/VHDL
  • Synthesis and Place & Route of specified logic for various Xilinx FPGAs and CPLDs
  • Functional (Behavioral) and Timing (post-Place & Route) simulation
  • Download of configuration data into target device via communications cable

While Arch Linux is not one of the officially supported distributions, many features are known to work on Arch Linux.

Prerequisites

Dependencies

If you plan to develop software for an embedded ARM core (e.g. for Xilinx Zynq SoC devices), you will want to install the GCC cross-compiler bundled included with the Xilinx Embedded Development Kit (EDK). This compiler requires the glibc and ncurses packages. For i686 installations, these will most likely be already present.

If you are on a 64-bit Arch installation, you need to install lib32-glibc from the multilib repository. Since the lib32-ncurses is now version 6, the ncurses pkgbuild must be installed manually --- makepkg -s and pacman -U *xz.
Note: the required gpg can be fetched via gpg --keyserver http://pgp.mit.edu/ --search 0x702353e0f7e48edb

Default Shell

During the installation, the Mentor CodeSourcery toolchains for embedded processors can be installed along with the Xilinx tools. This installation silently fails when the default shell is set to "dash". Make sure /usr/bin/sh points to /usr/bin/bash.

This can be checked by running this command:

$ ls -l /usr/bin/sh

If the output looks like this:

lrwxrwxrwx 1 root root 15 13 Mar 06:47 /usr/bin/sh -> bash

then /usr/bin/sh already points to /usr/bin/bash (the default in Arch Linux).

If not, run the following commands as root:

$ rm /usr/bin/sh
$ ln -s bash /usr/bin/sh

Installation

Note: The installation is last known to work with Xilinx ISE 14.7, requiring the dynamic library fix described below.

The ISE Design Tools can be downloaded from the official download page. It requires registration and licensing agreement, but there is no charge, i.e. it's free as in "free beer", but not free as in "free speech".

Once the tarballs has been downloaded, unpack it:

$ tar -xvf Xilinx_ISE_DS_Lin_14.7_1015_1.tar

The ISE design tools installer is a Qt application. If you are running the KDE desktop environment, the installer may try to load the "Oxygen" widget theme, which will fail due to the older Qt framework bundled with the Xilinx ISE design tools. You need to remove the QT_PLUGIN_PATH environment variable before executing the installer:

$ unset QT_PLUGIN_PATH

Then, install the ISE Design Tools:

$ cd Xilinx_ISE_DS_Lin_14.7_1015_1
$ ./xsetup

Follow the instructions to install the ISE. By default, the whole application is installed to /opt/Xilinx/, so make sure the user running the installer has permissions to write to this directory.

During installation, uncheck the "Install Cable Drivers" option. Leaving it checked will cause errors during the installation.

Launching the ISE design tools

The ISE design tools include a shell script that modifies the environment variables (mostly PATH and LD_LIBRARY_PATH). This script must be sourced before starting the ISE tools:

$ source /opt/Xilinx/14.7/ISE_DS/settings64.sh

or, for a 32-bit installation:

$ source /opt/Xilinx/14.7/ISE_DS/settings32.sh

Then, the ISE design tools will be found in your PATH and can be started by typing their name in the terminal (e.g. ise, planAhead, xsdk, ...)

Launching via desktop icons

You can also create files at /usr/share/applications/

ise.desktop:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Name=Xilinx ISE
Exec=sh -c "unset LANG && unset QT_PLUGIN_PATH && source /opt/Xilinx/14.7/ISE_DS/settings64.sh && ise"
Icon=/opt/Xilinx/14.7/ISE_DS/ISE/data/images/pn-ise.png
Categories=Development;
Comment=Xilinx ISE
StartupWMClass=_pn

After that you can copy this files to Desktop folder on your home and launch ISE tools from desktop

License Installation

After requesting a WebPACK license from Xilinx using their Licensing Site, you will be e-mailed a license file. This file can be imported with the Xilinx License Manager (run xlcm -manage from the terminal).

Another way to import the license is to simply copy it to the ~/.Xilinx or /opt/Xilinx/14.7/ISE_DS/ISE/coregen/core_licenses directory.

Node-Locked Licenses

Arch Linux by default uses systemd's Predictable Network Interface Names. This means that your system will most likely not have its network interfaces named "eth0", "eth1" and so forth.

However, the Xilinx License Manager looks for these names to find out the system's MAC addresses, which are used for node-locked licenses. If you require node-locked licenses, unfortunately you have to disable this feature to re-gain the kernel naming scheme for network interfaces and fix the name of NIC that you obtained your license. The code below will be your help:

# echo 'SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="eth1"' > /etc/udev/rules.d/10-net-naming.rules

For more specific, refer to the page systemd wiki describes how to work and what you have other(formal) ways.

Post-Installation Fixes and Tweaks

After installation, a few manual fixes are required to work around problems caused by running the Xilinx tools on a Linux distribution that is not officially supported by Xilinx. Some of these fixes are taken from this forum post.

Dynamic Library Fix (libstdc++.so)

The ISE tools supply an outdated version of the libstdc++.so library, which may cause segfaults when using the Xilinx Microprocessor Debugger and prevents the usage of the oxygen-gtk theme. This outdated version is located in two directories within the installation tree: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/ and /opt/Xilinx/14.7/ISE_DS/common/lib/lin64. To use Arch's newer version of libstdc++, rename or delete the original files and replace them with symlinks:

cd /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/
mv libstdc++.so libstdc++.so-orig
mv libstdc++.so.6 libstdc++.so.6-orig
mv libstdc++.so.6.0.8 libstdc++.so.6.0.8-orig
ln -s /usr/lib/libstdc++.so
ln -s libstdc++.so libstdc++.so.6
ln -s libstdc++.so libstdc++.so.6.0.8

Then, repeat this process in the /opt/Xilinx/14.7/ISE_DS/common/lib/lin64 directory.

Digilent USB-JTAG Drivers

To use Digilent Adept USB-JTAG adapters (e.g. the onboard JTAG adapter on the ZedBoard) from within the Xilinx design tools, you need to install the Digilent Adept Runtime and Plugin.

Make sure you have installed fxloadAUR from the Arch User Repository .

To install the Digilent Adept Runtime, it is recommended to install digilent.adept.runtimeAUR from the Arch User Repository.

In addition, installing digilent.adept.utilitiesAUR may do good to configuring your board.

To install the Digilent plugin, you have to copy two files to the ISE plugin directory. Run the following commands as root:

$ mkdir -p /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/plugins/Digilent/libCseDigilent
$ cd /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/digilent/libCseDigilent_2.4.4-x86_64/lin64/14.1/libCseDigilent
$ cp libCseDigilent.{so,xml} /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/plugins/Digilent/libCseDigilent
$ chmod -x /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/plugins/Digilent/libCseDigilent/libCseDigilent.xml


Finally, add every user that should have access to the Digilent USB-JTAG adapter to the "uucp" group.

To grant access to the usb driver for normal users you may have to add the USB Vendor/Product IDs of your JTAG adapter which can be found with

$ lsusb | grep Xilinx

to the udev rules in /etc/udev/rules.d/20-digilent.rules:

SUBSYSTEM=="usb", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="xxxx", GROUP="users", MODE="666"

If it still doesn't work, you can make further reading in Xilinx_JTAG_Linux. The magic git repo there may be help.

Xilinx Platform Cable USB-JTAG Drivers

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Building as root is dangerous! (Discuss in Talk:Xilinx ISE WebPACK#)

Make sure you have installed fxloadAUR from the Arch User Repository . We need to build driver from source (git and some make stuff need to be installed, make will say what programs or libraries are missed):

$ cd /opt/Xilinx
$ sudo git clone git://git.zerfleddert.de/usb-driver
$ cd usb-driver/
$ sudo make

If you using 32-bit version of ISE on 64-bit system, pass "lib32" to make:

$ sudo make lib32

And install driver (replace 14.7 to your version):

$ ./setup_pcusb /opt/Xilinx/14.7/ISE_DS/ISE/

When performing this command, the udev rules file will be created. You can reload udev rules to apply changes immidiately:

$ sudo udevadm control --reload-rules

If driver installed correctly and udev rule works, STATUS led should turn on (green or red depending on voltage presence on VREF PIN)

Locale Issues

PlanAhead doesn't like locales using other literals than '.' as the decimal point (e.g. German, which uses ','). Run the following command before launching PlanAhead:

$ unset LANG

Segmentation Fault on PlanAhead

When launching PlanAhead to generate a .ucf file, a segmentation fault may occur. The issue seems unrelated to the previous topic. The ISE console will show

"/opt/Xilinx/14.7/ISE_DS/PlanAhead/bin/rdiArgs.sh: line 64: 14275 Segmentation fault      $RDI_PROG $*"

The problem seems to come from the bundled JRE as described here. To fix the issue, symlink the OpenJDK libjvm.so into the Xilinx's installation directory.

# cd /opt/Xilinx/14.7/ISE_DS/PlanAhead/tps/lnx64/jre/lib/amd64/server
# mv libjvm.so{,-orig}
# ln -s /usr/lib/jvm/java-7-openjdk/jre/lib/amd64/server/libjvm.so

GNU make

XSDK looks for the gmake executable, which is not present in Arch Linux by default. Create a symlink somewhere in your path, e.g.

$ ln -s /usr/bin/make /home/<user>/bin/gmake

Make sure this directory is in your PATH variable.

Running Xilinx tools from within KDE

KDE by default defines the QT_PLUGIN_PATH shell variable. Some of the Xilinx ISE tools (ISE, Impact, XPS) are Qt applications, which means that they will search for Qt plugins in the locations defined by this shell variable.

Because the Xilinx tools are compiled against and ship with an older version of the Qt framework which cannot use these plugins, they will crash when launched with this environment variable present.

To fix this issue, run the following command before launching the tools:

$ unset QT_PLUGIN_PATH

CORE Generator fails to generate core

In some cases, the CORE Generator will fails to generate a core and output something like this to its console:

ERROR:sim - Unable to evaluate Tcl file:
   /opt/Xilinx/14.7/ISE_DS/ISE/coregen/ip/xilinx/primary/com/xilinx/ip/clk_wiz_v3_6/generate/run_legacy_tcl_flow.tcl
ERROR:sim - Failed executing Tcl generator.

If that happens, make sure you don't have _JAVA_OPTIONS set in your environment. If you normally run coregen with

$ source /opt/Xilinx/14.7/ISE_DS/settings64.sh && coregen

you need to prepend that with an "unset _JAVA_OPTIONS":

$ unset _JAVA_OPTIONS && source /opt/Xilinx/14.7/ISE_DS/settings64.sh && coregen