f4pga/wrappers/sh/xc7/vpr_common: use '--' to separate additional VPR options (#614)

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-08-14 14:00:40 +02:00 committed by GitHub
parent 60204c0760
commit 8a5db23271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 44 deletions

View File

@ -50,54 +50,31 @@ fi
function parse_args { function parse_args {
OPTS=d:e:p:n:P:s:a: eval set -- "$(
LONGOPTS=device:,eblif:,pcf:,net:,part:,sdc:,additional_vpr_options: getopt \
--options=d:e:p:n:P:s: \
--longoptions=device:,eblif:,pcf:,net:,part:,sdc: \
--name $0 -- "$@"
)"
PARSED_OPTS=`getopt --options=${OPTS} --longoptions=${LONGOPTS} --name $0 -- "$@"` DEVICE=''
eval set -- "${PARSED_OPTS}" DEVICE_NAME=''
PART=''
DEVICE="" EBLIF=''
DEVICE_NAME="" PCF=''
PART="" NET=''
EBLIF="" SDC=''
PCF="" ADDITIONAL_VPR_OPTIONS=''
NET=""
SDC=""
ADDITIONAL_VPR_OPTIONS=""
while true; do while true; do
case "$1" in case "$1" in
-d|--device) -d|--device) DEVICE=$2; shift 2 ;;
DEVICE=$2 -e|--eblif) EBLIF=$2; shift 2 ;;
shift 2 -p|--pcf) PCF=$2; shift 2 ;;
;; -n|--net) NET=$2; shift 2 ;;
-e|--eblif) -P|--part) PART=$2; shift 2 ;;
EBLIF=$2 -s|--sdc) SDC=$2; shift 2 ;;
shift 2 --) shift; ADDITIONAL_VPR_OPTIONS="$@"; break ;;
;;
-p|--pcf)
PCF=$2
shift 2
;;
-n|--net)
NET=$2
shift 2
;;
-P|--part)
PART=$2
shift 2
;;
-s|--sdc)
SDC=$2
shift 2
;;
-a|--additional_vpr_options)
ADDITIONAL_VPR_OPTIONS="$2"
shift 2
;;
--)
break
;;
esac esac
done done