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 {
OPTS=d:e:p:n:P:s:a:
LONGOPTS=device:,eblif:,pcf:,net:,part:,sdc:,additional_vpr_options:
eval set -- "$(
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 -- "$@"`
eval set -- "${PARSED_OPTS}"
DEVICE=""
DEVICE_NAME=""
PART=""
EBLIF=""
PCF=""
NET=""
SDC=""
ADDITIONAL_VPR_OPTIONS=""
DEVICE=''
DEVICE_NAME=''
PART=''
EBLIF=''
PCF=''
NET=''
SDC=''
ADDITIONAL_VPR_OPTIONS=''
while true; do
case "$1" in
-d|--device)
DEVICE=$2
shift 2
;;
-e|--eblif)
EBLIF=$2
shift 2
;;
-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
;;
-d|--device) DEVICE=$2; shift 2 ;;
-e|--eblif) EBLIF=$2; shift 2 ;;
-p|--pcf) PCF=$2; shift 2 ;;
-n|--net) NET=$2; shift 2 ;;
-P|--part) PART=$2; shift 2 ;;
-s|--sdc) SDC=$2; shift 2 ;;
--) shift; ADDITIONAL_VPR_OPTIONS="$@"; break ;;
esac
done