General Impact Notes
The official Impact user guide from ISE version 5 (pac.pdf) can be found on
this page. I do not know where to find the Impact documentation, if there is any, that comes with current releases of ISE.
For help with the Linux drivers for the Xilinx JTAG cable, see
this Wiki page.
JTAG Device Numbering
Be aware that Impact identifies devices in a JTAG (boundary scan) chain starting with 1. This is in contrast to
ChipScope? , which identifies the first device in a chain as device 0. Watching out for this inconsistency, especially when using Impact in batch mode, where the chain order isn't graphically illustrated, is essential to averting pesky irreversible hardware damage.
Impact and Partial Bitstreams
It has been observed that in GUI mode, Impact cannot be used to load an active partial bitstream. Full and partial bitstreams alike can be loaded in batch mode per the steps given below.
The failure of GUI mode to work with partials seems to originate with the "-s" option Impact uses with the program command while in GUI mode (in the output log panel, one can observe the equivalent batch mode commands that correspond to each GUI-invoked action). This option results in "secure mode" programming according to the Xilinx documentation. There does not appear to be any way in GUI mode to disable this option when programming a device.
Using Impact in Batch Mode (Interactive)
The following represents a basic Impact session using a Xilinx JTAG cable attached to the parallel port. It works for full bitstreams and partial bitstreams.
Invoke Impact with:
impact -batch
Once in the Impact shell, one can open the cable, load the bitstream, and exit with the following sequence:
setMode -bscan
setCable -p auto
identify
assignFile -p JTAG_device_number -file bitfile_name
program -p JTAG_device_number
closeCable
exit
Commands at the Impact prompt can also be invoked in all lower case. It is in fact not necessary to invoke
closeCable prior to invoking exit.
Conveniently, the
assignFile command does not need to be reinvoked each time the bitfile changes and the user wishes to reprogram the device. In other words, one can leave the cable open and merely invoke
program again to load an updated bitfile. The bitfile will be reloaded from disk each time.
Invoking
addDevice, mentioned in the Impact user guide, is not necessary if one uses
identify. A cautionary note that if you have previously called
identify during the current cable session, any subsequent call to
addDevice will cause Impact to report that it receives an incorrect ID-code from the device. It will then refuse to proceed with other operations.
A Handy Shell Script
This script lets you program the device with one command. It allows you to take advantage of tab-completion in your shell to specify the bitfile, whereas the Impact shell does not support tab-completion.
File: loadbit.sh
#!/bin/bash
# Loads the bitfiles via Impact/JTAG cable.
# Usage: loadbit.sh <JTAG device ID> <bitfile>
# by Matt Shelburne
BATCHFILE=temp_load.impact
if [ ${#} != 2 ]
then
echo 'Specify two arguments: JTAG_device_ID and bitfile'
exit 1
fi
BITFILE=${2}
JTAGCHAINID=${1}
rm -f ${BATCHFILE}
echo setmode -bs >> ${BATCHFILE}
echo setcable -p auto >> ${BATCHFILE}
echo identify >> ${BATCHFILE}
echo assignfile -p ${JTAGCHAINID} -file ${BITFILE} >> ${BATCHFILE}
echo program -p ${JTAGCHAINID} >> ${BATCHFILE}
echo exit >> ${BATCHFILE}
impact -batch ${BATCHFILE}
wait
rm -f ${BATCHFILE}
--
MattShelburne - 06 Nov 2007