impact_cutewr 519 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/sh

# Downloads bitfile to an cutewr board in batch, using Impact from Xilinx ISE

if [ ! -r "${1}" ]; then
  echo "Usage: $0 filename.bit" >&2
  exit 1
fi

set -e
test -r $XILINX_SETTINGS && . $XILINX_SETTINGS
test -d $XILINX

# don't use -v switch to verify chip, since I don't create a .msk file.
# See Xilinx Answer Record 22228.
echo "
setMode -bs
setCable -port auto
Identify
assignFile -p 1 -file \"${1}\"
Program -p 1 -e -parallel -master -internalClk -clkFreq 40 -defaultVersion 0
quit" | impact -batch