User Tools

Site Tools


Cable locked

Occasionally something may happen that causes you to need to force an unlock

impact -batch

Batch mode

Examples for various boards. Basically use the GUI to figure out how the scan chain is setup and copy/paste the commands from the window

“-p 1” means program at boundary scan position one (starting with number 1). Use the GUI to figure out where in the chain your device is

Sample output:

#!/usr/bin/env bash


# Digilent Spartan 3E500
# KC705 (Kintex 7)
# Nexys4 Artix-7 FPGA Board
# ML605 (Virtex 6)

if grep -Hn 'Your design did not meet timing' *.par
  echo 'Timing failed'
  exit 1

impact -batch /dev/stdin <<EOF
setMode -bs
setCable -port auto
Identify -inferir 
assignFile -p 2 -file "$PWD/my.bit"
Program -p 2
date |tee _program.txt

Board hints

Spartn 3 Starter (S3E500)

With ISE 14.5 + Ubuntu 12.04, the built in digilent drivers do not work. I also tried latest adept SDK. What did work was to install the usb_driver per instructions below.

Linux driver

Traditionally using impact has been a pain on Linux but has gotten better in recent years. Seems that FTDI chips generally work well out of the box (ex: Nexys4) using the Digiilent Adept API while the older Cypress based controllers (ex: ML605, S3E500) can be hit or miss. Try impact as is first…if an't broke, don't fix it!

Example healthy output

Example unhealthy output


Test with platform cable USB II and ISE 14.5, Ubuntu 12.04

sudo apt-get install fxload libusb-0.1-4 libusb-dev
cd /opt/Xilinx/14.5/ISE_DS/common/bin/lin64/install_script/install_drivers/linux_drivers/pcusb
sudo bash ./setup_pcusb
# sudo cp xusbdfwu.rules /etc/udev/rules.d/
# sudo sed -i -e s/SYSFS/ATTR/g /etc/udev/rules.d/xusbdfwu.rules
# sudo sed -i -e 's/BUS=="usb"/SUBSYSTEMS=="usb"/g' /etc/udev/rules.d/xusbdfwu.rules

# Original file has old style udev rules not compatible with Ubuntu 12.04 (unclear when it broke)
sudo tee /etc/udev/rules.d/xusbdfwu.rules >/dev/null <<EOF
# version 0003
ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0008", MODE="666"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xup.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_emb.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xlp.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0015", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xse.hex -D $tempnode"

sudo cp /etc/hotplug/usb/xusbdfwu.fw/*.hex /usr/share/


If dmesg doesn't renumerate the usb device (“new full-speed USB device” several times) you don't have fxload and/or the rules setup correctly

install the libusb package

If you get:

If you are using the Platform Cable USB, please refer to the USB Cable
Installation Guide (UG344) to install the libusb package.

Does /usr/lib/x86_64-linux-gnu/ exist and is valid? Make sure you have BOTH usb and usb-dev as indicated above installed.

NOTE: xusbdfwu.rules gets deleted by the top level install_drivers as it fails. This can cause a previously successful pcusb to fail. Additionally, setup_pcusb only installs xusbdfwu.rules if the hex file didn't already exist. But it does since it was installed earlier. This copy step works around this bug to make sure that you always get a good installation

Digilent driver

cd /opt/Xilinx/14.5/ISE_DS/common/bin/lin64/digilent
sudo ./
sudo apt-get install fxload

Replug the USB device if its already plugged in

Watch out for this message:

INFO:Cse - The fxload application is not installed. This application is required
   when using the Platform Cable USB. This warning should be ignored if you are
   using the Parallel Cable III or Parallel Cable IV. Please download and
   install the fxload-2002_04_11 package. Note that root access is required to
   perform the installation.


When the built in drivers don't work I've had the best luck with this

Steps are something like:

cd /opt/Xilinx
git clone git://
cd usb-driver
./setup_pcusb /opt/Xilinx/14.5/ISE_DS/ISE/

Built in libsub

Starting with ISE 10.1, Xilinx started to bundle libusb support but it had to be manually activated. Modern ISE versions (13+?) use it automatically. Before starting impact:


For the older Cypress boards I had to do something like this:


There was also some libusb environment variable but don't have it handy…

Manual fxload

For debugging

cat >~/bin/pc2fxload <<EOF
# Bus 001 Device 020: ID 03fd:0013 Xilinx, Inc.
LS=$(lsusb |grep Xilinx)
bus=$(echo $LS |cut -c 5-7)
dev=$(echo $LS |cut -c 16-18)
sudo /sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D /dev/bus/usb/$bus/$dev

# Bus 001 Device 022: ID 03fd:0008 Xilinx, Inc. 
LS=$(lsusb |grep Xilinx)
bus=$(echo $LS |cut -c 5-7)
dev=$(echo $LS |cut -c 16-18)
sudo chown $USER /dev/bus/usb/$bus/$dev
chmod +x ~/bin/pc2fxload

lsusb to see something like

Bus 003 Device 007: ID 03fd:0013 Xilinx, Inc.


/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D /dev/bus/usb/003/007
microcontroller type: fx2
single stage:  load on-chip memory
open RAM hexfile image /usr/share/xusb_xp2.hex
stop CPU
write on-chip, addr 0x0fd9 len   39 (0x0027)
write on-chip, addr 0x06aa len    5 (0x0005)
write on-chip, addr 0x09da len    1 (0x0001)
write on-chip, addr 0x0c20 len  115 (0x0073)
... WROTE: 7962 bytes, 90 segments, avg 88
reset CPU

Now you should see

Bus 003 Device 009: ID 03fd:0008 Xilinx, Inc.

and the light should turn green. Although really should figure out why fxload isn't working

Finally set the permissions

sudo chown johnm /dev/bus/usb/003/008

Not great but got me going in a pinch


xilinx/impact.txt · Last modified: 2016/06/01 13:17 by mcmaster-guest