Flash script
#!/bin/bash
command=$0
num=$1
# 1. wrong paramters of FPGA number.
if [ $num -le 0 ]; then
echo "Cannot program less than 1 FPGA, leaving..."
elif [ $num -gt 9 ]; then
echo "Cannot program more than 9 FPGAs, leaving..."
else
# 2. start to programe FPGA.
echo
echo "$command $1 ..."
echo
for i in $(seq 0 $[$num-1])
do
aclid="acl"${i}
echo "--> start to program "${aclid}" FPGA"
aocl program $aclid aocl_kernels_fpga.aocx
done
echo
echo "$command $1 Done"
echo
fi #ifend